← Back to directory
S

Salesforce MCP Server

Community
Integrate Claude with Salesforce for natural language data and metadata management
GitHub source repository ↗
★ 167 Stars Category · Other Very popular Source revision 98e2ad5d9e28
48FMRS · D
Reliability
8/20
Security and permissions
4/20
Maintenance
7/20
Documentation
15/20
Setup experience
14/20

This server is feature-rich and supports a wide range of Salesforce operations, but requires careful configuration of authentication and environment. It is a community-maintained project, not official, and is suitable for developers to use for natural language interaction with Salesforce, but caution is needed regarding security and compatibility.

Read the FMRS scoring method →

This is an MCP (Model Context Protocol) server implementation that integrates Claude with Salesforce, enabling natural language interactions with your Salesforce data and metadata. It supports object and field management, smart object search, detailed schema information, flexible data queries, data manipulation, cross-object search, Apex code management, and intuitive error handling. The server supports multiple authentication methods including username/password, OAuth 2.0 client credentials flow, Salesforce CLI, and direct access token, and can be run in Docker containers.

Tools

salesforce_search_objects
Search for standard and custom objects by partial name matches.
salesforce_describe_object
Get detailed object schema information including field definitions, relationships, and picklist values.
salesforce_query_records
Query records with support for parent-child relationships and complex WHERE conditions.
salesforce_aggregate_query
Execute aggregate queries with GROUP BY, supporting COUNT, SUM, AVG, MIN, MAX, and HAVING clauses.
salesforce_dml_records
Perform data operations: insert, update, delete, and upsert using external IDs.
salesforce_manage_object
Create and modify custom objects, including updating object properties and sharing settings.
salesforce_manage_field
Manage object fields: add custom fields, modify field properties, and create relationships, with automatic Field Level Security for System Administrator.
salesforce_manage_field_permissions
Manage Field Level Security (Field Permissions) by granting or revoking access for profiles, and bulk updating permissions.
salesforce_search_all
Search across multiple objects using SOSL, supporting multiple objects and field snippets.
salesforce_read_apex
Read Apex classes: get full source code, list classes by name pattern, and view metadata, with wildcard support.
salesforce_write_apex
Create and update Apex classes, including specifying API versions.
salesforce_read_apex_trigger
Read Apex triggers: get full source code, list triggers by name pattern, and view metadata, with wildcard support.
salesforce_write_apex_trigger
Create and update Apex triggers, including specifying API versions and event operations.
salesforce_execute_anonymous
Execute anonymous Apex code without creating a permanent class, with debug logs and results.
salesforce_manage_debug_logs
Manage debug logs: enable, disable, retrieve logs, and configure log levels (NONE to FINEST).

Setup

  1. Ensure Node.js 20+ (bun is not supported). 2. Install globally via npm: npm install -g @tsmztech/mcp-server-salesforce. 3. Configure claude_desktop_config.json with the appropriate environment variables for your chosen authentication method (username/password, OAuth, CLI, or access token). 4. Alternatively, use Docker: clone the repo, build the image, run the container, and configure the MCP client.
claude_desktop_config.json
{"mcpServers":{"salesforce":{"command":"npx","args":["-y","@tsmztech/mcp-server-salesforce"],"env":{"SALESFORCE_CONNECTION_TYPE":"User_Password","SALESFORCE_USERNAME":"your_username","SALESFORCE_PASSWORD":"your_password","SALESFORCE_TOKEN":"your_security_token","SALESFORCE_INSTANCE_URL":"org_url"}}}}

Fit and risk

Best for

  • Developers and admins who want to interact with Salesforce using natural language.
  • Teams needing to bridge Claude with Salesforce for data operations or metadata management.
  • Enterprise environments that can run Node.js and support multiple authentication methods.

Not for

  • Does not support bun runtime; must use Node.js.
  • Not suitable for scenarios requiring a GUI or non-command-line interaction.
  • If security is critical, ensure proper authentication configuration to avoid using outdated default API versions.

Required permissions

  • Requires Salesforce account credentials: username/password + security token, OAuth client credentials, or access token.
  • Needs appropriate Salesforce permissions to perform read/write operations, such as creating objects, fields, Apex code, etc.
  • For Salesforce CLI authentication, a CLI-authenticated environment is required.

Risks and side effects

  • Misconfiguration could lead to data corruption or accidental modifications, e.g., when using DML tools.
  • If the API version is too old, new standard objects may not be accessible, limiting functionality.
  • Using direct access tokens may pose security risks if tokens are leaked.
  • Docker containers cannot use the CLI's OAuth login flow, which may cause authentication failures.

Troubleshooting

  1. Ensure the server runs with Node.js, not bun, to avoid HTTP transport hanging.
  2. Check environment variables are correctly set, especially `SALESFORCE_INSTANCE_URL` which is required for OAuth.
  3. If encountering 'sObject type not supported' errors, set the `SALESFORCE_API_VERSION` environment variable, e.g., `62.0`.
  4. For Docker, ensure using environment variable authentication rather than CLI login.
  5. If using username/password authentication, confirm the security token is correct.

Use cases

Create and modify custom objects, fields, and field-level security using natural language.
Query and aggregate Salesforce records, including cross-object searches and complex filtering.
Manage Apex classes and triggers, including reading, creating, and updating.
Execute anonymous Apex code for data operations or batch processing.
Enable and retrieve debug logs for troubleshooting.

Supported clients

Claude DesktopFull support