Connect Salesforce to Claude Code
Query records with SOQL, read and update any object through the REST API. Add Toolspoke to Claude Code once and it can use 9 Salesforce actions. Your Salesforce credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Salesforce and connect it
Add Salesforce to a project in your Toolspoke workspace.
Sign in with Salesforce. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Instance URL
- Your org's own API host, the instance_url Salesforce shows in Setup → Company Information, or the host in the address bar once you are logged in. It differs per org, so there is no default that would work.
Choose what Claude Code may do
All 9 actions start on. Switch off any of the 2 actions that change something in Salesforce, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Salesforce actions that only read, so they are safe to try first.
- Run a SOQL query and return the matching records
- Run a SOSL search, full-text matching across several objects at once, which SOQL cannot do
- Fetch one record by its 15 or 18 character Salesforce id, on any object
- List every object in the org, standard and custom, with its API name, label and what can be done to it
What Claude Code can do in Salesforce
7 actions read and 2 write.
Reads
Soql query
Run a SOQL query and return the matching records. This is the main way to read anything out of Salesforce: it reaches every standard and custom object, follows relationships (Account.Name from a Contact), filters, sorts and aggregates. Name the fields you want rather than guessing. SOQL has no SELECT *, and call describe_object first when you are not sure a field exists, because a bad field name comes back as an error rather than as an empty result. Salesforce returns the first 2,000 records and sets done to false when there are more; this connector has no follow-the-cursor operation, so page with LIMIT and OFFSET in the statement itself, or narrow the WHERE clause.
Sosl search
Run a SOSL search, full-text matching across several objects at once, which SOQL cannot do. Use it when you have a name, a phone number or a fragment of an email address and do not yet know which object it lives on; use soql_query when you know the object and the field. The statement carries its own structure, e.g. FIND {Acme} IN ALL FIELDS RETURNING Account(Id, Name), Contact(Id, Name, Email), Lead(Id, Name).
Get record
Fetch one record by its 15 or 18 character Salesforce id, on any object. Ask for the fields you need, without `fields` Salesforce returns every field on the record, which on a customised Account or Case is thousands of tokens of mostly empty columns. Ids come from soql_query, sosl_search or list_recent_items; describe_object lists the field names this object actually has.
Describe object
Return one object's full metadata: every field with its API name, label, data type, whether it is required, and the picklist values it accepts. This is the operation to call before writing anything, because a Salesforce org's schema is whatever its admins built, field names, required fields and picklist values are all local. The response is large; ask for one object at a time.
List objects
List every object in the org, standard and custom, with its API name, label and what can be done to it. Call this first when you do not know what the org calls something: a company's Accounts may be Accounts, or they may have a custom object beside them. Then call describe_object for the one you want. This is also the connection check, because it is a metadata read that touches no records.
List recent items
Return the records the signed-in user viewed most recently, across objects, newest first. Useful as an opening move when somebody says "the opportunity I was just looking at" and gives you nothing else to go on. Returns ids and names only; pass an id to get_record for the rest.
Get current user
Return the identity this connection is signed in as: the Salesforce user id, username, display name, email address and organization id. Call it to confirm which org and which user a write would be attributed to before making one. It needs the `id` scope, which this connector's sign-in requests; list_objects is the check used at install because it needs only `api`.
Writes
Create record
Create one record on any object. `body` is a flat map of field API names to values, exactly as Salesforce takes it, {"Name": "Acme Corp", "Industry": "Technology"} for an Account, {"LastName": "Doe", "Email": "[email protected]", "AccountId": "001…"} for a Contact. Call describe_object first for the field names and for which of them are required; Salesforce rejects the whole create when one required field is missing and names it in the error. Returns the new record's id.
Update record
Change fields on an existing record. Only the fields in `body` are written; everything else is left alone, and null clears a field. Salesforce answers a successful update with an empty 204, so read the record back with get_record if you need to see the result. This cannot delete a record, no delete operation is offered by this connector at all.
Salesforce in Claude Code: questions
Does Claude Code see my Salesforce credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Salesforce?
Yes. Each of the 9 actions can be switched off for a project. Turn off the 2 that change something and Claude Code can only read.
Will 9 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Salesforce action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Salesforce call does not run in a sandbox, so it bills nothing.
Salesforce in your other apps
More crm toolkits for Claude Code
Try Salesforce in Claude Code
Free to start, and tool calls cost nothing on any plan.