The Salesforce MCP Server helps AI assistants to interact with Salesforce organizations via the Salesforce CLI. It offers strong tools for executing Apex, running SOQL queries, managing metadata, analyzing code, and automating development tasks.
claude install advancedcommunities/salesforce-mcp-serverThe Salesforce MCP Server is a Model Context Protocol server that connects AI assistants directly to Salesforce organizations via the Salesforce CLI. It provides modular tools for executing anonymous Apex code, running SOQL queries, managing metadata, analyzing code with static analysis and security scanning, generating Lightning components, deploying metadata, and performing record operations. The server enforces permission controls including read-only mode and org access restrictions, integrating with native Salesforce APIs and CLI commands. Developers and Salesforce admins use it to automate development workflows, execute bulk operations, perform code analysis, and manage org configurations without manual CLI interaction.
Install the MCP server using npm, then build with `npm run build` and `npm run build:mcpb` to create a distributable bundle. Configure org access via the permission system in `src/config/permissions.ts`, supporting read-only mode and allowed org restrictions. Tools are organized by category (Apex, Query, Org, Admin, Code Analysis) and integrate with existing Salesforce CLI authentication tokens.
Automate Apex code execution for faster deployments
Run SOQL queries to retrieve data for reporting
Manage Salesforce metadata efficiently
Analyze code quality and performance
claude install advancedcommunities/salesforce-mcp-servergit clone https://github.com/advancedcommunities/salesforce-mcp-serverCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I'm a developer working on a Salesforce project for [COMPANY]. I need to [TASK] using the Salesforce CLI. Can you help me with the commands and steps I should follow? Here's the relevant [DATA] I have: [DATA].
## Salesforce CLI Commands for [COMPANY] Project ### Task: Retrieve and Update Account Records Based on the provided data, here are the steps to retrieve and update account records using the Salesforce CLI: 1. **Authenticate with your Salesforce org:** ```bash sfdx auth:web:login -d -a [COMPANY]DevHub ``` 2. **Retrieve account records with specific criteria:** ```bash sfdx force:data:soql:query -q "SELECT Id, Name, Industry FROM Account WHERE Industry = '[INDUSTRY]'" -u [COMPANY]DevHub ``` 3. **Update the retrieved account records:** ```bash sfdx force:data:record:update -s Account -v "Id=[ACCOUNT_ID];Industry='New Industry'" -u [COMPANY]DevHub ``` 4. **Deploy the updated metadata:** ```bash sfdx force:source:deploy -m Account:Account -p force-app/main/default -u [COMPANY]DevHub ``` **Note:** Replace placeholders with actual values from your project. Ensure you have the necessary permissions and access to the Salesforce org.
Automate your browser workflows effortlessly
Enterprise CRM with AI-powered sales and service
CRM for nonprofits with AI donor insights
Manage microservices traffic and enhance security with comprehensive observability features.
Design, document, and generate code for APIs with interactive tools for developers.
CI/CD automation with build configuration as code
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan