mcp-salesforce-connector

v0.1.18
mcp-salesforce-connector Checked 5 days ago Published 4 months ago

A Model Context Protocol (MCP) server implementation for Salesforce integration

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

run_soql_query

Executes a SOQL query against Salesforce. TOKEN OPTIMIZATION GUIDELINES: - Always SELECT only the fields you need (never SELECT *) - Use LIMIT to restrict results (start with LIMIT 10, increase if needed) - Use WHERE clauses to filter data server-side - Default output is CSV format (most token-efficient) - Use format='json' only when you need nested data structure - You can always run additional queries if you need more data Example efficient query: SELECT Id, Name FROM Account WHERE IsActive = true LIMIT 20

ParameterTypeDescription
query *stringThe SOQL query to execute. Always include LIMIT clause and select only needed fields.
formatstringOutput format: 'csv' (default, most compact), 'compact' (JSON no whitespace), 'json' (full JSON)

get_object_fields

Retrieves field names and types for a Salesforce object. Use this to discover available fields before writing SOQL queries. Output is CSV format: name,label,type,updateable

ParameterTypeDescription
object_name *stringThe Salesforce object API name (e.g., 'Account', 'Contact', 'Store__c')

get_record

Retrieves a specific record by ID. Returns all fields - prefer SOQL with specific fields for token efficiency.

ParameterTypeDescription
object_name *stringThe Salesforce object API name (e.g., 'Account', 'Contact')
record_id *stringThe 15 or 18 character Salesforce record ID
formatstringOutput format: 'compact' (default), 'json'

create_record

Creates a new record

ParameterTypeDescription
data *objectThe data for the new record
object_name *stringThe name of the Salesforce object (e.g., 'Account', 'Contact')

update_record

Updates an existing record

ParameterTypeDescription
data *objectThe updated data for the record
object_name *stringThe name of the Salesforce object (e.g., 'Account', 'Contact')
record_id *stringThe ID of the record to update

delete_record

Deletes a record

ParameterTypeDescription
object_name *stringThe name of the Salesforce object (e.g., 'Account', 'Contact')
record_id *stringThe ID of the record to delete

tooling_execute

Executes a Tooling API request

ParameterTypeDescription
action *stringThe Tooling API endpoint to call (e.g., 'sobjects/ApexClass')
dataobjectData for POST/PATCH requests
methodstringThe HTTP method (default: 'GET')

apex_execute

Executes an Apex REST request

ParameterTypeDescription
action *stringThe Apex REST endpoint to call (e.g., '/MyApexClass')
dataobjectData for POST/PATCH requests
methodstringThe HTTP method (default: 'GET')

restful

Makes a direct REST API call to Salesforce

ParameterTypeDescription
path *stringThe path of the REST API endpoint (e.g., 'sobjects/Account/describe')
dataobjectData for POST/PATCH requests
methodstringThe HTTP method (default: 'GET')
paramsobjectQuery parameters for the request

list_sobjects

Retrieves a list of all available Salesforce SObjects (standard and custom).

bulk_create_records

Creates multiple records of a specified SObject type in bulk.

ParameterTypeDescription
data *arrayA list of records to create. Each record is a dictionary of field names and values.
object_name *stringThe API name of the Salesforce SObject (e.g., 'Account', 'MyCustomObject__c').

bulk_update_records

Updates multiple records of a specified SObject type in bulk. Each record must have an 'Id' field.

ParameterTypeDescription
data *arrayA list of records to update. Each record is a dictionary of field names and values, and *must* include an 'Id' field.
object_name *stringThe API name of the Salesforce SObject (e.g., 'Account', 'MyCustomObject__c').

bulk_delete_records

Deletes multiple records of a specified SObject type in bulk, given their IDs.

ParameterTypeDescription
object_name *stringThe API name of the Salesforce SObject (e.g., 'Account', 'MyCustomObject__c').
record_ids *arrayA list of record IDs (strings) to delete.