How to Connect Claude to Salesforce Using MCP Servers: The Complete Setup Guide

If you’ve ever wished you could just ask Salesforce a question instead of building a report, opening five list views, and clicking through Lightning Experience to find one number then this guide is for you.

With Salesforce Hosted MCP Servers, you can now connect “Claude” directly to your Salesforce org. Once connected, you can query records, generate reports, update data, and even trigger Flows all using plain English (prompt) , without leaving your chat window.

I recently set this up on my own org, and in this Triggerhours article I’ll walk you through exactly how I did it .


What Is MCP (Model Context Protocol)?

Model Context Protocol (MCP) is an open standard, that defines a common way for AI agents to talk to external tools and data sources. Instead of every AI vendor building custom, one-off integrations with every SaaS product, MCP gives everyone the same “USB port” . One protocol that any MCP-compatible AI client (Claude, ChatGPT, Cursor, Postman, etc.) can plug into.

In simple terms: MCP is what lets an AI assistant like Claude actually do things inside Salesforce like run a SOQL query, create a record, update a field, or kick off a automation instead of just talking about Salesforce in the abstract.

An MCP server is the piece that exposes those capabilities. It sits between the AI client and the actual system (in our case, Salesforce) and defines a set of “tools” (individual actions) and “prompts” (pre-built, parameterized commands) that the AI is allowed to use.

Types of MCP Servers

Before you connect anything, it helps to understand the two flavors of MCP servers you’ll run into with Salesforce.

1. Standard Salesforce Hosted MCP Servers

Salesforce ships a set of pre-built, ready-to-use MCP servers out of the box, hosted and maintained by Salesforce itself . You don’t run any infrastructure. These give agents access to the wider Salesforce ecosystem (Platform, Data Cloud, Tableau, MuleSoft) under what Salesforce calls its Headless 360 initiative. On a typical org, you’ll see servers like:

ServerWhat it does
SObject AllFull CRUD like creates, reads, updates, and deletes records
SObject ReadsSearches and retrieves records and relationships (read-only)
SObject MutationsCreates and updates records without allowing deletions
SObject DeletesDeletes records, with dependency awareness
Data Cloud SQLQueries unified customer data across connected sources
headless-360Broad access across the Headless 360 product surface
salesforce-api-context / metadata-expertsMetadata and API context for building further integrations

2. Custom Salesforce Hosted MCP Servers

If the standard servers don’t cover your use case, Salesforce lets you build custom MCP servers with granular control over exactly which tools are exposed. You can turn any of the following into an MCP tool:

  • Apex Actions — invocable Apex methods (@InvocableMethod)
  • Autolaunched Flows — expose a Flow as a callable tool
  • Apex REST endpoints — your existing custom REST APIs
  • @AuraEnabled methods — Apex methods used by Lightning components

You can also expose Flex Prompt Templates (built in Prompt Builder) as MCP prompts, so Claude can run a pre-approved, parameterized command instead of freeform natural language useful when you want more predictable, guardrailed behavior for a specific business process.

Why Connect Claude to Salesforce?

  • No more click-fatigue. Instead of navigating list views, filters, and report builders, you type what you want in plain English.
  • Faster ad-hoc reporting. “Show me daily bookings grouped by start date” replaces building a report and a dashboard.
  • Safer bulk operations. You can review a list Claude pulls back before confirming a bulk update or cancellation a human-in-the-loop safety net.
  • One interface for many systems. MCP isn’t Salesforce-specific the same Claude session can pull from Salesforce, Slack, and your other connected tools in one conversation.
  • No custom integration code. The standard hosted servers require zero Apex and zero middleware, just OAuth configuration.

Prerequisites

Before you start, make sure you have:

  • A Salesforce org (Production, Sandbox, or Scratch org) where you have System Administrator access, or at least permission to manage External Client Apps and MCP Servers in Setup
  • A Claude.ai account
  • In the org , Check and enable MCP if not enabled .
    Go to Setup –> User Interface –> “Enable MCP Service (Beta)”


Step-by-Step: Connecting Claude to Salesforce

The overall flow has three parts: activate the MCP servers in Salesforce, create an External Client App so Claude can authenticate, and add the connector inside Claude.

Step 1: Activate Salesforce Hosted MCP Servers

MCP servers exist on every org but are inactive by default . If not visible in your org you may consider to create a new demo org or a new Developer edition org

  1. In Setup, search for MCP Servers.
  2. Open the Salesforce Servers tab. You’ll see the full list of available standard servers with a Connection Health column showing Active/Inactive.
  3. Click into the server you want (for most use cases, SObject All is the best starting point since it covers create, read, update, and delete).
  4. Click Activate.
  5. Note down the API Name and Server URL shown on the detail page . You will need that in next steps.
connect Claude to Salesforce


Here’s what the server list looks like once you’ve activated one . Note SObject All shows a green Active badge while the rest are still Inactive:

And here’s the detail page for that server, showing its API name (platform.sobject-all) and Server URL . This is the URL you’ll paste into Claude later:

connect Claude to Salesforce


Step 2: Create an External Client App (ECA)

Claude authenticates to Salesforce using standard OAuth 2.0, and Salesforce needs to know that Claude is an app it should trust. That’s what an External Client App (ECA) is for it defines which external tool is allowed to connect, and with what scopes.

  1. In Setup, search for External Client App Manager and click New External Client App.
  2. Under Basic Information, give it a name (e.g., ConnectWithClaude) and your contact email. The API name auto-fills.
  3. Expand the API (Enable OAuth Settings) section and check Enable OAuth.
  4. Set the Callback URL:
    • https://claude.ai/api/mcp/auth_callback if you’re connecting through Claude.ai / Claude Desktop
    • http://localhost:38000/callback if you’re connecting through Claude Code (the CLI)
  5. Add these OAuth Scopes:
    • Perform requests at any time (refresh_token, offline_access)
    • Access Salesforce hosted MCP servers (mcp_api)
    • Manage user data via APIs (api)
  6. Under Security, uncheck “Require secret for Web Server Flow” and “Require secret for Refresh Token Flow,” and instead check Require Proof Key for Code Exchange (PKCE) and Issue JSON Web Token (JWT)-based access tokens for named users.
  7. Click Create.

This is what my finished app looked like note the app type is Local, status is Enabled, and all users can self-authorize:


And here’s the OAuth Settings panel with the callback URL and the three selected scopes,
This combination (api, refresh_token/offline_access, mcp_api) is what makes the connection work end to end:


Once the app is saved, go to the Settings tab, expand OAuth Settings, and click Consumer Key and Secret to reveal your Consumer Key (Client ID) and Consumer Secret. You’ll need the Consumer Key in the next step.

Step 3: Add the Connector Inside Claude

Now switch over to Claude:

  1. In Claude, open Settings → Connectors, and click the + button.
  2. Choose Add custom connector.
  3. Give it a name (e.g., salesforce-sobject-all) and paste the Server URL you copied in Step 1.
    The format is:
    • Production org: https://api.salesforce.com/platform/mcp/v1/<SERVER-NAME>
    • Sandbox/scratch org: https://api.salesforce.com/platform/mcp/v1/sandbox/<SERVER-NAME>
  4. Under Advanced settings, paste the Consumer Key (OAuth Client ID) you copied from your External Client App.
  5. Click Add, then click Connect next to your new connector.
  6. Claude redirects you to Salesforce to log in and authorize access. Approve it, and you’re redirected back to Claude with the connector marked as connected.

    Once Connected it will show like below , As mine is already connected.


Step 4: Test the Connection

Open a new chat in Claude and just ask for something in plain English. In my case, I asked Claude to pull every Account record from my Salesforce Test Org — no SOQL, no report builder, just a sentence:


Claude used the connected MCP tool, ran the query behind the scenes, and returned a clean, readable summary with a breakdown table of 112 records fetched and organized in seconds.

Security Notes

A few things worth keeping in mind before you roll this out to a team, not just your own sandbox:

  • Standard Salesforce permissions still apply : The ECA and MCP server only control whether an external tool can connect but actual data access is still governed by the connected user’s profile, permission sets, and sharing rules.
  • Scope your servers deliberately : If a use case only needs read access, connect SObject Reads rather than SObject All .
  • Test in a sandbox first : Point your first connector at a sandbox or scratch org URL before pointing anything at Production.
  • Review who can self-authorize the ECA : For sensitive orgs, consider restricting the External Client App to specific profiles or permission sets rather than leaving it open to all users.

Conclusion

Connecting Claude to Salesforce through Hosted MCP Servers turns your AI assistant into something that can actually act on your org not just describe what it would do. The setup takes about fifteen minutes: activate a server, create one External Client App, add a connector in Claude, and you’re querying and updating live Salesforce data in plain English.

Kindly comment if you are facing any issue while connecting the org with claude.

Further reading from Salesforce:


Author

  • Trigger Hours

    TriggerHours is a platform built on a simple idea: "The best way to grow is to learn together". We request seasoned professionals from across the globe to share their hard-won expertise, giving you the in-depth tutorials and practical insights needed to accelerate your journey. Our mission is to empower you to solve complex challenges and become an invaluable member of the Ohana.


Discover more from Trigger Hours

Subscribe to get the latest posts sent to your email.

Leave a Comment

Discover more from Trigger Hours

Subscribe now to keep reading and get access to the full archive.

Continue reading