MCP Hub
Back to servers

Salesforce MCP Server

Enables interaction with Salesforce orgs to perform operations like querying data with SOQL, managing records, and executing Apex code. It provides configurable access levels and support for both standard and Tooling APIs via natural language interfaces.

glama
Updated
Mar 4, 2026

Salesforce MCP Server

Setup

uv venv .venv
uv pip install --python .venv/bin/python -e .

Configuration

Set environment variables for authentication:

Username/Password (default):

SALESFORCE_USERNAME=your-username
SALESFORCE_PASSWORD=your-password
SALESFORCE_SECURITY_TOKEN=your-token
SALESFORCE_DOMAIN=login          # or "test" for sandbox

Note: SOAP API login is disabled by default in newer Salesforce orgs. To enable it:

  1. Go to Setup → Quick Find → User Interface
  2. Under API Settings, enable Enable SOAP API login()
  3. Click Save

OAuth (alternative, recommended for enterprise):

SALESFORCE_ACCESS_TOKEN=your-token
SALESFORCE_INSTANCE_URL=https://your-instance.salesforce.com

Access Mode

Control which tools are available by setting SALESFORCE_ACCESS_MODE:

ValueTools AvailableUse Case
readlist_objects, describe_object, run_soql_query, run_sosl_search, get_recordSafe exploration, reporting, read-only integrations
read_writeAll read tools + create_record, update_recordDay-to-day CRM operations
all (default)All tools including delete_record, tooling_execute, apex_execute, restfulFull API access

Recommended Security Levels

EnvironmentRecommended ModeRationale
Production (end users)readPrevents accidental data modification
Production (trusted ops)read_writeAllows CRM data entry, blocks deletes and raw API
Sandbox / DevelopmentallFull access for testing and development
Demo / ExplorationreadSafe for exploring org structure and data

Set it in your environment or MCP server config:

SALESFORCE_ACCESS_MODE=read

Tip: When using this server with MintMCP, you can configure fine-grained per-tool permissions directly in MintMCP instead of using the env var. This gives you more granular control (e.g., allow create but not update) without needing to restart the server.

Tool Permissions by Access Mode

MCP tool annotations (readOnlyHint, destructiveHint) are set on each tool so MCP clients can enforce additional policies:

ToolAccess ModereadOnlyHintdestructiveHintopenWorldHint
list_objectsreadtrue
describe_objectreadtrue
run_soql_queryreadtrue
run_sosl_searchreadtrue
get_recordreadtrue
create_recordread_writefalse
update_recordread_writefalse
delete_recordallfalsetrue
tooling_executeallfalsetrue
apex_executeallfalsetrue
restfulallfalsetrue

Run

.venv/bin/python -m salesforce_mcp

Tools

ToolDescription
list_objectsList all Salesforce objects in the org (with optional search filter)
describe_objectGet fields, relationships, picklist values, and record types for an object
run_soql_queryExecute a SOQL query
run_sosl_searchCross-object full-text search via SOSL
get_recordGet a single record by ID
create_recordCreate a new record
update_recordUpdate fields on an existing record
delete_recordPermanently delete a record
tooling_executeSalesforce Tooling API (metadata, Apex classes, custom fields)
apex_executeCall custom Apex REST endpoints
restfulGeneric Salesforce REST API call

Reviews

No reviews yet

Sign in to write a review