Skip to content
Salesforce DX MCP Server

Salesforce DX MCP Server

Released
v0.30.15
Apache-2.0

Summary

Salesforce's official MCP server: over 60 tools across 15 toolsets for reading org data, deploying metadata, running Apex tests and building Lightning Web Components.

Features

  • 60+ tools grouped into 15 opt-in toolsets
  • Deploy and retrieve metadata between a DX project and an org
  • Query and manage org data and users
  • Run Apex tests and Salesforce Code Analyzer static analysis
  • LWC and Aura expert tools, including production-readiness scoring
  • Explicit per-org authorisation via the --orgs flag
  • Experimental dynamic tool discovery to reduce context size

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "Salesforce DX MCP Server" tools will be available.
{
  "mcpServers": {
    "salesforce-dx-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@salesforce/mcp",
        "--orgs",
        "DEFAULT_TARGET_ORG",
        "--toolsets",
        "orgs,metadata,data,users"
      ]
    }
  }
}

Description

The Salesforce DX MCP Server connects an LLM to your authorised Salesforce orgs. It is published by the Salesforce CLI team and is the same tooling surface sf exposes, wrapped so an agent can drive it: read and manage records, deploy and retrieve metadata, run tests, manage users, and get expert guidance on Lightning Web Components and Apex.

Toolsets

The server ships more than 60 tools, grouped into toolsets you enable explicitly - Salesforce specifically recommends not turning them all on, because the full set overwhelms an LLM's context:

  • core - always enabled
  • orgs - manage your authorised orgs
  • data - query and manipulate org data
  • metadata - deploy and retrieve metadata between your DX project and an org
  • testing - run Apex and other tests
  • users - manage org users and permission sets
  • code-analysis - static analysis via Salesforce Code Analyzer
  • lwc-experts and experts-validation - LWC development, testing and production-readiness scoring for accessibility, security and best practice
  • aura-experts - Aura component analysis, blueprinting and migration
  • devops - read and operate DevOps Center resources
  • enrichment, mobile, mobile-core, scale-products - metadata enrichment, mobile capabilities, and Apex performance detection
Access control

Org access is explicit and deliberately conservative. The --orgs flag takes DEFAULT_TARGET_ORG, DEFAULT_TARGET_DEV_HUB, a specific username or alias, or ALLOW_ALL_ORGS (to be used with care) - and at least one value is required, so the server never picks up orgs you did not name. --tools enables individual tools alongside whole toolsets, --dynamic-tools (experimental) starts with a minimal core and loads more on demand to save context, --allow-non-ga-tools opts into non-GA tools, and --no-telemetry disables the default data collection.

Configuration snippets are documented for Claude Code, Cursor, Cline and VS Code with Copilot. Apache-2.0 licensed.

Related MCP Servers

Box's official remote MCP server — roughly 60 tools over enterprise files, metadata, search, Hubs, Doc Gen and Box AI, inside your existing Box permissions.

Featured

Attio's official hosted MCP server — search, read and write your CRM records, lists, notes, tasks, meetings and emails from any MCP client over OAuth.

Close's official remote MCP server for the sales pipeline — search activities, run aggregations, and read or write CRM data under three explicit permission scopes.

Browse all MCP servers →