Skip to main content
Glama
Salesforce MCP Server

Salesforce MCP Server

by mintmcp

Salesforce MCP Server

Setup

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

Related MCP server: Salesforce MCP Server

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

Integration User on MintMCP (client credentials): the free Salesforce Integration licence is API-only, so it can't do the browser login. Let MintMCP mint the token instead: set the connector's auth method to OAuth client credentials with token URL https://<your My Domain>/services/oauth2/token, your app's consumer key and secret, an empty scope, and map access_token → SALESFORCE_ACCESS_TOKEN and instance_url → SALESFORCE_INSTANCE_URL.

On the Salesforce app, enable the client credentials flow, set Run As to the integration user, and pre-authorize that user (admin-approved users, plus its profile or permission set under App Policies). Salesforce returns no refresh token or expires_in for this flow, so MintMCP caches each token for about 15 minutes and mints a new one on the next call after that. A revoked session can fail calls for up to that long.

File downloads (optional):

SALESFORCE_MAX_DOWNLOAD_BYTES=10485760   # max download_file size in bytes (default 10 MB)

download_file with mode="read" extracts a PDF's text instead of returning base64. Each read call returns at most 100,000 characters of page text, 200 pages, or 10 seconds of processing (fixed limits); longer PDFs continue with start_page. OCR is not supported.

Access Mode

Control which tools are available by setting SALESFORCE_ACCESS_MODE:

Value

Tools Available

Use Case

read

list_objects, describe_object, run_soql_query, run_sosl_search, get_record, list_files, download_file, get_report_metadata, get_report_type_fields

Safe exploration, reporting, read-only integrations

read_write

All read tools + create_record, update_record, upload_file

Day-to-day CRM operations

all (default)

All tools including delete_record, tooling_execute, apex_execute, restful

Full API access

Environment

Recommended Mode

Rationale

Production (end users)

read

Prevents accidental data modification

Production (trusted ops)

read_write

Allows CRM data entry, blocks deletes and raw API

Sandbox / Development

all

Full access for testing and development

Demo / Exploration

read

Safe 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.

Note: download_file returns file contents inline and is read-only, but it broadens the data-exfiltration surface beyond ordinary record reads. Consider granting it separately in MintMCP rather than treating it as equivalent to the other read tools, and cap size with SALESFORCE_MAX_DOWNLOAD_BYTES.

Tool Permissions by Access Mode

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

Tool

Access Mode

readOnlyHint

destructiveHint

openWorldHint

list_objects

read

true

—

—

describe_object

read

true

—

—

run_soql_query

read

true

—

—

run_sosl_search

read

true

—

—

get_record

read

true

—

—

list_files

read

true

—

—

download_file

read

true

—

—

get_report_metadata

read

true

—

—

get_report_type_fields

read

true

—

—

create_record

read_write

false

—

—

update_record

read_write

false

—

—

upload_file

read_write

false

—

—

delete_record

all

false

true

—

tooling_execute

all

false

—

true

apex_execute

all

false

—

true

restful

all

false

—

true

Run

.venv/bin/python -m salesforce_mcp

Tools

Tool

Description

list_objects

List all Salesforce objects in the org (with optional search filter)

describe_object

Get fields, relationships, picklist values, and record types for an object

run_soql_query

Execute a SOQL query

run_sosl_search

Cross-object full-text search via SOSL

get_record

Get a single record by ID

list_files

List files (ContentDocuments) attached to a record

download_file

Download a file's contents by ContentVersionId or ContentDocumentId, or read a PDF's text with mode="read"

get_report_metadata

Get detailed metadata for a report (columns, filters, groupings, report type)

get_report_type_fields

Drill into the report type's field catalog — list categories, or fetch fields for one category

create_record

Create a new record

update_record

Update fields on an existing record

upload_file

Upload a file (ContentVersion), optionally attaching it to a record

delete_record

Permanently delete a record

tooling_execute

Salesforce Tooling API (metadata, Apex classes, custom fields)

apex_execute

Call custom Apex REST endpoints

restful

Generic Salesforce REST API call

Available Tools

11 tools
apex_executeB

Call a custom Apex REST endpoint. These are org-specific REST services written in Apex by developers. The action is the URL path after /services/apexrest/.

This will return an error if no custom Apex REST endpoints exist in the org.

Inputs: action (required), method, data.

create_recordA

Create a new Salesforce record. Provide the object name and a dict of field values.

    Call describe_object first to see required fields and valid picklist values.
    The data dict keys must be field API names (e.g., LastName, not "Last Name").
    Returns the new record's ID on success.

    Example: create_record("Contact", {"LastName": "Smith", "Email": "smith@example.com"})

Inputs: object_name (required), data (required).

delete_recordA
Destructive

Permanently delete a Salesforce record. This cannot be undone via the API. Records go to the Recycle Bin and can be recovered by an admin within 15 days.

Inputs: object_name (required), record_id (required).

describe_objectA
Read-only

Get complete metadata for a Salesforce object: fields, relationships, picklist values, and record types. Call this before querying or writing to an unfamiliar object.

Each field includes: name (API name), label, type, referenceTo (for lookups),
picklistValues (for picklists), nillable, createable, updateable.

Common types: string, picklist, reference (lookup/master-detail), boolean, date,
datetime, currency, double, int, id, textarea, phone, email, url.

Standard objects: Account, Contact, Lead, Opportunity, Case, Task, Event, User.
Custom objects and fields end in __c.

Inputs: object_name (required).

get_recordA
Read-only

Get a single Salesforce record by its ID. Returns all readable fields.

Record IDs are 15 or 18 character strings. The first 3 characters indicate the object
type (001=Account, 003=Contact, 006=Opportunity, 00Q=Lead, 500=Case).

Use run_soql_query or run_sosl_search to find record IDs if you only have a name or email.

Inputs: object_name (required), record_id (required).

list_objectsA
Read-only

List all Salesforce objects in this org. Use this as the first step when exploring an unfamiliar org or when you need to find a custom object.

Returns: name (API name), label (display name), queryable, createable, custom.
Use the optional search parameter to filter by name/label substring.
Standard objects: Account, Contact, Lead, Opportunity, Case, Task, Event, User.
Custom objects end in __c (e.g., Invoice__c).
Follow up with describe_object to see fields for any object.

Inputs: search. Returns: result

restfulA

Execute a raw Salesforce REST API call. This is an escape hatch for API endpoints not covered by other tools.

    Common paths:
    - sobjects/ — list all objects
    - sobjects/Account/describe/ — describe an object
    - analytics/reports/ — list reports
    - analytics/reports/{id} — run a report
    - limits/ — API usage limits
    - tooling/query/?q=SOQL — query metadata

    The path is relative to /services/data/vXX.0/. Method defaults to GET.

Inputs: path (required), method, params, data.

run_soql_queryA
Read-only

Execute a SOQL query. SOQL syntax: SELECT fields FROM Object WHERE conditions ORDER BY field LIMIT n

Use SOQL when you know which object to query. Use run_sosl_search instead when
searching by keyword across multiple objects.

Common objects: Account, Contact, Lead, Opportunity, Case, Task, Event, User.
Custom objects end in __c. Custom fields end in __c.

Relationship queries use dot notation for parent (SELECT Contact.Account.Name FROM Contact)
and subqueries for children (SELECT Name, (SELECT LastName FROM Contacts) FROM Account).

Always include LIMIT to avoid large result sets. Call describe_object first if you
don't know the available fields. Results include totalSize, done, and records array.

Inputs: query (required).

tooling_executeA

Execute a Salesforce Tooling API call. The Tooling API accesses metadata and developer objects: ApexClass, ApexTrigger, CustomField, Flow, ValidationRule.

    Example: tooling_execute("query/?q=SELECT Id,Name FROM ApexClass LIMIT 5")
    Example: tooling_execute("query/?q=SELECT Id,TableEnumOrId FROM CustomField WHERE TableEnumOrId='Account'")

    Use run_soql_query for regular data queries. Use this for metadata inspection.

Inputs: action (required), method, data.

update_recordA

Update fields on an existing Salesforce record. Only include fields you want to change.

    Example: update_record("Opportunity", "006...", {"StageName": "Closed Won", "CloseDate": "2026-03-15"})
    Returns HTTP 204 on success.

Inputs: object_name (required), record_id (required), data (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a distinct purpose with clear boundaries. For example, create_record, get_record, update_record, and delete_record form a clean CRUD pattern, while run_soql_query and run_sosl_search differentiate between structured queries and full-text searches. The apex_execute, restful, and tooling_execute tools serve as specialized escape hatches for custom Apex, raw REST API, and metadata operations, respectively, with no overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as create_record, describe_object, and run_soql_query. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions across the 11 tools.

    Tool Count5/5

    With 11 tools, the server is well-scoped for Salesforce operations, covering core data management (CRUD), metadata exploration, querying, and specialized API calls. Each tool serves a specific role without redundancy, making the count appropriate for the domain's complexity and typical use cases.

    Completeness5/5

    The tool set provides comprehensive coverage for Salesforce interactions, including full CRUD lifecycle for records, metadata inspection with list_objects and describe_object, querying via SOQL and SOSL, and escape hatches for custom and raw API calls. There are no obvious gaps; agents can perform all essential operations from exploration to data manipulation and integration.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables secure interaction with Salesforce orgs through LLMs, providing tools for managing orgs, querying data, deploying metadata, running tests, and performing code analysis with granular access control and encrypted authentication.
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables natural language interactions with Salesforce data and metadata, supporting queries, data manipulation, custom object/field management, Apex code operations, and debug logging across multiple authentication methods.
      15
      5,358 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language interactions with Salesforce, allowing users to query and modify data, manage custom objects and fields, execute Apex code, and perform SOQL/SOSL searches across Salesforce organizations.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to interact with Salesforce through a secure interface for performing CRUD operations, executing SOQL queries, and managing schema discovery. It features a smart learning system that analyzes custom objects and fields to provide intelligent assistance tailored to specific Salesforce configurations.
      14
      53 npm
      17
      BSD 2-Clause "Simplified"