
Salesforce
STDIOSalesforce MCP server enabling AI tools to interact with Salesforce data and functionality.
Salesforce MCP server enabling AI tools to interact with Salesforce data and functionality.
A comprehensive Model Context Protocol (MCP) server that provides seamless Salesforce integration for AI development tools like Claude Desktop, Cline, and other MCP-compatible clients.
execute-soql
- Execute SOQL queries with auto-bulk switching and paginationexecute-sosl
- Multi-object search with result aggregationdescribe-sobject
- SObject metadata with intelligent cachingexecute-apex
- Anonymous Apex execution with debug log capturerun-apex-tests
- Apex test execution with coverage reportingget-apex-logs
- Debug log retrieval with filteringcreate-record
- Single/bulk record creation with auto-bulk switchingget-record
- Record retrieval with field selectionupdate-record
- Single/bulk record updates with validationdelete-record
- Single/bulk record deletionupsert-record
- External ID-based upsert operationslist-metadata-types
- Discover metadata typesdeploy-metadata
- Deploy individual metadata components (e.g., ApexClass, CustomObject) from files or JSONdeploy-bundle
- Deploy a metadata bundle (e.g., LWC) from a directory pathretrieve-metadata
- Retrieve individual metadata components, with an option to save to a filecheck-deploy-status
- Check the status of a deploymenttest-connection
- Connection validation and health monitoringTo use with Desktop APP, such as Claude Desktop, Cline, Cursor, and so on, add the MCP server config below.
{ "mcp.servers": { "salesforce": { "command": "npx", "args": [ "-y", "@jjar/salesforce-mcp-server" ], "env": { "SF_USERNAME": "[email protected]", "SF_PASSWORD": "your-password", "SF_SECURITY_TOKEN": "", "SF_LOGIN_URL": "https://login.salesforce.com" }, "disabled": false, "alwaysAllow": [ "test-connection", "execute-soql", "describe-sobject", "get-record", "get-apex-logs", "list-metadata-types" ] } } }
{ "mcp.servers": { "salesforce": { "command": "npx", "args": [ "-y", "@jjar/salesforce-mcp-server" ], "env": { "SF_CLIENT_ID": "your-oauth2-client-id", "SF_CLIENT_SECRET": "your-oauth2-client-secret", "SF_REFRESH_TOKEN": "your-refresh-token", "SF_INSTANCE_URL": "https://yourorg.my.salesforce.com" }, "disabled": false, "alwaysAllow": [ "test-connection", "execute-soql", "describe-sobject", "get-record", "get-apex-logs", "list-metadata-types" ] } } }
{ "mcp.servers": { "salesforce": { "command": "cmd", "args": [ "/c", "npx", "-y", "@jjar/salesforce-mcp-server" ], "env": { "SF_USERNAME": "[email protected]", "SF_PASSWORD": "your-password", "SF_SECURITY_TOKEN": "", "SF_LOGIN_URL": "https://login.salesforce.com" }, "disabled": false, "alwaysAllow": [ "test-connection", "execute-soql", "describe-sobject", "get-record", "get-apex-logs", "list-metadata-types" ] } } }
{ "mcp.servers": { "salesforce": { "command": "cmd", "args": [ "/c", "npx", "-y", "@jjar/salesforce-mcp-server" ], "env": { "SF_CLIENT_ID": "your-oauth2-client-id", "SF_CLIENT_SECRET": "your-oauth2-client-secret", "SF_REFRESH_TOKEN": "your-refresh-token", "SF_INSTANCE_URL": "https://yourorg.my.salesforce.com" }, "disabled": false, "alwaysAllow": [ "test-connection", "execute-soql", "describe-sobject", "get-record", "get-apex-logs", "list-metadata-types" ] } } }
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
⚠️ Important: After adding or modifying the MCP server configuration, you must restart VS Code for the changes to take effect.
%USERPROFILE%\.cursor\mcp.json
~/.cursor/mcp.json
~/.cursor/mcp.json
✅ Safe for Auto-Approval (alwaysAllow
)
test-connection
- Connection validation (read-only)execute-soql
- SOQL queries (read-only)describe-sobject
- Metadata inspection (read-only)get-record
- Single record retrieval (read-only)get-apex-logs
- Debug log access (read-only)list-metadata-types
- Metadata type discovery (read-only)⚠️ Requires Manual Approval
create-record
, update-record
, delete-record
, upsert-record
- Data modificationdeploy-metadata
- Metadata deploymentexecute-apex
, run-apex-tests
- Code executionexecute-sosl
- Search operations (can be resource-intensive)retrieve-metadata
- Metadata retrieval (can be large)https://login.salesforce.com
for production or https://test.salesforce.com
for sandboxes💡 Security Token: Only add the security token if Salesforce requires it for your connection. If not leave
SF_SECURITY_TOKEN
empty.
# Test individual tools node tests/test-query-tools.js node tests/test-data-tools.js node tests/test-apex-tools.js node tests/test-metadata-tools.js
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Jarosław Jaworski
Part of this implementation was developed with assistance from Claude Sonnet 4 using the Cline VS Code extension, demonstrating the power of AI-assisted development in creating comprehensive developer tools.
This project is licensed under the MIT License - see the LICENSE file for details.