home / mcp / salesforce mcp server
MCP Server for interacting with Salesforce instances
Configuration
View docs{
"mcpServers": {
"kodey-ai-salesforce-mcp": {
"command": "npx",
"args": [
"-y",
"@salesforce/mcp",
"--orgs",
"DEFAULT_TARGET_ORG",
"--toolsets",
"all"
]
}
}
}You can use the Salesforce MCP Server to interact with your Salesforce orgs through an MCP client. This server enables you to run LLM-driven tools to read, manage, and operate Salesforce resources securely, with built-in security and granular org access controls.
After configuring a client to talk to the Salesforce MCP Server, you can perform common Salesforce DX tasks using natural language in your MCP-enabled chat. The server routes your request to the appropriate toolset and presents the results, helping you list authorized orgs, view org data, deploy or retrieve metadata, and run queries.
Prerequisites you need before installing and using the Salesforce MCP Server:
Then set up the MCP client configuration as shown in the code snippet below. This config enables the MCP server to run locally via npx and to target your default org.
{
"servers": {
"Salesforce DX": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@salesforce/mcp", "--orgs", "DEFAULT_TARGET_ORG", "--toolsets", "all"]
}
}
}1. Open VS Code and run the MCP: List Servers command. 2. Select Salesforce DX and choose Start Server. 3. Check the Output panel for status updates.
Open the Chat: Open Chat (Agent) and switch to Agent mode in your Copilot chat window. Describe the task in natural language, and the MCP server will determine the right tool to run. Click Continue to execute and view results.
To stop, restart, or view the MCP server configuration, use the MCP: List Servers command, select Salesforce DX, and choose the desired action.
npx -y @smithery/cli install @kodey-ai/salesforce-mcp-kodeyConfigure the Salesforce DX MCP Server by passing flags to the args option in your MCP client. Surround each flag name and value with double quotes and separate with commas. For example, you can enable all tools and target your default org.
Specify which authorized orgs the MCP server can access with the --orgs flag. Values can include DEFAULT_TARGET_ORG, DEFAULT_TARGET_DEV_HUB, ALLOW_ALL_ORGS, or a specific username/alias. You must authorize these orgs locally before access.
Toolsets group tools to control context size and capabilities. You can enable all toolsets or pick specific ones like data, orgs, metadata, and others. You can also enable individual tools in combination with toolsets to tailor the server’s capabilities to your needs.
The server avoids exposing secrets in plain text and accesses pre-existing (encrypted) auth files on your machine. Access is restricted to orgs you explicitly allowlist when starting the server.
This MCP server is provided as a developer preview. Features and commands may change. Some tools are labeled NON-GA and require a specific flag to enable.
If you encounter authentication issues, re-authorize your orgs using the Salesforce CLI commands or the VS Code SFDX commands. Check that the configured org aliases in your mcp.json align with your authorized orgs.
You can configure additional MCP clients to communicate with the Salesforce DX MCP Server by following their respective configuration formats and pointing to the same MCP command and args.
Cursor and Cline configurations mirror the same pattern: specify the MCP command as npx, and pass the appropriate orgs and toolsets in the args array. Other clients can follow their own documentation while using the same MCP endpoint configuration approach.
npx -y @smithery/cli install @kodey-ai/salesforce-mcp-minimalDetermines the appropriate username or alias for Salesforce operations, handling both default orgs and Dev Hubs.
Resumes a long-running operation that wasn’t completed by another tool.
Lists all configured Salesforce orgs, with optional connection status checking.
(NON-GA) Create a scratch org snapshot.
(NON-GA) Create a scratch org.
(NON-GA) Delete a locally-authorized Salesforce scratch org or sandbox.
(NON-GA) Open an org in a browser.
Runs a SOQL query against a Salesforce org.
Assigns a permission set to the user or on behalf of another user.
Deploys metadata from your DX project to an org.
Retrieves metadata from your org to your DX project.
Executes agent tests in your org.
Executes apex tests in your org.
Provides TypeScript API documentation for Salesforce LWC App Review Service, offering expert guidance for implementing app review features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC AR Space Capture, offering expert guidance for implementing AR space capture features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Barcode Scanner, offering expert guidance for implementing barcode scanning features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Biometrics Service, offering expert guidance for implementing biometric authentication features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Calendar Service, offering expert guidance for implementing calendar integration features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Contacts Service, offering expert guidance for implementing contacts management features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Document Scanner, offering expert guidance for implementing document scanning features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Geofencing Service, offering expert guidance for implementing geofencing features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Location Service, offering expert guidance for implementing location services in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC NFC Service, offering expert guidance for implementing NFC features in Lightning Web Components.
Provides TypeScript API documentation for Salesforce LWC Payments Service, offering expert guidance for implementing payment processing features in Lightning Web Components.
Analyzes Lightning Web Components for mobile-specific issues and provides detailed recommendations for mobile offline compatibility and performance improvements.
Provides structured review instructions to detect and remediate mobile offline code violations in Lightning Web Components for Salesforce Mobile Apps.
Creates a comprehensive PRD blueprint for Aura component migration with migration guidance to LWC.
Enhances an existing draft PRD with expert Aura insights to improve migration planning.
Provides migration bridge guidance for creating LWC components from Aura specifications.
End-to-end Aura to LWC migration workflow guidance.
Step-by-step component creation workflow guidance for LWC components.
Performance optimization guidance for LWC components.
Comprehensive testing workflow and test generation guidance for LWC components.
Migration guidance for upgrading to SLDS2 design system.
Explores and documents Lightning Design System UI API capabilities.
Data consistency patterns for LDS components.
LDS development guidelines and component integration.
Referential integrity patterns for LDS data management.
Aura to LWC migration completeness checklist and validation.
Converts Figma designs to LWC component specifications.
Accessibility testing utilities and Jest integration for LWC components.
Performs static analysis of your code for best practices and security checks (NON-GA).
Gets the description of a Salesforce Code Analyzer rule (NON-GA).