Price your app in 175 countries from Codex
Tell Codex your US price and a strategy. MetaRun's pricing engine computes a price for every storefront, snaps each one to Apple's real price points, and stages the whole schedule as one preview you can read before Apple sees it.
Setup checked October 2026 against Codex MCP docs, non-interactive mode
Connect Codex once
01 · Add the server
Codex sees that MetaRun offers sign-in and starts it straight away, in your browser. Pick read-only or read and change.
codex mcp add metarun --url https://metarun.dev/api/mcp02 · Sign in again later
If the sign-in expires or you disconnected it in MetaRun's settings. --no-browser prints the link instead, for SSH sessions.
codex mcp login metarun03 · Or edit ~/.codex/config.toml
The Codex CLI, the IDE extension and Codex in the ChatGPT desktop app read the same file, so one entry covers all three.
[mcp_servers.metarun]
url = "https://metarun.dev/api/mcp"Prefer a personal access token (scripts, CI)?
Add the server with a token
Mint a personal access token in MetaRun under Settings, MCP. It's shown once and can be revoked any time. Codex reads it from the environment variable you name.
export METARUN_TOKEN="mr_pat_..."
codex mcp add metarun --url https://metarun.dev/api/mcp --bearer-token-env-var METARUN_TOKENOr in config.toml
[mcp_servers.metarun]
url = "https://metarun.dev/api/mcp"
bearer_token_env_var = "METARUN_TOKEN"What Codex handles here
Apple converts your base price into every currency at roughly the exchange rate. $9.99 in the US becomes the equivalent of $9.99 in India, Brazil and Egypt, where it's a very different amount of money. Fixing that by hand means 175 dropdowns, each with its own list of allowed prices.
MetaRun computes the prices with purchasing power parity from World Bank data, the Big Mac index, the Spotify index or a straight conversion, rounds them to charm prices, and resolves each to an actual Apple price point. Codex gets the full table and stages it.
Before you start
- A base price and the storefront it's anchored to (usually the US).
- A strategy: PPP, Big Mac, Spotify, or straight conversion.
- For subscriptions: whether current subscribers keep their price.
How it runs
- 01
Pick a base and a strategy
Codex asks for the anchor price and storefront, and the strategy: PPP, Big Mac, Spotify, or direct conversion.
- 02
Compute the table
pricing_compute_prices returns a row per storefront: the computed price, the Apple price point it snapped to, and the change from today.
- 03
Stage the schedule
The computed input feeds the preview tool directly. A full reprice of every storefront previews in seconds because exact prices resolve from Apple's tier catalog.
- 04
Apply on approval
One apply replaces the schedule. The change is recorded, and the old schedule can be restored from history.
An example session in Codex
Reprice com.example.app worldwide with PPP, anchored at $4.99 in the US, charm rounding. Preview the 20 biggest changes first.
- apple_get_app_pricingBase price $4.99 in the US; Apple's equalized prices everywhere else.
- pricing_compute_pricesA PPP price for each storefront, snapped to Apple's price points, with the change from today.
- apple_preview_set_territory_pricesPreview: the new schedule, every storefront's old and new price side by side.
- Codex asks before running apple_apply_set_territory_prices. You read the preview above and approve.
- apple_apply_set_territory_pricesSchedule replaced. The old one is in history for a revert.
Illustrative: your apps, versions and numbers will differ. The tool names and their order are real.
The MetaRun tools Codex calls
| Tool | What it does |
|---|---|
| pricing_get_indexesread | PPP, Big Mac, Spotify and VAT reference values per country. |
| pricing_compute_pricesread | Runs the strategy and returns a staged input ready for the matching preview tool. |
| pricing_get_exchange_ratesread | Live USD exchange rates used in the math. |
| apple_get_app_pricingread | The app's current price schedule. |
| apple_find_price_pointsread | Apple's allowed prices for a storefront near a target. |
| apple_preview_set_territory_pricespreview + apply | Stage a full per-territory schedule for the app. |
| apple_preview_set_iap_pricepreview + apply | The same for an in-app purchase. |
| apple_preview_set_subscription_pricepreview + apply | The same for a subscription, with an option to keep current subscribers on their price. |
Each preview has an apply twin (the same name with apply instead of preview) that only runs with the confirm token from a fresh preview, and refuses if App Store Connect changed in between. MetaRun tools save to your MetaRun workspace only (studio projects, tracked keywords), never to Apple.
What Apple enforces, and how MetaRun handles it
Every storefront has its own price ladder
Apple only accepts specific price points per territory. MetaRun snaps each computed price to a real point and shows where it moved.
One future price per territory
Apple allows a single scheduled price change per territory on a subscription. A bulk reprice skips territories that already have one and names the pending price and date.
Approved subscriptions start tomorrow
Once a subscription is approved, Apple won't create a new price row starting today. MetaRun schedules the earliest allowed date (tomorrow, UTC) and says so in the preview.
PPP needs a guard for inflation
In hyperinflation economies the PPP factor can sit above the market rate and push prices up. The engine caps the multiplier for those countries so the result stays affordable.
What to ask Codex
- Ask Codex: Reprice com.example.app worldwide with PPP, anchored at $4.99 in the US, charm rounding. Preview the 20 biggest changes first.
- Ask Codex: Do the same for the yearly subscription, but keep current subscribers on their price.
- Ask Codex: Export the computed table to pricing/2026-10.csv so I can diff it later.
Run it from a script with Codex
codex exec runs one request without an interactive session and with its approval policy set to never. MetaRun's reads and previews still run, because they're marked read-only; anything that would ask is refused.
Read-only check, safe to schedule
codex exec "Compute PPP prices for com.example.app anchored at \$4.99 in the US and list the 10 storefronts with the largest change. Compute and read only; do not stage or apply."Applies are refused in codex exec by design. Don't set MetaRun's approval mode to approve just to make them pass; keep App Store changes in an interactive session.
How Codex asks before a change
Codex decides per tool from the hints MetaRun sends with each one. In its default mode it runs tools marked read-only, which covers MetaRun's reads and previews, and asks before the rest, which covers every apply. You can change that per server with default_tools_approval_mode, or per tool with tools.<name>.approval_mode in config.toml; keep the apply tools on prompt.
Frequently asked questions
Which pricing strategies can Codex use?
Purchasing power parity from World Bank data, the Big Mac index, the Spotify Premium index, direct conversion, or custom multipliers, with charm or whole-number rounding and optional VAT handling.
Will existing subscribers get a price increase?
Only if you choose that. apple_preview_set_subscription_price takes preserveCurrentPrice, which keeps current subscribers on their price while new ones pay the new one.
Can I try the math without connecting anything?
Yes. The free App Store pricing calculator on metarun.dev runs the same engine on any price, no account needed.
How long does a 175-storefront reprice take?
The preview resolves in seconds for exact prices, because MetaRun builds the price point ids from Apple's tier catalog instead of searching each territory.
How do I connect Codex to App Store Connect?
Run codex mcp add metarun --url https://metarun.dev/api/mcp; Codex detects MetaRun's sign-in and opens it in your browser. After that, ask for "price by country" in plain words and Codex picks the MetaRun tools.
Does Codex see my App Store Connect key?
No. Your App Store Connect API key stays envelope-encrypted on MetaRun's servers and is decrypted per request. Codex holds a MetaRun token that you can revoke in Settings at any time.
More with Codex
Codex
Subscriptions and IAPs
Create subscription groups, subscriptions and in-app purchases with copy and prices.
OpenCodex
Offers and offer codes
Free trials, promotional offers, offer codes and win-back offers, set up by asking.
OpenCodex
Localize your listing
Name, subtitle, keywords and description in every App Store language, limits checked.
OpenCodex
ASO keywords
Find keywords from App Store autocomplete, track ranks, and lint your metadata.
OpenPrice by country with another agent
In depth: Bulk App Store pricing
Agent access
14-day free trial with agent access. No credit card. Your Apple key stays encrypted on MetaRun.