Skip to content

Connect Salesforce to Claude Code

Give the terminal task the account context it is missing. Claude Code reads the live org, stages the change, and deploys it with the test level you choose, with every call visible in your activity.

7 days free · No card required

How to connect Salesforce 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. Choose Claude Code

ApexGenius Start with Claude Code selected, the MCP address to copy, and the short setup steps.
Choose Claude Code. Back on Start, pick Claude Code and copy the setup command.

5. Approve access

ApexGeniusapexgenius.ai/authorizeFull size (opens in a new tab)
The ApexGenius authorization screen for Claude Code with the Full access, Read only, and Custom choices.
Approve access. ApexGenius opens its approval page. Choose Full access, Read only, or Custom, 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.

Additional reference: the Salesforce setup guide.

Start free

What it looks like in Claude Code

An illustrative read-only request and response. Your results 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

What you can ask once it is connected

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.

You choose what Claude Code is allowed to touch

Choose the saved accounts and tools this Claude Code connection may use. Its authorization carries that scope, and each business connection’s tool and resource restrictions still apply.

  • Full accessEvery enabled tool on the connections you choose.
  • Read onlyLooks things up, changes nothing.
  • CustomPick apps and tools one by one.
  • · 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.
  • · Server-enforced Auto, Ask, and Off approval modes are in development.

The Salesforce operations Claude Code can run

21 operations: 11 Read and 10 Write. Available tools depend on your connection and permissions. Review any action that changes or removes data. Claude Code discovers these operations through the ApexGenius gateway.

  • list_projectsReadList accessible Salesforce connections and their environment details.
  • query_soqlReadRun SOQL and return selected Salesforce fields.
  • get_recordReadRetrieve one record by object type and ID.
  • list_objectsReadList accessible Salesforce objects.
  • describe_objectReadReturn fields, types, picklists, relationships, and permissions.
  • search_recordsReadSearch records across Salesforce objects.
  • read_fileReadRead one staged component or documentation file.
  • list_filesReadList staged or documentation files with an optional folder or pattern filter.
  • grepReadSearch staged file names or contents.
  • check_deploy_statusReadRead deployment status, component results, and test details.
  • list_live_metadataReadList live components of one metadata type in the selected org.
  • create_recordWriteCreate one Salesforce record.
  • write_fileWriteCreate or overwrite a Salesforce metadata component or Markdown document in private staging.
  • edit_fileWriteReplace exact matching content in a staged Salesforce metadata component or document.
  • cancel_deployWriteCancel an in-progress Salesforce deployment.
  • get_live_componentWritePull one live component into the private staging workspace.
  • update_recordWriteUpdate selected fields on one Salesforce record.
  • delete_recordWriteDelete one Salesforce record by ID.
  • execute_anonymous_apexWriteExecute supplied anonymous Apex, which can change or delete data.
  • delete_fileWritePermanently remove one staged component or documentation file.
  • deployWriteDeploy selected staged files with the requested Salesforce test level.

Questions people ask first

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.

Do I need my own Salesforce connected app?

No. You sign in with Salesforce OAuth and ApexGenius holds the authorization for the connection, refreshing it as Salesforce requires.

Can I connect production and a sandbox at the same time?

Yes. Each org is its own Salesforce connection, and an AI agent can be scoped to one of them, both, or neither.

Can an agent delete records or deploy without me?

The operation must be enabled in the access you authorize. Choose Read only to exclude writes. Delete, anonymous Apex, and deploy carry risk labels; confirmation behavior depends on the tool and AI client, with no universal server-side human-approval guarantee.

Is my Salesforce data stored by ApexGenius?

The ordinary MCP path does not intentionally retain record results. Operational, connection, credential, usage, and audit data is retained so activity can be reviewed.

Which AI agents can use this connection?

Codex starts in Plugins in the ChatGPT desktop app. Claude, Claude Code, Cursor, VS Code, and ChatGPT Work each have their own setup guide. Authorize the saved Salesforce connection separately for each AI client; availability and controls vary.

Connect Salesforce to Claude Code today

Start free

7 days free. No card required. Disconnect any time.