Claude Code · App Store Connect

Create offers and offer codes from Claude Code

A 7-day free trial for new subscribers, a code for your newsletter, a discount for people who cancelled. Ask Claude Code and MetaRun stages the right Apple offer type for each audience, with prices for every storefront.

Setup checked October 2026 against Claude Code MCP docs, permissions

01 · Uplink

Connect Claude Code once

01 · Add the server

Run it in any terminal. --scope user makes MetaRun available in every project; leave it out to limit it to the current one.

claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp

02 · Sign in

In a Claude Code session, run /mcp, choose metarun and authenticate. MetaRun opens in your browser, where you pick read-only or read and change. From a plain shell, claude mcp login metarun does the same.

/mcp

03 · Optional: add the skills too

The MetaRun plug-in bundles the same server with six mission skills (release handoff, worldwide pricing, localization, review inbox, ASO audit, store media).

claude plugin marketplace add metarun/metarun-skills
claude plugin install metarun-skills@metarun
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.

claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp \
  --header "Authorization: Bearer $METARUN_TOKEN"

Or share it with your team in .mcp.json

Project scope writes .mcp.json at the repo root. Claude Code expands ${METARUN_TOKEN} from each person's environment, so the token itself is never committed.

{
  "mcpServers": {
    "metarun": {
      "type": "http",
      "url": "https://metarun.dev/api/mcp",
      "headers": { "Authorization": "Bearer ${METARUN_TOKEN}" }
    }
  }
}
02 · Briefing

What Claude Code handles here

Apple has four offer types for subscriptions and they target different people: introductory offers for those who never subscribed, promotional offers for current subscribers, offer codes for anyone with a code, and win-back offers for people who left. Each has its own screens in App Store Connect and its own rules about price and eligibility.

MetaRun exposes each one as a preview and apply pair. Claude Code can create them, generate one-time codes, turn codes on and off, and read back what's live.

03 · Preflight

Before you start

  • A subscription to attach the offer to.
  • Who the offer is for: new, current, lapsed, or anyone with a code.
  • Prices per storefront for paid offers; free trials only need territories.
04 · Execution

How it runs

  1. 01

    Match the offer to the audience

    Claude Code picks the offer type from who it's for: never subscribed, subscribed now, lapsed, or anyone holding a code.

  2. 02

    Price it per storefront

    Paid offers take a price per territory. Free trials take a list of territories instead, because Apple wants no price on a free row.

  3. 03

    Preview the offer

    The preview shows the offer, its duration and where it applies, with a confirm token.

  4. 04

    Generate and track codes

    One-time codes are generated in a batch after the campaign exists. Campaigns can be switched off later without deleting them.

05 · Session

An example session in Claude Code

Add a 7-day free trial to com.example.app.pro.yearly for new subscribers in every storefront.

  1. apple_list_subscription_offersThe yearly plan has no introductory offer.
  2. apple_preview_create_intro_offerPreview: one-week free trial for new subscribers, every territory.
  3. Claude Code asks before running apple_apply_create_intro_offer. You read the preview above and approve.
  4. apple_apply_create_intro_offerCreated in every storefront.
  5. apple_preview_create_offer_codePreview: NEWSLETTER, 50% off for three months.

Illustrative: your apps, versions and numbers will differ. The tool names and their order are real.

06 · Tools

The MetaRun tools Claude Code calls

ToolWhat it does
apple_list_subscription_offersreadEvery offer on a subscription, across all four types.
apple_preview_create_intro_offerpreview + applyFree trial, pay as you go, or pay up front for new subscribers.
apple_preview_create_promotional_offerpreview + applyA discount current or lapsed subscribers can redeem in the app.
apple_preview_create_offer_codepreview + applyAn offer code campaign, with custom codes or one-time codes.
apple_preview_generate_offer_codespreview + applyMint a batch of one-time-use codes.
apple_preview_set_offer_code_activepreview + applyTurn a code campaign on or off.
apple_preview_create_winback_offerpreview + applyA win-back offer for people who cancelled (iOS 18 and later).
apple_preview_create_iap_offer_codepreview + applyOffer codes for in-app purchases.

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

Intro offers are stored per territory

Apple keeps an introductory offer as one resource per storefront, so a 3-day trial in 175 storefronts is 175 records. MetaRun reads them back as one offer with a territory count.

Free trials carry no price

A free trial's price rows must have no price point. MetaRun takes territories instead of prices for free offers and refuses a mixed request at preview rather than repricing silently.

Issued codes can't be taken back

Generating codes isn't revertible, since a code already handed out can't be un-issued. Deactivating the campaign is the lever instead.

Win-back offers need iOS 18

Win-back offers reach people who subscribed before and cancelled, and only on iOS 18 and later.

08 · Comms

What to ask Claude Code

  • Ask Claude Code: Add a 7-day free trial to com.example.app.pro.yearly for new subscribers in every storefront.
  • Ask Claude Code: Create an offer code campaign NEWSLETTER for 50% off the first 3 months, and generate 500 one-time codes.
  • Ask Claude Code: Set up a win-back offer: 2 months at half price for people who cancelled in the last 6 months.
09 · Unattended

Run it from a script with Claude Code

claude -p runs one request with no interactive session. The browser sign-in can't complete inside -p, so sign in once interactively first, or configure the server with a personal access token in CI. Tools missing from --allowedTools are refused in -p mode.

Read-only check, safe to schedule

claude -p "List every offer on each subscription of com.example.app: type, duration, territories and whether it is active. Read only." \
  --allowedTools "mcp__metarun__apple_list_subscription_offers,mcp__metarun__apple_preview_create_intro_offer,mcp__metarun__apple_preview_create_promotional_offer,mcp__metarun__apple_preview_create_offer_code,mcp__metarun__apple_preview_generate_offer_codes,mcp__metarun__apple_preview_set_offer_code_active,mcp__metarun__apple_preview_create_winback_offer,mcp__metarun__apple_preview_create_iap_offer_code"

Only reads and previews are on that list, so nothing can reach App Store Connect unattended. Run applies in an interactive session where Claude Code can ask you.

10 · Safety

How Claude Code asks before a change

Claude Code asks before every MCP tool call by default. You can allow a tool for the session or permanently; allow rules look like mcp__metarun__apple_list_versions for one tool, and mcp__metarun__* allows the whole server, applies included. Allowing reads and previews is reasonable. Leave the apply tools on ask: that prompt is the confirm step for every App Store change.

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

Frequently asked questions

Which offer type should I use?

Introductory offers for people who never subscribed, promotional offers for current subscribers, win-back offers for people who left, and offer codes when you hand out a code yourself. Claude Code can pick based on who you describe.

Can Claude Code generate one-time offer codes?

Yes. Create the campaign, then generate a batch of one-time-use codes. Generation isn't revertible, so it always previews first.

Can I offer a free trial in some countries only?

Yes. Free trials take a list of territories; leave it out for every storefront.

Do offers work for in-app purchases?

Offer codes do, through apple_preview_create_iap_offer_code. Introductory, promotional and win-back offers are subscription features in Apple's model.

How do I connect Claude Code to App Store Connect?

Run claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp, then run /mcp in Claude Code and sign in to MetaRun in your browser. After that, ask for "offers and offer codes" in plain words and Claude Code picks the MetaRun tools.

Does Claude Code 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. Claude Code holds a MetaRun token that you can revoke in Settings at any time.

More with Claude Code

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.