Codex · App Store Connect

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

01 · Uplink

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/mcp

02 · 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 metarun

03 · 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_TOKEN

Or in config.toml

[mcp_servers.metarun]
url = "https://metarun.dev/api/mcp"
bearer_token_env_var = "METARUN_TOKEN"
02 · Briefing

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.

03 · Preflight

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.
04 · Execution

How it runs

  1. 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.

  2. 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.

  3. 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.

  4. 04

    Apply on approval

    One apply replaces the schedule. The change is recorded, and the old schedule can be restored from history.

05 · Session

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.

  1. apple_get_app_pricingBase price $4.99 in the US; Apple's equalized prices everywhere else.
  2. pricing_compute_pricesA PPP price for each storefront, snapped to Apple's price points, with the change from today.
  3. apple_preview_set_territory_pricesPreview: the new schedule, every storefront's old and new price side by side.
  4. Codex asks before running apple_apply_set_territory_prices. You read the preview above and approve.
  5. 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.

06 · Tools

The MetaRun tools Codex calls

ToolWhat it does
pricing_get_indexesreadPPP, Big Mac, Spotify and VAT reference values per country.
pricing_compute_pricesreadRuns the strategy and returns a staged input ready for the matching preview tool.
pricing_get_exchange_ratesreadLive USD exchange rates used in the math.
apple_get_app_pricingreadThe app's current price schedule.
apple_find_price_pointsreadApple's allowed prices for a storefront near a target.
apple_preview_set_territory_pricespreview + applyStage a full per-territory schedule for the app.
apple_preview_set_iap_pricepreview + applyThe same for an in-app purchase.
apple_preview_set_subscription_pricepreview + applyThe 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.

07 · Apple rules

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.

08 · Comms

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.
09 · Unattended

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.

10 · Safety

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.

Apple key stays on MetaRun, encryptedPreview before every writeRecorded, revertible from history
11 · FAQ

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

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.