Salesforce MCP Server
Use this server to explore, query, and modify Salesforce org data and metadata through MCP, with access controlled by SALESFORCE_ACCESS_MODE.
List and describe Salesforce objects, fields, relationships, picklists, and record types.
Run SOQL queries and SOSL keyword searches across objects.
Retrieve individual records by ID.
List, download, and extract text from attached Salesforce files.
Inspect report metadata and report-type field catalogs.
Create, update, and delete records in write-enabled modes.
Upload files and attach them to records.
Execute Tooling API calls for metadata and developer objects such as Apex classes, triggers, custom fields, flows, and validation rules.
Call custom Apex REST endpoints.
Make generic raw Salesforce REST API calls as an escape hatch.
Configure read-only, read-write, or full-access modes, with tool annotations for client-side policy enforcement.
Authenticate via username/password/security token or OAuth access token/instance URL; MintMCP client-credentials flow is supported for integration users.
Provides tools for interacting with Salesforce CRM, enabling AI agents to query, create, update, and delete records, execute SOQL/SOSL queries, access metadata, run reports, and call custom Apex REST endpoints and Tooling API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Salesforce MCP Server find all high-value opportunities closing this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 sandboxNote: SOAP API login is disabled by default in newer Salesforce orgs. To enable it:
Go to Setup → Quick Find → User Interface
Under API Settings, enable Enable SOAP API login()
Click Save
OAuth (alternative, recommended for enterprise):
SALESFORCE_ACCESS_TOKEN=your-token
SALESFORCE_INSTANCE_URL=https://your-instance.salesforce.comIntegration 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 |
| 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 |
| All read tools + create_record, update_record, upload_file | Day-to-day CRM operations |
| All tools including delete_record, tooling_execute, apex_execute, restful | Full API access |
Recommended Security Levels
Environment | Recommended Mode | Rationale |
Production (end users) |
| Prevents accidental data modification |
Production (trusted ops) |
| Allows CRM data entry, blocks deletes and raw API |
Sandbox / Development |
| Full access for testing and development |
Demo / Exploration |
| Safe for exploring org structure and data |
Set it in your environment or MCP server config:
SALESFORCE_ACCESS_MODE=readTip: 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_filereturns 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 otherreadtools, and cap size withSALESFORCE_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 |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read | true | — | — |
| read_write | false | — | — |
| read_write | false | — | — |
| read_write | false | — | — |
| all | false | true | — |
| all | false | — | true |
| all | false | — | true |
| all | false | — | true |
Run
.venv/bin/python -m salesforce_mcpTools
Tool | Description |
| List all Salesforce objects in the org (with optional search filter) |
| Get fields, relationships, picklist values, and record types for an object |
| Execute a SOQL query |
| Cross-object full-text search via SOSL |
| Get a single record by ID |
| List files (ContentDocuments) attached to a record |
| Download a file's contents by ContentVersionId or ContentDocumentId, or read a PDF's text with |
| Get detailed metadata for a report (columns, filters, groupings, report type) |
| Drill into the report type's field catalog — list categories, or fetch fields for one category |
| Create a new record |
| Update fields on an existing record |
| Upload a file (ContentVersion), optionally attaching it to a record |
| Permanently delete a record |
| Salesforce Tooling API (metadata, Apex classes, custom fields) |
| Call custom Apex REST endpoints |
| Generic Salesforce REST API call |
Available Tools
11 toolsapex_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_recordADestructive
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_objectARead-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_recordARead-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_objectsARead-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_queryARead-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).
run_sosl_searchARead-only
Search across multiple Salesforce objects by keyword using full-text search.
Syntax: FIND {search_term} IN ALL FIELDS RETURNING Object1(fields), Object2(fields)
Use SOSL when you don't know which object contains the data, or need to search
across Account, Contact, Lead, Opportunity simultaneously.
Use run_soql_query instead for structured filtering (date ranges, status, owner).
Example: FIND {Acme} IN ALL FIELDS RETURNING Account(Id, Name), Contact(Id, Name, Email)
Wildcards: * (multiple chars), ? (single char). Minimum 2 characters.Inputs: search (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
Scored across 11 tools
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.
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.
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.
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
Related MCP Connectors
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Run SOQL queries against your Salesforce org to retrieve records and insights. Explore objects, fi…
Run SOQL queries to explore and retrieve Salesforce data. Inspect records, fields, and relationshi…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseAqualityDmaintenanceEnables 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.155,358 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseAqualityCmaintenanceEnables 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.1453 npm17BSD 2-Clause "Simplified"