Featured Solution

Connecting Claude to Salesforce with MCP, Step by Step

What You Will Build

By the end of this guide, your team will be able to open Claude and ask questions like "Show me open opportunities over 50,000 closing this quarter" — and get answers from live Salesforce data.

We use Salesforce Hosted MCP Servers. They are run by Salesforce, so there is no server for you to host or maintain. Users sign in with their own Salesforce login, and their normal permissions apply.

If you are new to MCP, read our article "What is MCP, and Why It Matters for Your Salesforce Data" first.

Before You Start

  • A Salesforce org where you have admin access. Start in a sandbox, not production.
  • A Claude account that can add custom connectors (or Claude Code, for developers).
  • About 20 minutes.

Step 1: Activate an MCP Server in Salesforce

  1. In Salesforce, go to Setup and search for MCP Servers.
  2. Open the Salesforce Servers tab. Standard servers are inactive by default.
  3. Click the server you want — for example, sobject-all, which works with standard and custom object records — and click Activate.
  4. Copy the Server URL. Production and sandbox URLs are different, so always copy it from Setup rather than typing it.

Step 2: Create an External Client App

The External Client App controls which outside apps can connect to your org and what they may do.

  1. Go to Setup → External Client App Manager and click New External Client App.
  2. Name it something clear, such as Claude MCP Client, and add a contact email.
  3. Under API (Enable OAuth Settings), enable OAuth and set the Callback URL:
    • Claude app: https://claude.ai/api/mcp/auth_callback
    • Claude Code: http://localhost:38000/callback
  4. Add these OAuth scopes: mcp_api and refresh_token, offline_access.
  5. Under Security, turn on PKCE, turn off "Require secret" for the Web Server Flow and Refresh Token Flow, and enable JWT-based access tokens for named users.
  6. Click Create. Then open Settings → OAuth Settings → Consumer Key and Secret, verify your identity, and copy both values.

Tip: Treat the consumer secret like a password. Don't paste it into chats, emails, or documents.

Step 3: Add the Connector in Claude

In the Claude app

  1. Open Settings → Connectors and choose to add a custom connector.
  2. Give it a name, for example Salesforce, and paste the Server URL from Step 1.
  3. In the advanced settings, enter the Consumer Key as the OAuth Client ID and the Consumer Secret as the Client Secret.
  4. Click Connect. A Salesforce login window opens — sign in and click Allow.

Menu names in the Claude app can change slightly over time, but the information you need is always the same: server URL, client ID, and client secret.

In Claude Code (for developers)

bash
claude mcp add --transport http salesforce-sobject-all <server-url> \
  --callback-port 38000 \
  --client-id "<consumer-key>" \
  --client-secret

Paste the consumer secret when prompted. Then start claude, run /mcp, select the server, choose Authenticate, and allow access in the browser.

Step 4: Test It

Start with simple, read-only questions:

  • "How many open cases do we have, grouped by priority?"
  • "List the 5 most recently created accounts."
  • "Which opportunities close this month and have had no activity for 14 days?"

Check the answers against Salesforce reports. Claude will show which Salesforce tools it used, so you can see exactly what it did.

Step 5: Roll Out Safely

  • Pilot first: give access to a small group and collect feedback.
  • Permissions matter: Claude can see and change only what each signed-in user can. Review profiles and permission sets before rollout.
  • Be careful with write access: for the first weeks, ask users to review any change Claude proposes before approving it.
  • Add custom tools later: you can turn your own autolaunched Flows and invocable Apex actions into MCP tools, so Claude follows your business rules.

Common Problems

Problem Likely fix
Login window shows a callback or redirect error Check that the Callback URL in the External Client App exactly matches the one in Step 2.
Connected, but no tools appear Make sure the MCP server is activated in Setup and you used its exact Server URL.
"Insufficient access" errors The user lacks permission to that object or field in Salesforce. Fix it in permission sets, not in Claude.
Works in sandbox, fails in production Production has a different Server URL and needs its own External Client App settings.

Next Step

Once the basic connection works, the real value comes from custom tools built around your processes — for example, "create a renewal opportunity using our standard rules".

Want help setting this up for your team? Contact Allied Era.

View More Solutions
Share this solution:

Comments (0)

Loading comments...