Exposes Salesforce CRM Lead operations, including lead creation, retrieval, updates, deletion, status management, conversion via SOAP, and idempotent lead synchronization.
Click on "Install 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 ServerCreate a new lead for Jane Doe from Acme Corp"
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
A Model Context Protocol (MCP) server for Salesforce CRM integration. This server provides tools to interact with Salesforce Leads through the MCP protocol, enabling AI assistants, workflows, and copilots to manage Salesforce CRM lead data safely.
Features
Lead Sync Integration
Automated Lead Syncing: Sync leads from your platform into Salesforce CRM using a safe upsert-like flow
Duplicate Prevention: Checks existing leads by email before creating a new one
Idempotent Operations: Safe to call multiple times with the same data - no duplicates
Lead Status Handling:
scheduled→ triggers Lead Conversionobjected→ updates Lead status only (no conversion)
SOQL Safe Queries: Email values are escaped to prevent query-breaking characters
Error Handling: Clear validation and authentication errors returned in JSON format
Correlation IDs: Every tool response contains a correlation ID for debugging
Lead Management
Full CRUD Operations: Complete lead management capabilities
List leads with limit support
Get lead by email
Create new lead
Update existing lead fields
Delete lead
Update lead status
Sync lead (upsert by email)
Technical Features
OAuth Integration: Accepts Salesforce bearer tokens via request headers
Type-Safe: Built with Pydantic schemas for strong validation
Switch/Match Tool Routing: Clean tool routing using
match caseCORS Support: Fully configurable CORS support via
config.pyStreamable HTTP Transport: Uses MCP
StreamableHTTPSessionManagerPostman Compatible: Designed to work correctly with Postman MCP testing
Prerequisites
Python 3.10 or higher
UV package manager
Salesforce OAuth access token + refresh token (from OAuth service)
Salesforce instance URL
Installation
Clone the repository:
Install dependencies using UV:
Edit .env and add your Salesforce config
.env
Authentication (Required Headers)
This MCP server expects authentication tokens via headers.
Required Headers Format
⚠️ Important
Usage Running the Server
Server will start on:
Available Tools
1. salesforce_sync_lead
2. salesforce_list_leads
3. salesforce_get_lead
4. salesforce_create_lead
5. salesforce_update_lead
6. salesforce_delete_lead
7. salesforce_update_lead_status
Response Format
All tool responses return:
Validation Error Response If validation fails, the server returns:
Authentication Error Response
If required auth headers are missing, the server returns:
Project Structure
🐳 Docker Support
This project is fully containerized, allowing you to run the Salesforce MCP server without installing local dependencies.
Build the Image From the root directory, run:
Run the Container Ensure your .env file is populated with your Salesforce credentials, then run:
Verify the Deployment
Check if the server is active by viewing the logs
INFO: Salesforce MCP Server active at 0.0.0.0:3333.
License
MIT License
Author
Sowmya ( sowmya@rapidinnovation.dev)