Skip to content
Salesforce DX MCP Server

Salesforce DX MCP Server

v0.30.15
Apache-2.0
salesforcecrmapexlwcmetadata

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

New

Microsoft's official MCP server for Azure DevOps - work items, repos, pipelines, wikis, test plans and iterations, reachable from any MCP client in plain language.

Developer Tools

MCP: Serena

by Oraios AI

New

Semantic code toolkit for coding agents — symbol-level search, editing and refactoring backed by language servers or the JetBrains platform.

Developer Tools

MCP: Hugging Face

by Hugging Face

New

Official Hugging Face MCP server: search models, datasets, Spaces and papers on the Hub, read repository files, and call Gradio apps as agent tools.

Developer ToolsWeb & Search
New

GitLab's own MCP server — issues, merge requests, CI/CD pipelines, job logs, wikis and semantic code search over an OAuth-authorised HTTP endpoint.

Developer Tools
Browse all MCP servers →