MCP MCP Server

MCP Server for interacting with Salesforce instances

Local serverstdio

What is the MCP MCP server?

MCP MCP server exists for a simple reason — assistants are far more useful when they can act on MCP directly instead of describing what you should do. MCP Server for interacting with Salesforce instances.

What you get

For general documentation about the Salesforce DX MCP Server, see this section in the Salesforce DX Developer Guide. The docs include:

The Salesforce DX MCP Server is a specialized Model Context Protocol (MCP) implementation designed to facilitate seamless interaction between large language models (LLMs) and Salesforce orgs. This MCP server provides a robust set of tools and capabilities that enable LLMs to read, manage, and operate Salesforce resources securely.

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

What the assistant can call

Once MCP is connected, these are the calls the assistant has available:

  • create-custom — rule (NON-GA) - Creates a custom XPath-based PMD rule from a provided Apex code sample
  • Toolset — Description
  • all — Enables all available tools from all toolsets. We recommend that you configure only the toolsets you’re going to use, rather than all of them with
  • aura-experts — Tools that provide Aura component analysis, blueprinting, and migration expertise.
  • code-analysis — Tools for static analysis of your code using Salesforce Code Analyzer
  • core — Core set of DX MCP tools. This toolset is always enabled
  • data — Tools to manage the data in your org, such as listing all accounts
  • devops — Tools to securely and autonomously read, manage, and operate DevOps Center resources
  • enrichment — Tools to enrich metadata components in your DX project
  • experts-validation — Tools to validate and score LWC components for production readiness across accessibility, security, and best practices
  • lwc-experts — Tools to assist with Lightning Web Component (LWC) development, testing, optimization, and best practices
  • metadata — Tools to deploy and retrieve metadata to and from your org and your DX project

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp mcp server does with a few real requests.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. MCP's toolset — create-custom, Toolset, all and 11 more — is a fair guide to whether it matches your workflow. It is maintained by salesforcecli; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
create-customrule (NON-GA) - Creates a custom XPath-based PMD rule from a provided Apex code sample.
ToolsetDescription
allEnables all available tools from all toolsets. We recommend that you configure only the toolsets you’re going to use, rather than all of them with this value. The DX MCP Server includes over 60 MCP tools, so enabling the
aura-expertsTools that provide Aura component analysis, blueprinting, and migration expertise..
code-analysisTools for static analysis of your code using Salesforce Code Analyzer.
coreCore set of DX MCP tools. This toolset is always enabled.
dataTools to manage the data in your org, such as listing all accounts.
devopsTools to securely and autonomously read, manage, and operate DevOps Center resources.
enrichmentTools to enrich metadata components in your DX project.
experts-validationTools to validate and score LWC components for production readiness across accessibility, security, and best practices.
lwc-expertsTools to assist with Lightning Web Component (LWC) development, testing, optimization, and best practices.
metadataTools to deploy and retrieve metadata to and from your org and your DX project.
mobileTools for mobile development and capabilities.
mobile-coreA subset of tools from the mobile toolset focused on essential mobile capabilities.

How to install the MCP MCP server

{
  "mcpServers": {
    "Salesforce DX": {
      "command": "npx",
      "args": ["-y", "@salesforce/mcp",
               "--orgs", "DEFAULT_TARGET_ORG",
               "--toolsets", "orgs,metadata,data,users",
               "--tools", "run_apex_test",
               "--allow-non-ga-tools"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use MCP to create-custom.
  • Use MCP to Toolset.
  • Use MCP to all.

Frequently asked questions

The `--toolsets` flag accepts sets like `orgs`, `metadata`, `data`, `users`, or `all` to enable all tools. Toolsets group related functionality to reduce LLM context.