Sprites MCP · Apple Ads MCP server · Codex

How to connect Apple Ads to Codex

To connect Apple Ads to Codex, add https://mcp.sprites.ai/mcp as a remote MCP server in Codex, sign in to Sprites, and Codex can read your Apple Ads account and propose changes to it. Setup takes about two minutes and needs no API key. Every write comes back as an approval before it touches the account.

MCP server URLhttps://mcp.sprites.ai/mcp

5 steps · about 2 minutes

CodexSprites connected

Which Apple Ads keywords had the best cost per install last month?

Spritesanalyzerunning
SpritesApple Ads
  • habit tracker$1.92 CPI · 840 installsRaise bid+15%
  • daily planner$2.40 CPI · 410 installsKeep0
  • to do list$7.80 CPI · 38 installsCut bid-30%
Read-only · nothing changedAdjust bids

Add Sprites to Codex

Available on Anywhere Codex CLI runs — a ChatGPT plan that includes Codex, or an API key. You need a Sprites account with Apple Ads already connected — the connector acts on that connection, so Codex never handles a Apple Ads credential.

Apple Ads MCP setup guide
  1. Add the server

    One command writes the entry into ~/.codex/config.toml for you.

    Terminal
    codex mcp add sprites --url https://mcp.sprites.ai/mcp
  2. Or write the config by hand

    The same entry in ~/.codex/config.toml, or in .codex/config.toml inside a trusted project when you want the connector scoped to one repo.

    ~/.codex/config.toml
    [mcp_servers.sprites]
    url = "https://mcp.sprites.ai/mcp"
    auth = "oauth"
  3. Sign in

    Codex opens a browser for the Sprites consent screen and stores the token locally. Sprites supports dynamic client registration and client ID metadata documents, so there is nothing to pre-register.

    Terminal
    codex mcp login sprites
  4. Approve changes by name

    Codex renders results as text, so a pending change comes back written out rather than as a card you can click. Nothing is applied until you approve it, and the approval waits for you in Sprites — open it there and the same run continues.

    Pending change
    ChangeDaily budget $40 → $65Gategate_7f2c…

What permissions this needs

Connecting Apple Ads to Codex yourself means a Apple Ads Campaign Management API integration, and these are the permissions and gates it runs into. Through Sprites you sign in with OAuth instead, with no developer token or app review of your own.

API user and role

Access goes through an Apple Ads user invited with an API role. API Account Manager (or Admin) can change campaigns; a read-only API role can only report.

Client ID, Team ID and Key ID

The three identifiers Apple shows once a public key is uploaded to the API user. Together with the private key they sign every token request.

Client secret (ES256 JWT)

Apple has no consent screen: the integration signs a client secret with its private key and trades it for an access token with the searchadsorg scope.

orgId in X-AP-Context

Each call names the ad account, by its orgId, in the X-AP-Context header.

What Sprites asks for when you connect

A key pair Sprites makes for you: you add the public key to an Apple Ads API user. The user’s role decides whether Sprites can change campaigns (API Account Manager) or only report.

What you skip

You generate no key pair, sign no client secret and refresh no access token, and you never look up an orgId. Codex signs in to Sprites with OAuth and never holds a Apple Ads credential.

Why run Apple Ads ads through Sprites

Codex is the interface; the connector decides what it can see and what it is allowed to do. Six things change when that connector is Sprites.

Installs across every network

Apple Ads reports Apple’s installs only. Sprites reads it beside Meta, Google and TikTok, so cost per install on each network is one answer and the budget move is the next question.

Every channel on one connector

Every change approved, then verified

Budgets, bids, keywords and negatives each arrive as a card with the before and after. After you approve, Sprites reads the entity back from Apple, and reports any keyword Apple rejected on its own.

You choose read or write

The Apple Ads API user’s role decides it. Give the key a read-only role and Sprites can report but not change anything; API Account Manager allows changes, each still approved.

Run the first prompt

Ask Codex this. It routes to a Sprites door, which reads your Apple Ads account and answers — no account to name, no confirmation to give first.

  • With Sprites, which Apple Ads keywords had the lowest cost per install last month?
  • Ask Sprites which Apple Ads search terms spent money without an install.
  • Use Sprites to find out why our new Apple Ads campaign is not spending.
  • Have Sprites raise the daily budget on our Apple Ads brand campaign to $150.
  • With Sprites, suggest Apple Ads keywords for our app and add the best ten, paused.

Run `codex mcp list` and confirm sprites shows as connected.

Running Apple Ads from Codex

The jobs people hand over first, start to finish: what you type, what Sprites does with it, and what comes back to approve.

  1. Weekly keyword review

    You, in CodexEvery Monday, have Sprites review our Apple Ads keywords and search terms.

    Sprites does
    Reads cost per install by keyword and search term for the week and checks impression share on the terms that matter.
    You get back
    Bid changes and negatives as cards, applied only when you approve.
  2. A campaign that will not spend

    You, in CodexAsk Sprites why our Apple Ads campaign spent nothing this week.

    Sprites does
    Reads the campaign, its ad groups and keywords, Apple’s limiting reasons and the impression share on its terms.
    You get back
    The reason in one line, and the bid or budget change that fixes it as a card.
  3. Keywords for a new market

    You, in CodexWith Sprites, suggest Apple Ads keywords for our app in the UK.

    Sprites does
    Pulls Apple’s keyword suggestions and search popularity for the app and the country.
    You get back
    A keyword list to approve into an ad group, added paused.

What Codex can do with Apple Ads

The same doors, whichever client you are in. Marketing work that belongs in a commit: Codex can read the landing page it is about to ship and brief Sprites on the campaign pointing at it, in one session.

Cost per install by keyword

Spend, taps, tap-through rate, cost per tap, installs and cost per install, down to the keyword and the search term. Installs are Apple’s own count, and the answer says so rather than calling them trials or revenue.

Search terms worth excluding

The search term report shows what people actually typed. Sprites names the terms with spend and no installs and adds them as negatives on a campaign or an ad group, in one approval.

Why it will not spend

A campaign stuck at zero is usually a bid that loses the auction or a limit Apple reports. Sprites reads the limiting reasons and impression share, so a losing bid is told apart from a term nobody searches.

Keyword research for your app

Apple’s keyword suggestions for your app, search popularity and a suggested target CPA, turned into a keyword list you can approve into an ad group, added paused.

Apple’s own recommendations

Apply or dismiss Apple’s budget and target CPA recommendations from the chat. A target CPA on a Maximize Conversions campaign can only be set this way through Apple’s API.

Installs next to the rest of the funnel

Apple Ads sits beside Meta, Google and TikTok in the same conversation, so cost per install on each network is one question.

How approvals work here

Codex renders tool results as text, so a Apple Ads change comes back written out rather than as a card. The approval waits for you in Sprites — open it there and the same run continues. Nothing is applied until you approve it.

What it reads

  • Campaigns, ad groups, keywords and negative keywords, with budgets, bids and status
  • Spend, impressions, taps, installs and cost per install over any date range
  • Search term reports, impression share and search popularity
  • Why delivery is limited, from Apple’s own reasons
  • Your apps, custom product pages and the account’s change history

What it can change

  • Daily budgets, default bids, and pause or enable on campaigns and ad groups
  • Keywords added, re-bid, paused or removed; negatives added or removed
  • Campaigns, ad groups and ads, created paused
  • Apple’s budget and target CPA recommendations, applied or dismissed
  • Every change is an approval card, then read back from Apple to confirm it landed

When it does not work in Codex

Three things go wrong in this client specifically, and each has a one-line fix.

Codex says the tool is not found.

The config was edited while a session was open. Restart Codex — it reads config.toml at startup.

Login loops without ever completing.

The OAuth callback defaults to http://127.0.0.1/callback. If something else on the machine holds that port, set mcp_oauth_callback_url in config.toml and log in again.

Codex says a change was applied and nothing happened in the account.

It was proposed, not applied — that is the design. The approval is waiting in Sprites; open it there and the run continues from where it stopped.

And on the Apple Ads side

Sprites can report on Apple Ads but every change fails.

The Apple Ads API user is read-only. Give it the API Account Manager role in Apple Ads, then ask again.

Sprites says no Apple Ads ad account is selected.

Open the Apple Ads connection on the Sprites integrations page and pick the ad account the API user can reach.

A keyword in the batch was not added.

Apple rejects keywords one by one, for example a duplicate or a term it does not allow. Sprites reports each rejected keyword and why, and adds the rest.

A new campaign is not serving.

New campaigns, ad groups and keywords start paused, and a campaign needs an ad group and an ad before it can serve. Ask Sprites what is missing.

Apple Ads and Codex: questions

Which URL do I paste into Codex?

https://mcp.sprites.ai/mcp. There is one endpoint and every client uses it — every OAuth grant is bound to exactly that address, so a variant of it will not be honoured.

Can Codex change my Apple Ads account without asking?

Codex renders tool results as text, so a Apple Ads change comes back written out rather than as a card. The approval waits for you in Sprites — open it there and the same run continues. Nothing is applied until you approve it.

Do I need a Apple Ads API key or developer token?

No. Apple Ads is connected once inside Sprites through Apple Ads (an API user key Sprites makes for you), and the connector acts on that connection. You generate no key pair, sign no client secret and refresh no access token, and you never look up an orgId. Codex never sees a credential for it.

Why Codex for Apple Ads specifically?

Marketing work that belongs in a commit: Codex can read the landing page it is about to ship and brief Sprites on the campaign pointing at it, in one session.

Is there an official Apple Ads MCP server?

No. Apple has not published an MCP server for Apple Ads. Community servers wrap the Apple Ads API and run on credentials you set up yourself. Sprites is a hosted MCP server that reads and changes Apple Ads, with every change approved first.

Is Apple Ads the same as Apple Search Ads?

Yes. Apple renamed Apple Search Ads to Apple Ads. Sprites works with App Store campaigns in the same accounts.

Keep going

The same Codex connector reaches every other channel — nothing else to add.

All Apple Ads guides

Apple Ads, from Codex

Paste one URL, sign in once, and the next Apple Ads question you ask Codex gets answered from the live account.