Integrate Claude with Salesforce for natural language management of data objects, schema, queries, and Apex code.
The Salesforce MCP (Model Context Protocol) Server is an advanced implementation that enables natural language interactions between Claude and your Salesforce data and metadata. By leveraging the Model Context Protocol, this server acts as a bridge, allowing AI applications to query, modify, and manage your Salesforce objects and records using everyday language. This integration enhances Claude's capabilities, making it easier for developers to build sophisticated AI solutions that can dynamically interact with Salesforce without requiring manual coding.
The server supports the creation and modification of custom objects and fields through natural language commands. Users can easily add new attributes or modify existing ones, ensuring their CRM system remains up-to-date and relevant to business needs.
With advanced search capabilities, users can quickly find Salesforce objects using partial name matches. This feature is particularly useful when dealing with large datasets where manual searches would be time-consuming.
Get comprehensive details about any object's fields and relationships through the salesforce_describe_object
tool. This tool provides field definitions, properties, and relationship specifics, enabling developers to make informed decisions during application development or maintenance.
Query records with support for parent-to-child and child-to-parent relationships, as well as complex WHERE conditions. The salesforce_query_records
tool allows users to retrieve specific data based on intricate filters, making it easier to manage large datasets efficiently.
Perform various data operations such as inserting, updating, deleting, and upserting records using the salesforce_dml_records
tool. This empowers developers to streamline their workflows by automating repetitive tasks without losing accuracy or functionality.
Use SOSL (Salesforce Object Search Language) with the salesforce_search_all
tool to search across multiple objects simultaneously. This feature is invaluable when dealing with cross-departmental data that spans different Salesforce entities.
Read, create, and update Apex classes and triggers using the salesforce_read_apex
, salesforce_write_apex
, salesforce_read_apex_trigger
, and salesforce_write_apex_trigger
tools. These functionalities help maintain and evolve Apex code without interrupting business operations.
Receive clear feedback with Salesforce-specific error details through the salesforce_manage_debug_logs
tool. This helps in troubleshooting issues quickly and efficiently, improving overall system reliability and performance.
The architecture of the Salesforce MCP Server is designed to seamlessly integrate with Claude Desktop and other AI applications. It follows a client-server model where the MCP protocol acts as the communication layer between clients and servers. Below is a schematic representation illustrating the flow:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe; stroke-width:2px;stroke:#000;
style C fill:#f3e5f5
style D fill:#e8f5e8
This visual highlights how data flows between the AI application (such as Claude Desktop or Continue), the MCP Client, the Protocol layer, and finally to the Salesforce Data Source. This design ensures a robust and secure connection while maintaining simplicity for end-users.
To get started, follow these steps:
# Install global package
npm install -g @tsmztech/mcp-server-salesforce
This command globally installs the Salesforce MCP Server, making it easily accessible on your system. Ensure you have Node.js and npm installed to execute this step.
Suppose a customer service team wants to gather quick feedback from clients regarding their recent purchases. Using the Salesforce MCP Server, they can create a new custom object called "CustomerFeedback" that includes fields for product ratings and comments. Customers can then leave real-time feedback through an AI-driven chatbot integrated with Claude Desktop. The server handles the data entry and storage, ensuring seamless interaction between AI and CRM.
A sales manager needs to analyze KPIs related to sales performance by quarter. With the Salesforce MCP Server, they can write queries to fetch relevant records based on date ranges and criteria. They then use these results in a BI tool or dashboard for further analysis, all driven by voice commands from their preferred AI assistant.
The Salesforce MCP Server supports integration with various AI applications, including but not limited to:
The compatibility matrix is as follows:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The Salesforce MCP Server has been tested and proven to work optimally with the listed clients. It ensures reliable communication between AI applications and Salesforce, maintaining high performance levels even under heavy load conditions.
For advanced users, configuring the server involves setting environmental variables for the server:
{
"mcpServers": {
"salesforceMCP": {
"command": "npx",
"args": ["-y", "@tsmx/server-salesFORCE"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Ensure you replace your-api-key
with your actual API key. This sample configuration shows the flexibility of the server in managing different MCP clients and their respective protocols.
A1: Yes, while the current focus is on supporting Claude Desktop, there's potential for compatibility with other AI tools through future updates or custom configurations.
A2: Security is maintained through encrypted communications using SSL/TLS protocols. Additionally, stringent access controls are in place to restrict unauthorized access.
A3: Prompts allow users to query objects based on specific conditions (e.g., "Find all contact records from last month"). They support complex queries and filters, making interactions more dynamic.
A4: The server is designed to handle a large volume of queries efficiently. However, performance may degrade under extremely high loads; monitoring tools are provided to manage such scenarios proactively.
A5: It's recommended to review and refresh your API keys periodically based on security policies, typically every 6 months unless there’s a specific reason to do so more frequently.
Contributions are welcome! If you want to improve or add new features, follow these steps:
git checkout -b feature-branch
.npm test
.Please refer to CONTRIBUTING.md for more specific instructions and coding standards.
Join the broader MCP community by exploring additional resources:
For more information, visit the MCP Protocol GitHub page where you can find ongoing developments and community activities.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods