home / mcp / salesforce mcp server

Salesforce MCP Server

SF MCP

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mattmahowald-sfmcp": {
      "command": "poetry",
      "args": [
        "run",
        "sfmcp-stdio"
      ],
      "env": {
        "SF_USERNAME": "your-username",
        "SF_ORG_ALIAS": "your-org-alias",
        "SFMCP_HTTP_HOST": "127.0.0.1",
        "SFMCP_HTTP_PORT": "3333",
        "SF_ACCESS_TOKEN": "your-access-token",
        "SF_INSTANCE_URL": "https://your-org.my.salesforce.com"
      }
    }
  }
}

The Salesforce MCP Server provides a set of MCP tools that let you interact with Salesforce data and metadata through an MCP client. It exposes common operations such as querying data, listing and describing Salesforce objects, and retrieving information about flows, reports, and dashboards, all via standardized MCP endpoints that you can use in Claude Desktop and other MCP clients.

How to use

You interact with the server through MCP clients by selecting one of the available tools and issuing natural language requests that map to those tools. The server translates your request into Salesforce CLI actions or SOQL queries and returns structured results that you can further use in your conversations.

How to install

Prerequisites are required before you install and configure the server. You will need Python 3.11 or newer, Poetry for dependency management, Node.js, and the Salesforce CLI to connect to your Salesforce org.

Step by step installation flow you can follow:

poetry install

Authenticate with Salesforce and prepare environment variables as you configure the MCP server.

If you prefer an automated setup, run the configuration script to configure SFMCP for your Salesforce org.

./install.py  # Configures SFMCP for your Salesforce org

Additional configuration and usage notes

Environment variables control the connection to Salesforce and the MCP server behavior. Create a .env file with the required values and ensure the MCP server can read them when starting.

If you are running the server locally for testing, you can start in STDIO mode or HTTP mode. STDIO is intended for MCP clients and runs through a local command, while HTTP is useful for testing HTTP-based endpoints.

Available tools

salesforce_query

Run SOQL queries and return structured results.

salesforce_list_objects

Get all Salesforce object names in your org.

salesforce_describe

Get detailed field information for a Salesforce object.

salesforce_list_flows

Get all Salesforce flows with status and version information.

salesforce_describe_flow

Get the complete XML metadata for a specific flow.

salesforce_list_reports

Get all Salesforce reports with folder and usage information.

salesforce_list_dashboards

Get all Salesforce dashboards with folder and usage information.