Salesforce DX MCP Server
Official MCP server for Salesforce orgs, CRM objects, DX tasks, metadata, and agentic development workflows.
- Skill Road
- Salesforce DX MCP Server
Categories
Description
Salesforce DX MCP Server is the official Model Context Protocol server from the Salesforce CLI organization for working with Salesforce orgs. The direct documentation link points to https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_mcp.htm, while the repository https://github.com/salesforcecli/mcp contains the README, source code, license, and references to the @salesforce/mcp npm package. According to the README, the server is designed to let large language models read, manage, and operate Salesforce resources securely. For Skill Road, this entry fills the previously empty Lead Generation category because Salesforce data commonly includes contacts, accounts, leads, opportunities, and sales processes, even though the server itself comes from the developer toolchain.
CRM context for agents
The practical value appears when an agent can see not only code but also the structure of a Salesforce org. In sales, RevOps, and implementation projects, requirements often depend on objects, fields, flows, Apex code, permissions, and real CRM processes. Salesforce DX MCP Server can bring that context into an MCP client so an agent can inspect metadata, support standard DX tasks, prepare tests or scratch-org work, and reason about changes more accurately. This is especially useful where lead processes, campaign logic, CRM automation, or data quality in Salesforce meet code and configuration work.
Setup through Salesforce CLI
The server builds on the Salesforce DX developer toolchain. Before using it, teams need the Salesforce CLI installed and a Salesforce org already authorized. The MCP server is configured in a compatible client through the @salesforce/mcp npm package. The important point is that agents should not work with copied credentials. They use the existing Salesforce CLI authentication state and operate only within the authorized org and its permissions. For early testing, a sandbox or scratch org is far safer than a production sales environment.
Permissions, data, and governance
Salesforce data can contain personal information, leads, customer history, revenue expectations, contract context, or internal notes. Any MCP server that brings this data into an AI client must therefore be tightly controlled. Permissions follow the signed-in org, roles, profiles, permission sets, and Salesforce security models. Teams should decide in advance which objects and environments an agent may see, whether write actions are allowed, and how changes are reviewed. For lead generation and CRM analysis, a read-oriented first setup with a clear question is usually enough.
License, GitHub stars, and fit
The repository is Apache-2.0 licensed. The GitHub API reported exactly 467 stars for https://github.com/salesforcecli/mcp on 2026-09-07; that number is a snapshot of repository popularity, not a proof of quality or security. The server itself is open source, while Salesforce account access, org capabilities, platform functions, and the selected AI client follow their own provider terms. This public entry therefore does not state fixed prices. Lead Generation, Coding, and Automation fit because the server connects CRM objects and sales processes with development and automation tasks. Production use should start with a sandbox, minimal permissions, auditability, and human approval.
Requirements
Salesforce CLI, authorized Salesforce org, Node.js/npm, and an MCP-compatible client.
Installation instructions
What the Salesforce DX MCP Server is
According to Salesforce, the Salesforce DX MCP Server is a specialized Model Context Protocol server that lets large language models interact securely with Salesforce orgs. A Salesforce org is a company's concrete Salesforce environment, for example a development, test, or production instance containing metadata, data, users, permissions, and Apex code. Salesforce DX, or SFDX, is Salesforce's modern development approach for source control, automation, and CLI-based work. The MCP server connects that world to an AI client: instead of an assistant producing only generic Salesforce answers, it can use defined tools to list orgs, query metadata, perform data operations, or run Apex tests, provided those toolsets are enabled. For development teams, this matters because many Salesforce tasks are highly context-dependent, and an agent can only be meaningfully helpful once it knows the specific org and the tools it is allowed to use.
Step 1: Prerequisites
The official Salesforce implementation is in the salesforcecli/mcp GitHub repository and is started through the npm package @salesforce/mcp. A working environment therefore needs Node.js and npx, as well as an MCP-capable client such as VS Code with Copilot, Claude Code, Cursor, Cline, or another client that supports an MCP JSON configuration. The user must also be authenticated with Salesforce, typically through the Salesforce CLI, so that the server can access the specified org. The examples often use DEFAULT_TARGET_ORG, meaning the default org configured in the local Salesforce CLI setup. Actual capabilities are restricted through startup arguments: --orgs defines which orgs may be used, --toolsets activates groups of tools such as orgs, metadata, data, or users, and --tools can add or limit individual tools such as run_apex_test.
Step 2: Step-by-step setup
Setup happens in the MCP configuration file of the chosen client. For Claude Code, the README shows adding an entry under mcpServers in the project's .mcp.json file. The command is npx, and the arguments include -y and @salesforce/mcp so that npx installs or runs the package without prompting. The desired flags follow, such as --orgs DEFAULT_TARGET_ORG, --toolsets orgs,metadata,data,users, --tools run_apex_test, and optionally --allow-non-ga-tools if tools that are not generally available should be usable from the enabled toolsets. VS Code with Copilot uses a similar configuration in .vscode/mcp.json; Cursor, Cline, and other clients use their own locations but the same basic structure for command and args. After saving, the client should be reloaded or the MCP connection restarted. A safe first test is a harmless read operation or an Apex test run in a development org, not a data or metadata operation against production.
Security and best practices
Salesforce emphasizes in its documentation that the DX MCP Server provides tools that can read, manage, and operate Salesforce resources. Permission design is therefore critical. The server should not be started broadly with every org and every toolset if only a small part is needed. A safer approach is to name allowed orgs explicitly, initially enable only read-oriented or low-risk toolsets, and allow individual tools deliberately. For production orgs, separate approvals, clear roles, and, where possible, read-only users should be used. The --allow-non-ga-tools flag should be used deliberately because it can enable tools that are not yet generally available and whose behavior may change. Debug logs can be useful, but they must not expose credentials or sensitive data and may not be visible in every client.
Who should use it and what makes it different
The Salesforce DX MCP Server is mainly useful for Salesforce developers, platform teams, and admins who want AI assistance directly inside their development environment. It differs from generic Salesforce chatbots because it is connected to the concrete Salesforce CLI and org configuration and exposes structured, documented tools. Compared with custom integrations, it saves a lot of foundation work because Salesforce itself provides the MCP interface, sample configurations, and toolsets. Still, it does not replace Salesforce governance: a model can run an Apex test or inspect metadata, but it does not automatically understand every business consequence of a change. In professional environments, changes should still go through branches, pull requests, automated tests, deployment pipelines, and approval processes. The server is especially useful when restricted to development or scratch orgs where it can speed up routine work without unnecessarily exposing production data to an AI workflow.
npx -y @salesforce/mcp
Authentication
Existing Salesforce CLI authentication for the authorized org.
Required access permissions
Permissions follow the Salesforce org, profiles, roles, permission sets, and enabled DX/MCP tools.
Transmitted or stored data
Tool calls run through the local DX/MCP toolchain and can return Salesforce metadata, CRM objects, and test results to the client.
Security risks
Production CRM data, broad org rights, and unreviewed write actions can cause data exposure, faulty automation, or compliance issues.
License and costs
- License
- Apache-2.0
- Cost
- free
The MCP server is Apache-2.0 licensed. Use depends on Salesforce account access, org capabilities, platform functions, and the AI client.
Alternatives
Not recorded yet.
At a glance
- Provider
- Salesforce
- Status
- Official server
- Deployment
- Local
- Current version
- Not recorded yet.
- GitHub stars
- 490
- Last reviewed
- 07.09.2026
Repository and documentation
Categories
Supported clients
Related guides
Guides and background related to this entry.