MCP Server — salesforcecli/mcp

MCP Server for interacting with Salesforce instances

Local serverstdio

What is the MCP Server?

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.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
create-customrule (NON-GA) - Creates a custom XPath-based PMD rule from a provided Apex code sample.
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 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"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

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.