home / mcp / mcp salesforce mcp server

MCP Salesforce MCP Server

MCP Salesforce connector

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "leilaabdel-mcp-salesforce": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-salesforce-connector",
        "salesforce"
      ],
      "env": {
        "SALESFORCE_PASSWORD": "YOUR_SALESFORCE_PASSWORD",
        "SALESFORCE_USERNAME": "YOUR_SALESFORCE_USERNAME",
        "SALESFORCE_SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
      }
    }
  }
}

You can connect to Salesforce from an MCP client and run SOQL queries, SOSL searches, manage records, and access various Salesforce APIs through a dedicated MCP server. This enables LLMs to interact with Salesforce data directly and securely via a standardized protocol.

How to use

You will configure the MCP Salesforce Connector in your client’s MCP setup, then reference the server by its name from your client. Use this server to perform queries, searches, and CRUD operations against Salesforce data, as well as to call tooling, Apex REST, and direct REST endpoints.

How to install

# Prerequisites
# Ensure you have Node.js installed on your system
# Ensure you have the MCP runtime/cli available as `uvx` or via your workflow

# Add the MCP Salesforce Connector configuration to your client config
cat > claude_desktop_config.json << 'JSON'
{
  "mcpServers": {
    "salesforce": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-salesforce-connector",
        "salesforce"
      ],
      "env": {
        "SALESFORCE_USERNAME": "YOUR_SALESFORCE_USERNAME",
        "SALESFORCE_PASSWORD": "YOUR_SALESFORCE_PASSWORD",
        "SALESFORCE_SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
      }
    }
  }
}
JSON

# Replace the placeholders with your Salesforce credentials
# Example substitutions (do not include literal placeholders in production)
# [email protected]
# SALESFORCE_PASSWORD=yourpassword
# SALESFORCE_SECURITY_TOKEN=yourtoken

# Start using the MCP Salesforce Connector from your MCP client
# The exact client invocation will depend on your setup
```

Note: The configuration snippet above shows how to enable the Salesforce MCP server within your MCP client. You will replace the credential placeholders with your actual Salesforce credentials before running the client. If you already have an MCP client running, add the server entry to your existing configuration and restart the client to pick up the new server.

Additional sections

Environment and security considerations: store credentials securely and limit access to the MCP client configuration. Use dedicated Salesforce credentials for MCP integration and rotate tokens periodically. If you need to revoke access, remove or disable the Salesforce MCP server entry in your client configuration.

Configuration details

{
  "mcpServers": {
    "salesforce": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-salesforce-connector",
        "salesforce"
      ],
      "env": {
        "SALESFORCE_USERNAME": "YOUR_SALESFORCE_USERNAME",
        "SALESFORCE_PASSWORD": "YOUR_SALESFORCE_PASSWORD",
        "SALESFORCE_SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
      }
    }
  }
}

Available tools

SOQL queries

Execute SOQL queries to retrieve Salesforce objects and fields, enabling precise data extraction from Salesforce records.

SOSL searches

Perform SOSL searches across multiple Salesforce objects to locate records quickly.

Metadata retrieval

Retrieve metadata for Salesforce objects, including field names, labels, and types.

CRUD operations

Retrieve, create, update, and delete Salesforce records to manage data lifecycle.

Tooling API access

Send requests to the Salesforce Tooling API for development tooling data and metadata.

Apex REST calls

Execute Apex REST requests to interact with custom Apex endpoints.

Direct REST calls

Make direct REST API calls to Salesforce for custom integrations.