Salesforce MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SALESFORCE_TOKENYesYour Salesforce security token (Reset from Salesforce Settings)
SALESFORCE_PASSWORDYesYour Salesforce password
SALESFORCE_USERNAMEYesYour Salesforce username
SALESFORCE_INSTANCE_URLNoSalesforce organization URLhttps://login.salesforce.com

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
salesforce_search_objects

Search for Salesforce standard and custom objects by name pattern. Examples: 'Account' will find Account, AccountHistory; 'Order' will find WorkOrder, ServiceOrder__c etc.

salesforce_describe_object

Get detailed schema metadata including all fields, relationships, and field properties of any Salesforce object. Examples: 'Account' shows all Account fields including custom fields; 'Case' shows all Case fields including relationships to Account, Contact etc.

salesforce_query_records

Query records from any Salesforce object using SOQL, including relationship queries.

Examples:

  1. Parent-to-child query (e.g., Account with Contacts):
    • objectName: "Account"
    • fields: ["Name", "(SELECT Id, FirstName, LastName FROM Contacts)"]
  2. Child-to-parent query (e.g., Contact with Account details):
    • objectName: "Contact"
    • fields: ["FirstName", "LastName", "Account.Name", "Account.Industry"]
  3. Multiple level query (e.g., Contact -> Account -> Owner):
    • objectName: "Contact"
    • fields: ["Name", "Account.Name", "Account.Owner.Name"]
  4. Related object filtering:
    • objectName: "Contact"
    • fields: ["Name", "Account.Name"]
    • whereClause: "Account.Industry = 'Technology'"

Note: When using relationship fields:

  • Use dot notation for parent relationships (e.g., "Account.Name")
  • Use subqueries in parentheses for child relationships (e.g., "(SELECT Id FROM Contacts)")
  • Custom relationship fields end in "__r" (e.g., "CustomObject__r.Name")
salesforce_dml_records

Perform data manipulation operations on Salesforce records:

  • insert: Create new records
  • update: Modify existing records (requires Id)
  • delete: Remove records (requires Id)
  • upsert: Insert or update based on external ID field Examples: Insert new Accounts, Update Case status, Delete old records, Upsert based on custom external ID
salesforce_manage_object

Create new custom objects or modify existing ones in Salesforce:

  • Create: New custom objects with fields, relationships, and settings
  • Update: Modify existing object settings, labels, sharing model Examples: Create Customer_Feedback__c object, Update object sharing settings Note: Changes affect metadata and require proper permissions
salesforce_manage_field

Create new custom fields or modify existing fields on any Salesforce object:

  • Field Types: Text, Number, Date, Lookup, Master-Detail, Picklist etc.
  • Properties: Required, Unique, External ID, Length, Scale etc.
  • Relationships: Create lookups and master-detail relationships Examples: Add Rating__c picklist to Account, Create Account lookup on Custom Object Note: Changes affect metadata and require proper permissions
salesforce_search_all

Search across multiple Salesforce objects using SOSL (Salesforce Object Search Language).

Examples:

  1. Basic search across all objects: { "searchTerm": "John", "objects": [ { "name": "Account", "fields": ["Name"], "limit": 10 }, { "name": "Contact", "fields": ["FirstName", "LastName", "Email"] } ] }
  2. Advanced search with filters: { "searchTerm": "Cloud*", "searchIn": "NAME FIELDS", "objects": [ { "name": "Account", "fields": ["Name", "Industry"], "orderBy": "Name DESC", "where": "Industry = 'Technology'" } ], "withClauses": [ { "type": "NETWORK", "value": "ALL NETWORKS" }, { "type": "SNIPPET", "fields": ["Description"] } ] }

Notes:

  • Use * and ? for wildcards in search terms
  • Each object can have its own WHERE, ORDER BY, and LIMIT clauses
  • Support for WITH clauses: DATA CATEGORY, DIVISION, METADATA, NETWORK, PRICEBOOKID, SNIPPET, SECURITY_ENFORCED
  • "updateable" and "viewable" options control record access filtering