Salesforce is where pipeline, forecast, account, and activity context often already lives, but the useful story is usually buried across records, reports, and follow-up tasks. A Salesforce AI assistant is most useful when it helps revenue teams review opportunities, understand account history, spot missing next steps, and turn CRM movement into clear Slack updates without living inside the CRM all day.
How OpenClaw Integrations Work
OpenClaw is a self-hosted AI assistant that runs on your own server — typically an EC2 instance — and connects to Slack. It uses Claude under the hood to process requests. Out of the box, OpenClaw doesn't ship with pre-built connections to third-party tools. Instead, integrations are built using the skills system: markdown files in ~/.openclaw/skills/ that give Claude instructions for a particular domain, combined with HTTP tool calls to any API you expose to it.
In practice, adding a real integration means: getting API credentials from the third-party service, building or configuring a small proxy/endpoint that OpenClaw can call, and writing a skill file that tells Claude how to use it. For some tools this is an afternoon of work. For others — like Salesforce — it's considerably more involved.
Connecting OpenClaw with Salesforce: Step by Step
Step 1: Create a Salesforce Connected App
In Salesforce Setup → App Manager → New Connected App. Enable OAuth, add the callback URL for your proxy, and select the OAuth scopes you need (at minimum: api, refresh_token). After saving, note the Consumer Key and Consumer Secret — these are your OAuth credentials.
Step 2: Implement OAuth 2.0 or Use a Named Credential
For a service-to-service integration, the OAuth 2.0 Username-Password flow or JWT Bearer flow is simplest (though the Username-Password flow may be disabled in stricter orgs). Alternatively, Salesforce Named Credentials can manage auth for you. Your proxy needs to handle token refresh — Salesforce tokens expire.
Step 3: Build SOQL Queries and the Proxy
Salesforce's REST API accepts SOQL (Salesforce Object Query Language) via /services/data/v58.0/query?q=SELECT+.... Write a proxy that translates your common queries into SOQL. Write ~/.openclaw/skills/salesforce.md with your key object names, fields, and the SOQL patterns that answer common team questions.
Challenges and Caveats
Governor Limits Are Real
Salesforce enforces governor limits on API calls per day based on your edition and number of licenses. Exceeding them blocks all API access until the limit resets. Design your proxy to cache results and avoid unnecessary calls.
SOQL Is Powerful but Error-Prone
Claude can generate SOQL queries from natural language, but SOQL has specific requirements around relationship queries, subqueries, and aggregate functions. Expect to debug Claude's SOQL output during the initial skill tuning phase.
Sandbox vs Production
Salesforce has separate sandbox and production environments with different OAuth endpoints. Make sure your proxy is configured for the right environment and that you've tested in sandbox before touching production.
Salesforce + OpenClaw in 2026: There Are Two Official Servers, and One of Them Dies on November 2nd
The base template above describes the classic route: create a Connected App, run OAuth, write a SOQL proxy, drop a ~/.openclaw/skills/salesforce.md file. That path still works, but in 2026 it is no longer the shortest one, and two facts have changed under it.
Fact one: Salesforce now ships its own remote MCP servers. You do not have to write a proxy at all.
Fact two: the local Salesforce developer MCP server — the one every "Salesforce MCP" tutorial shows you installing with npx @salesforce/mcp — reaches end of life on 2 November 2026. Salesforce says so in the very first block of the repository README, and links issue forcedotcom/mcp#46 for the details. If you follow a 2025-era guide today, you are installing something that is being taken away, and you will find out at the worst possible moment.
This page is the version that accounts for both.

The three things called "the Salesforce MCP server"
They have different permission models, different authentication, and — critically — different billing. Getting them mixed up is the single most common reason a Salesforce agent "works" in a demo and then costs money or gets refused in production.
| What | Where it runs | Auth | What it can touch | Cost model |
|---|---|---|---|---|
| Hosted MCP Servers | Salesforce-hosted, per server URL | Per-user OAuth 2.0 + PKCE through an External Client App | Org data, custom tools, Data 360, Tableau Next, CRM Analytics, Prompt Builder templates | Flex Credits — server usage is billable |
Salesforce DX MCP Server (@salesforce/mcp) |
Local npx subprocess on your machine |
Your local sf CLI org authorization |
Developer workflows: metadata deploy/retrieve, Apex tests, SOQL, LWC scaffolding, Code Analyzer | Free (open source), but EOL 2 Nov 2026 |
| A hand-built REST proxy | Your own server | Whatever you build | Whatever you expose | Your hosting bill |
For an OpenClaw agent that answers revenue questions in Slack — pipeline, forecast, account history, "what happened with this deal" — you want the Hosted MCP Servers. The DX server is for people deploying Apex, not for people asking about opportunities. A hand-built proxy is for the cases the hosted servers structurally cannot cover, which are covered below.
Two Claude-specific caveats worth stating plainly, because they are easy to miss: the hosted servers are disabled by default and an administrator has to enable them, and they are intended only for customers with Flex Credits — Salesforce documents that you may be billed for server usage. Get Flex Credits from your account executive or through Salesforce Foundations before you design a workflow around this.
Why "per-user OAuth" is the whole security story
Salesforce's own general-best-practices page argues that building a custom proxy around the REST APIs instead of the hosted server "undermines those guarantees: it bypasses the platform's security controls, removes request-level telemetry, and creates a maintenance burden." That is Salesforce marketing its own product, but the underlying mechanism is real and worth understanding before you decide where credentials live.
Every hosted MCP tool call runs as the user who authorized the connection. Not as an integration user. Not as a service account. That means:
- the same object-level CRUD permissions as that person,
- the same field-level security (a field hidden from their profile is hidden from the agent),
- the same sharing rules — records they cannot see in Lightning, the agent cannot see either,
- and full named-user attribution in the audit trail.

And the enforcement is architectural, not advisory. Salesforce states that the system uses the authorization code flow exclusively, with PKCE mandatory, and that dynamic client registration is not supported — an administrator must create each External Client App by hand. Salesforce's own words: "There are no service accounts, no machine-to-machine flows, and no autonomous operation outside of user context."
Read that sentence twice if you are planning a nightly job. An unattended 3am pipeline report has no user context to borrow. It cannot run through the hosted servers as written. That is not a bug in your config — it is the design. The two honest options are a scheduled job that authenticates as a real named user via a refresh token you own and monitor (fragile if that user leaves or their password policy rotates), or the REST API with an integration user, which is exactly the "custom proxy" Salesforce discourages for interactive use but which remains the correct tool for autonomous batch work. Choose deliberately rather than discovering it on Monday morning.
The audit trail detail that makes this deployable
Salesforce tags hosted-MCP traffic in the standard API logs, so security teams can find it without guessing. Filter API logs on:
API_CLIENT_CATEGORY = SALESFORCE_HOSTED_MCP
Those logs are downloadable as CSV daily or retrievable programmatically, and they record which operations an agent performed on whose behalf, which objects were touched, and the timestamps. If your security review has a question "how would we know if an agent did something unexpected," that filter is the answer, and it is worth having it in the answers document before anyone asks.
Which server to enable, and why the default is wrong
Salesforce ships several pre-configured servers with fixed tool sets you cannot modify. Standard servers are disabled by default; an admin enables them. The ones that matter for a Slack working assistant:
| Server | Package name | Access | Use it when |
|---|---|---|---|
| SObject Reads | platform/sobject-reads |
Read + query only, no mutations | Default for any assistant that answers questions. Start here. |
| SObject All | platform/sobject-all |
Full CRUD, query, search | You have a specific write workflow and approvals in place |
| SObject Mutations | platform/sobject-mutations |
Create + update, no delete | Agents that add tasks/notes but must never delete |
| SObject Deletes | platform/sobject-deletes |
Delete only | Almost never for a first deployment |
| Data 360 | — | SQL over unified customer data | You actually run Data 360 |
| Tableau Next | analytics/tableau-next |
Semantic models, KPIs, dashboard metadata | Analytics questions beyond CRM objects |
| CRM Analytics (Beta) | — | SAQL queries, dataset schemas, dashboard/lens metadata | Sandbox and scratch orgs only |
| Name | — | Prompt Builder templates as MCP prompts | You want admin-approved prompts, not free-form ones |

The practical recommendation: enable platform/sobject-reads and nothing else for the first two weeks. Every server you enable is a tool surface an agent can reach, and the fixed tool sets mean you cannot trim them afterwards. Read-only first also gives you a clean baseline — if an answer is wrong during that period, it is a reasoning or data problem, never a mutation you did not intend.
Turning Salesforce objects and logic into MCP tools without new code
The hosted servers go further than "here are your objects." Existing platform assets can be surfaced as custom tools with no connector code:
- Apex
@InvocableMethodclasses — the right home for business logic, validation, and multi-step operations @AuraEnabledApex methods — if you already have Lightning components backed by controller methods, those same methods become agent tools@RestResourceApex REST endpoints — existing custom REST APIs are callable- REST API endpoints registered in the Salesforce API Catalog — standard platform APIs plus a growing subset of product Connect APIs (authored by Salesforce; customers cannot add their own)
- Flows — declarative automation you already built becomes invocable
- Prompt Builder templates — admin-curated prompts surface as MCP prompts
Salesforce's own guidance on tool granularity is unusually good and worth quoting because it names both failure modes: mapping every internal API to a tool is too granular ("if your tool surface requires an agent to call tools in a prescribed order to accomplish anything useful, it's too granular"), while a tool that creates, scores, and routes a lead in one call is too coarse. The test they give: does one tool call produce a self-contained, useful result? "Retrieve an opportunity with its related contacts and recent activity" passes; "get opportunity ID" does not.
One trap that will bite: if you build a custom read-only tool, set readOnlyHint: true explicitly. The spec default for an unannotated tool is "possibly destructive and open-world," so clients that respect annotations will show a confirmation prompt for a query that changes nothing. Salesforce's platform tools ship with correct annotations; your Flow- and Apex-backed ones only do if you set them.
Connecting it: the External Client App is the gate
Connected Apps do not work here. Salesforce is explicit: use an External Client App (ECA), one per MCP server configuration, and Connected Apps are not supported for MCP authentication. This is the step where most setups fail, because the older Salesforce OAuth muscle memory points at the wrong Setup page.

The steps, in Salesforce's order, with the parts that actually go wrong flagged:
- Setup → External Client App Manager → New External Client App. Basic information first.
- Enable OAuth under the API section.
- Callback URL must match the client you are using, and it must match exactly:
- Claude:
https://claude.ai/api/mcp/auth_callback - Cursor:
http://localhost:8787/callbackon recent versions,cursor://anysphere.cursor-mcp/oauth/callbackon older ones — add both if the field allows it - Postman:
https://oauth.pstmn.io/v1/callback(browser version:https://oauth.pstmn.io/v1/browser-callback) - ChatGPT: copy the value out of ChatGPT's Advanced settings
- Claude:
- OAuth Scopes — two, and both are required: Access MCP servers (
mcp_api) and Perform requests at any time (refresh_token). - Security — select Issue JSON Web Token (JWT)-based access tokens for named users, and deselect every other option that would require contacting Salesforce support to undo.
- Create, then wait. Salesforce documents that an External Client App can take up to 30 minutes to become usable — "similar to registering a new domain with DNS." If authentication fails immediately after creation, that timing is the first thing to check, not your callback URL.
- Copy the Consumer Key from OAuth Settings. This is what your MCP client needs alongside the server URL.
Two org-specific gotchas: you cannot create an ECA in a scratch org through the Setup UI — create it in a developer hub org, package it, then install it — and for production you can additionally require a client secret, which Salesforce recommends only for web-based clients where the secret stays server-side (embedded secrets in desktop apps can be pulled out by decompilation).
Test with Postman before you test with a language model. Salesforce recommends this directly and the reason is sound: Postman calls tools and returns raw JSON with no model in between, so you can separate "the server refused my auth" from "the model answered confidently from its training data." Those two look identical in a chat window.
What this looks like in OpenClaw
OpenClaw connects to remote MCP servers over Streamable HTTP with a URL and an OAuth login. For Salesforce that means: paste the hosted server URL, run the OAuth flow, and approve as a named user in the org you want to query.
{
mcpServers: {
salesforce: {
// use the exact server URL from Setup for the server you enabled
// (e.g. the SObject Reads server), not a guess at the hostname
url: "https://<your-org-mcp-server-url>/mcp",
transport: "streamable-http"
}
}
}
Two notes that save an afternoon:
- The server URL comes from Setup, not from documentation. Each enabled server has its own URL, and they differ per org and per server package. Copy it from the org where you enabled it.
- The OAuth login binds to the browser account you approve with. Same failure mode as any PKCE flow: you complete the flow in a browser where you happen to be logged in as someone else, and then every answer is filtered through that person's sharing rules. If an agent "cannot see" opportunities it should see, check whose token you are using before you debug SOQL.
| MCP client | Notable requirement |
|---|---|
| Claude | Native MCP connector, no extra software |
| ChatGPT | Developer mode + connectors; callback URL comes from Advanced settings |
| Cursor | Native OAuth; callback URL varies by version |
| Postman | Recommended for first test, raw JSON, no model |
| Agentforce Vibes | Auto-enabled, no ECA needed |
Five things worth asking it on day one
The first four are read-only and map directly onto what a revenue team asks at 9am. The prompts assume you enabled platform/sobject-reads and nothing more.
1. The Monday pipeline briefing.
"Pull every open opportunity closing this quarter over $25k, with owner, stage, amount, close date, and last activity date. Group by stage, flag anything with no activity in 14 days, and tell me the three biggest deals that have slipped a close date in the last 30 days."
This is the workflow that justifies the whole setup. The slippage flag comes from opportunityhistory — ask for it explicitly, because a plain opportunity query returns the current close date and silently hides that it moved twice.
2. Account context before a call.
"Give me a one-page brief on Acme Corp: open opportunities, all contacts with titles, the last five activities across the account, and any cases opened in the last 90 days. Note anything that looks like an unresolved complaint."
The "one page" constraint matters more than it sounds. Without it an agent will happily dump 200 activities and call it a brief.
3. Forecast sanity check.
"Compare this quarter's committed pipeline (Commit and Closed Won) against last quarter's actual closed business. Show the gap by owner and highlight any opportunity in Commit whose next step is blank or whose close date is in the past."
Blank next step is the cheapest proxy for "nobody is actually working this," and it is a filter no dashboard gives you by default.
4. Whitespace on an existing customer.
"For our top ten accounts by closed-won revenue over the last four quarters, list which product families they have bought and which they have not, and flag any account where we have no open opportunity."
5. The one that should require a human click.
"Create a follow-up task on the Acme renewal opportunity for Friday, assigned to the account owner, with a note summarising the last three calls."
On a reads-only server this will simply fail, which is the correct outcome while you are still calibrating. When you do enable a mutation server, the standard discipline applies: have the agent draft the task and post it to Slack for confirmation, and treat the write as a separate approved action. Salesforce's annotation system gives clients the signal to prompt for destructive operations, but annotations are hints — "not all clients read or respect them" — so the human-in-the-loop layer has to be yours.
Eight Salesforce-specific pitfalls
-
The DX server expires on 2 November 2026. Anything you built on
npx @salesforce/mcpneeds a migration plan now. The README states it plainly at the top of the file; most tutorials still do not. -
Connected Apps are rejected for MCP. The OAuth setup that worked for every other Salesforce integration will not work here. It has to be an External Client App, one per server configuration.
-
A brand-new External Client App can fail for up to 30 minutes. Salesforce documents this. Do not rebuild your configuration during that window.
-
There is no unattended path through the hosted servers by design. Authorization code flow only, PKCE mandatory, no service accounts, no machine-to-machine. A nightly self-serve report needs either a monitored refresh token for a named user or the REST API with an integration user. Decide which, deliberately.
-
DEFAULT_TARGET_ORGis resolved per call, not pinned at startup (this is DX-server behaviour, and it is a real footgun while you migrate). Switching your default org in another terminal changes which org the agent can reach mid-session. Pin explicit usernames or aliases instead of the default tokens. -
Flex Credits billing is per usage, and easiest to hit with a verbose agent. An agent that "just checks a few more things" turns one question into dozens of tool calls. Constrain prompts ("answer from at most three queries, then stop") and prefer a narrow custom tool over a broad object surface.
-
CRM Analytics MCP is sandbox- and scratch-org-only. If someone asks for a production analytics workflow through it, the answer is no — and the doc says so in one line that is easy to miss.
-
Your sharing model is now your agent's model. If a rep cannot see a record in Lightning, the agent answering as that rep cannot either — and the failure looks like a bad query, not a permission. Before tuning anything, confirm which user token the agent holds and what that user's role sees.
When this is the wrong tool
If what you actually want is "our team asks a question in Slack and gets an answer from Salesforce," the MCP server is a means, not the goal — and it puts the entire integration, the OAuth app, the server enablement, the Flex Credits meter, and the permission calibration on your team to maintain. A hand-rolled proxy only gets worse: Salesforce's own guidance says a custom proxy bypasses security controls, loses request-level telemetry, and grows more maintenance as the API surface moves.
If you would rather not own any of that, Cody gives your team a Salesforce assistant in Slack — pipeline review, account history, follow-up gaps, forecast risk — without creating External Client Apps, enabling servers, or writing SOQL.
Also read
- Connecting OpenClaw with HubSpot: A Practical Guide — the same job on a CRM with a very different permission model
- Connecting OpenClaw with Pipedrive: A Practical Guide — the lightweight alternative for smaller sales teams
- Connecting OpenClaw with Close CRM: A Practical Guide — built for high-volume outbound
- How to Connect Salesforce to OpenClaw: Setup, Models, and Workflow Guide — the setup-focused cross-reference
- How to Connect Salesforce to ChatGPT — the ChatGPT-side connector path
- Salesforce MCP — the server-focused deep dive
Skip All of This — Use Cody Instead
Cody gives your team a Salesforce assistant in Slack, so reps and leaders can review opportunities, account history, follow-up gaps, and forecast risk without wiring Connected Apps, writing SOQL, or maintaining CRM integration glue.
Related Guides
- Connecting OpenClaw with Hubspot: A Practical Guide
- Connecting OpenClaw with Pipedrive: A Practical Guide
- Connecting OpenClaw with Close Crm: A Practical Guide
Need the model-flexible version? See: How to Connect Salesforce to OpenClaw: Setup, Models, and Workflow Guide.