Skip to content

Connect Claude Code to Salesforce

Connect Claude Code to Salesforce through ApexGenius. Query records, inspect schema, and stage and deploy Apex and Flows with your org permissions.

1,000 free credits · No card required

How to connect Salesforce to Claude Code

FirstConnect Salesforce to ApexGenius

ThenConnect ApexGenius to Claude Code

Watch the connection

14-second loop · Silent, with captions

Read the steps Follow along at your own pace

1. Create your account

ApexGenius signup page with Continue with Google and the email form.
Create your account. Open apexgenius.ai/signup and continue with Google or your email.

2. Choose Salesforce

ApexGenius Start with Salesforce selected, the Production and Sandbox choice, and the Connect Salesforce button.
Choose Salesforce. On Start, pick Salesforce, choose Production or Sandbox, then click Connect Salesforce.

3. Allow access

The Salesforce Allow Access screen listing what ApexGenius is asking for, with Deny and Allow buttons.
Allow access. Salesforce opens its sign in page. Sign in there and click Allow.

4. Copy the MCP address

ApexGenius Start with the API key tile selected and Manual setup open, showing the MCP address to copy.
Copy the MCP address. On Start, pick API key, open Manual setup, and copy the MCP address.

5. Approve access

ApexGeniusapexgenius.ai/authorizeFull size (opens in a new tab)
The ApexGenius authorization screen for Claude Code: the apps it can use, the Read only, Full access, and Custom choices, and the Approve button.
Approve access. ApexGenius opens its approval page. Review the access, then approve.

In Claude Code: Add the ApexGenius remote HTTP MCP server, run /mcp, and complete the authorization in your browser on the same machine. Claude Code MCP guide (opens in a new tab)

~ % claude mcp add --transport http apexgenius https://server.autom8.pro/mcp
Added HTTP MCP server apexgenius with URL: https://server.autom8.pro/mcp to local config

~ % claude mcp get apexgenius
apexgenius:
  Scope: Local config (private to you in this project)
  Status: ! Needs authentication
  Type: http
  URL: https://server.autom8.pro/mcp

Real command output, captured September 2026.

What it looks like in Claude Code

Illustration of a task, not a recorded customer result. Your answers come from the account and dates you choose.

How the route works
Claude Code
Claude CodeApexGenius MCP route
Which opportunities over 50k are closing this month and who owns them?
ApexGenius
Working with ApexGenius1 tool search · 2 reads
RequestOpen opportunities
Account scopeAuthorized connections checked
apex_search_toolsSalesforce records · Find the Salesforce read pathComplete
Salesforceapex_call_read_toolquery_soql · Query opportunities closing this monthComplete
Salesforceapex_call_read_toolquery_soql · Read owner namesComplete
Claude Code

Six opportunities over 50k close this month. Four belong to Priya Shah, two to Marcus Lee. The largest is Acme Renewal at 180k, stage Negotiation. Nothing was changed.

Read-only route
Claude Code

Try asking

Which Apex classes reference Opportunity.StageName?

Pull the Account trigger into staging and explain what it changes.

Run the test class for OpportunityTriggerHandler and show me the failures.

Deploy the staged Flow and check the deployment result.

What Claude Code can do in Salesforce

21 operations: 11 read, 10 write. Read looks things up and changes nothing. Writes change Salesforce and run only when you turn them on.

Connection context

1 read
  • list_projectsread

Records and schema

5 read · 3 write
  • query_soqlread
  • create_recordwrite
  • update_recordwrite
  • delete_recordwrite
  • get_recordread
  • list_objectsread
  • describe_objectread
  • search_recordsread

Apex runtime

1 write
  • execute_anonymous_apexwrite

Staging and documentation

3 read · 3 write
  • read_fileread
  • write_filewrite
  • edit_filewrite
  • delete_filewrite
  • list_filesread
  • grepread

Live metadata and deployment

2 read · 3 write
  • deploywrite
  • check_deploy_statusread
  • cancel_deploywrite
  • list_live_metadataread
  • get_live_componentwrite

You choose the access. When you approve Claude Code, pick Full access, Read only, or Custom.

The selected Salesforce connection remains visible in the gateway workspace.

Tool availability is resolved for the current connection and account context.

Supported Salesforce write activity is recorded for review.

Turn a tool off to block calls. Enabled tools run when called.

Start free

Questions about connecting Claude Code to Salesforce

Updated August 26, 2026.

Does a shared project file share my Salesforce access?

No. The server entry can be shared, but authorization belongs to the person. Each teammate authorizes their own Salesforce connection.

Why does /mcp say needs authentication?

That is the expected first state. Run the authorization from that prompt and approve it in a browser on the same machine; after that /mcp shows the server as connected.

How do I connect Claude Code to Salesforce?

Connect Claude Code to Salesforce through ApexGenius in three steps. Sign in to ApexGenius and connect Salesforce with Salesforce OAuth, choosing Production or Sandbox. Add ApexGenius to Claude Code. Then open a task in Claude Code and ask a question about your Salesforce. Start with a read, so nothing changes.

Is there a Salesforce MCP server for Claude Code?

Yes. ApexGenius is an MCP server that Claude Code connects to once. It carries your Salesforce connection and 21 Salesforce operations, so Claude Code does not need a separate Salesforce integration or plugin. You set it up one time and add each agent the same way.

What can Claude Code do in Salesforce once it is connected?

Claude Code can run 21 Salesforce operations through ApexGenius: 11 reads that list connections and objects, describe the schema, query and search records, and check deployments, and 10 writes that create, update and delete records, run Apex, edit staged files and deploy metadata.

Can Claude Code read my Salesforce org?

Yes, the org you authorize. Each org is its own Salesforce connection, Production or Sandbox, and you sign in with Salesforce OAuth. You can limit Claude Code to one connection, to both, or to neither. ApexGenius keeps the org visible, so you can check which one Claude Code is using.

Connect Salesforce to Claude Code today

Start free

1,000 free credits. No card required. Disconnect any time.