Sprites MCP · Salesforce MCP server · Codex

How to connect Salesforce to Codex

To connect Salesforce to Codex, add https://mcp.sprites.ai/mcp as a remote MCP server in Codex, sign in to Sprites, and Codex can read your Salesforce 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

Set a goal of 20 won deals in Salesforce this quarter.

Spritesrun_taskrunning
SpritesSalesforceNeeds your approval
  • MetricSalesforce deals won
  • Target20 this quarter
  • Won so far7
Read-only · nothing changed in SalesforceSee the goal

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 Salesforce already connected — the connector acts on that connection, so Codex never handles a Salesforce credential.

  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 Salesforce to Codex yourself means a Salesforce REST API (SOQL) 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 scope

Lets an app call the REST API as the signed-in user, within that user’s permissions.

refresh_token scope

Keeps the connection alive without asking you to sign in again.

Connected App

The do-it-yourself route registers its own app in Setup, with its own consumer key and secret.

What Sprites asks for when you connect

Salesforce sign-in with the api and refresh_token scopes. Sprites only runs aggregate read queries for leads, opportunities and won deals; it writes nothing.

What you skip

You register no Connected App and handle no consumer secret. Codex signs in to Sprites with OAuth and never holds a Salesforce credential.

Official Salesforce MCP vs Sprites MCP

Salesforce runs its own MCP server at Enabled by an admin in Salesforce Setup. Here is what each one covers, so you can pick the one that fits in Codex — or connect both.

Salesforce runs its own hosted MCP servers, generally available for Enterprise Edition orgs and above. They are off by default until an admin enables them in Setup, where admins can also create custom servers. Salesforce also ships the DX MCP server (@salesforce/mcp), a developer tool it labels beta. Neither knows anything about your ad accounts.

Salesforce’s official Salesforce Hosted MCP Servers compared with the Sprites MCP server
Salesforce officialEnabled by an admin in Salesforce SetupSprites MCPapproval-gated
StatusHosted servers generally available; DX server labelled betaAvailable now on every paid plan
SetupAn admin enables servers in Salesforce SetupSign in to Salesforce once inside Sprites
ReachesYour Salesforce orgSalesforce beside Google Ads, Meta, LinkedIn, TikTok, Reddit, GA4 and SEO
Salesforce accessSet by the servers your admin enablesRead-only: api and refresh_token scopes, no write tool
AttributionCRM data onlyWon deals and pipeline counted against the ad spend
CostAimed at Flex Credits customers; usage may be billedIncluded with Sprites; CRM integration is a Scale plan feature

If you want an agent working inside Salesforce itself, querying and acting on records, Salesforce’s own servers are built for that. Use Sprites when the question is a marketing one: are the leads and won deals the ad accounts should be producing arriving, and what to change in those accounts if not, with Salesforce itself left untouched.

Why run Salesforce 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.

The CRM next to the ad accounts

A Salesforce-only connector answers with Salesforce. Sprites reads it beside Google Ads, Meta and LinkedIn, so a goal on won deals sits next to the spend, and the budget move it implies is the next question.

Every channel on one connector

Read-only by scope

Sprites asks Salesforce for the api and refresh_token scopes and ships no tool that writes to it. Nothing about Salesforce can be changed from a prompt, however it is phrased.

Your records stay in Salesforce

Numbers are read live with aggregate queries when asked. Sprites keeps no synced copy of your leads or opportunities, and a failed read keeps the last good numbers rather than showing a wrong one.

Run the first prompt

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

  • With Sprites, set a goal of 20 won deals in Salesforce this quarter.
  • Ask Sprites how many new Salesforce leads came in this month next to our ad spend.
  • Use Sprites to track Salesforce pipeline created against our LinkedIn budget.
  • Check with Sprites whether Salesforce is connected on this workspace.

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

Running Salesforce 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. Won deals goal

    You, in CodexWith Sprites, set a goal of 20 won deals in Salesforce this quarter.

    Sprites does
    Creates a goal on the Salesforce deals-won series and reads progress from Salesforce by close date.
    You get back
    A goal with its current count and pace, beside the spend in your ad accounts.
  2. Pipeline against budget

    You, in CodexAsk Sprites to track Salesforce pipeline created against our LinkedIn spend.

    Sprites does
    Reads opportunities created and their amount per day from Salesforce, and the matching spend from the ad account.
    You get back
    Pipeline created per day next to spend, so a slow week shows up with its cause.

What Codex can do with Salesforce

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.

Salesforce next to the ad accounts

Salesforce sits beside Google Ads, Meta and LinkedIn in the same Sprites workspace, so a goal on won deals or pipeline is judged against the spend that should have produced it, not a click count.

Five numbers, read live

New leads, opportunities created, pipeline created, deals won and won value, each as a daily series. They are read from Salesforce when asked with aggregate queries, with no sync and no stored copy of your records.

Days that match your reports

Created dates are counted in the connected user’s own calendar day, and won deals by close date, which is how that user’s Salesforce reports count them. Multi-currency orgs stay in one currency, with a warning when deals were converted.

Goals on CRM outcomes

Ask for a goal such as 20 won deals this quarter and Sprites tracks it from Salesforce itself, so the target is a revenue outcome rather than a form fill.

Nothing is written to Salesforce

The connection asks Salesforce for the api and refresh_token scopes and Sprites ships no tool that writes a lead, opportunity or note. The changes Sprites proposes land in your ad accounts, each as an approval card.

How approvals work here

Codex renders tool results as text, so a Salesforce 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

  • New leads per day
  • Opportunities created per day, with their summed amount (pipeline created)
  • Opportunities won per day, by close date, with their summed amount (won value)
  • Currency, in multi-currency orgs, so sums stay in one currency

What it can change

  • Nothing is written to Salesforce: the connection is read-only
  • No leads, opportunities, notes or fields are created, edited or deleted
  • Ad-account changes that follow from the numbers are approval cards in Google Ads, Meta or LinkedIn

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 Salesforce side

Salesforce says Sprites cannot stay connected.

Sprites needs the refresh_token scope. Ask your Salesforce admin to allow it for the Sprites app, then reconnect on the Sprites integrations page.

Numbers are missing and Salesforce reports an API error.

The Salesforce user needs "API Enabled", and the org’s rolling 24-hour API allowance may be spent. Sprites keeps the last good numbers and tries again later.

My sandbox or My Domain org will not connect.

Choose sandbox when you sign in, or use your org’s My Domain address. Government Cloud and China orgs are not supported yet.

Won value looks different from a Salesforce report.

Sprites sums the Amount field in your org’s corporate currency and counts won deals by close date. A report built on a different field or date will differ.

Salesforce 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 Salesforce account without asking?

Codex renders tool results as text, so a Salesforce 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 Salesforce API key or developer token?

No. Salesforce is connected once inside Sprites through Salesforce (OAuth, read-only: api and refresh_token scopes), and the connector acts on that connection. You register no Connected App and handle no consumer secret. Codex never sees a credential for it.

Why Codex for Salesforce 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 Salesforce MCP server?

Yes, two. Salesforce Hosted MCP Servers are generally available for Enterprise Edition orgs and above, and an admin has to enable them in Setup. The Salesforce DX MCP server (@salesforce/mcp) is an open-source developer tool that Salesforce labels beta. Sprites is a separate MCP server that reads Salesforce beside your ad accounts and never writes to it.

Which Sprites plan includes Salesforce?

The pricing page lists CRM integration, covering Zoho CRM, HubSpot, Salesforce and Pipedrive, as a Scale plan feature. The MCP server itself comes with every paid plan.

Keep going

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

All Salesforce guides

Salesforce, from Codex

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