> mcp integration

Salesforce MCP Server: What It Does & How to Use It with Claude

What the Salesforce MCP server does — SOQL queries, record CRUD, metadata, Apex — and how to connect it to Claude Cowork, Claude Code, or Claude Desktop.

By Rhode Labs · Updated 2026-06-03

The Salesforce MCP server lets an AI assistant query and act on your Salesforce org, running SOQL, reading and writing records, and deploying metadata, without you leaving the chat. Salesforce maintains two official options: the open-source DX MCP Server for developer and CLI workflows, and Hosted MCP Servers (now generally available) that run inside your org and expose business data over OAuth.

What can the Salesforce MCP server do?

Capabilities depend on which server you run. The table below reflects what the official DX MCP Server documents today.

CapabilityWhat it enables
Org managementList and switch between authorized orgs; set a default target org
Data (SOQL)Run SOQL queries against your org and list records (e.g. all accounts)
MetadataDeploy and retrieve metadata between your DX project and the org
UsersManage org users, for example assigning a permission set
Apex / testingRun Apex tests and agent tests via dedicated tools
Code analysisStatic analysis through Salesforce Code Analyzer
LWC / Aura expertsLightning Web Component guidance and Aura-to-LWC migration help
DevOpsInteract with DevOps Center resources

The DX server ships more than a dozen toolsets and 60+ tools; you enable only the ones you need with the --toolsets flag to keep Claude’s context small.

Official vs community server

  • Official DX MCP Server (@salesforce/mcp) is the right default for developers. It runs locally over the Salesforce CLI, so it inherits your existing org auth and stays inside your DX project. Open source (Apache-2.0), on GitHub at salesforcecli/mcp.
  • Official Hosted MCP Servers are a platform feature, generally available on Enterprise Edition and above, that runs in your org and exposes business assets: SObject CRUD with field-level security and sharing rules, Apex Invocable Actions, @AuraEnabled methods, Apex REST methods, Flows, Named Queries, Data 360 SQL, and Prompt Builder templates, all behind per-user OAuth 2.0 with PKCE. Best when non-developers or external AI clients need governed access to live org data.
  • Community server (tsmztech/mcp-server-salesforce) is the most-referenced third-party option. Adds natural-language object/field creation, SOSL search, upsert, and Apex class/trigger editing. Useful for admin-style tasks, but vet it yourself since it isn’t Salesforce-maintained.

How do I connect Salesforce to Claude (Cowork / Code / Desktop)?

  1. Authenticate the CLI. Install the Salesforce CLI and run sf org login web so the DX MCP Server can reuse your org session.
  2. Add the server to your client config. In Claude Code, Claude Desktop, or Cowork’s MCP settings, register the server:
    {
      "mcpServers": {
        "Salesforce DX": {
          "command": "npx",
          "args": ["-y", "@salesforce/mcp",
            "--orgs", "DEFAULT_TARGET_ORG",
            "--toolsets", "orgs,data"]
        }
      }
    }
  3. Scope the toolsets. Start with orgs,data (read-leaning) before adding metadata or users. Restart the client and confirm the tools appear, then ask Claude a read-only question like “how many open opportunities do we have this quarter?” to verify.

How we use it: Good for read-first work: pulling pipeline summaries, sanity-checking record counts, drafting SOQL against an unfamiliar schema, and scripting metadata retrieves before a deploy. Bad for bulk writes or anything touching production data unattended; the model will happily generate a DML it shouldn’t run. The one gotcha that bites people is that the --orgs DEFAULT_TARGET_ORG value follows your CLI’s default org, so if you switched defaults in another terminal, Claude may quietly be talking to the wrong sandbox. Pin an explicit org alias instead.

Is the Salesforce MCP server secure?

Run least-privilege from day one. With the DX server, scope --orgs to a named sandbox (not all authorized orgs), enable only the --toolsets you need, and gate experimental tools behind --allow-non-ga-tools rather than leaving them on. For Hosted MCP Servers, access flows through per-user OAuth 2.0 with PKCE and respects field-level security and sharing rules, so the assistant can only see and do what the connected user can. Read-only first, write scopes later, and never point it at production until you’ve watched it behave in a sandbox.

Wiring Salesforce into your stack

The MCP server is the easy part; the hard part is deciding which org operations an assistant should be trusted to perform, and wiring that trust into the toolsets, permission sets, and review steps around it. That’s the work we do: connecting Salesforce, Linear, QuickBooks, and the rest of your stack into one assistant that acts safely.

Book a discovery call.

Sources: salesforcecli/mcp (GitHub) · Hosted MCP Servers (Salesforce Developers) · Hosted MCP Servers Are Now GA (Salesforce Developers Blog) · tsmztech/mcp-server-salesforce

Frequently asked questions

Does the Salesforce MCP server work with Claude?
Yes. The official Salesforce DX MCP Server and the Hosted MCP Servers both speak the Model Context Protocol, so they work with any MCP client — including Claude Cowork, Claude Code, and Claude Desktop. You add the server to your client config, authenticate to your org, and Claude can then query and act on Salesforce data through the exposed tools.
Is there an official Salesforce MCP server?
Yes — two, in fact. Salesforce ships the open-source DX MCP Server (@salesforce/mcp on npm and GitHub) for developer and org operations, plus Hosted MCP Servers — now generally available — that run in your org and expose SObjects, Flows, Apex actions, Named Queries, and Prompt Builder templates over OAuth.
Is the Salesforce MCP server free?
The DX MCP Server is open source (Apache-2.0) and free to run; you only need a Salesforce org and the Salesforce CLI. Hosted MCP Servers are a platform feature available on Enterprise Edition and above, so availability and cost follow your org's licensing.
Can the Salesforce MCP server run SOQL queries?
Yes. The DX MCP Server's data toolset and the community tsmztech server both let an assistant run SOQL queries (and SOSL searches) against your org, returning records with relationship fields and filters intact.

Start Here

Ready to modernize?

Tell us where your team is stuck. We'll map the path from manual to automated, and show you what's possible in the first two weeks.

Book a Discovery Call