Provides tools for querying Salesforce data, including retrieving accounts by ID, searching accounts by name, and fetching recent opportunities.
Salesforce Basic MCP Server
A simple Model Context Protocol (MCP) server that provides AI assistants with tools to query Salesforce data.
Features
✅ Get Account by ID
✅ Search Accounts by name
✅ Get recent Opportunities
Setup
1. Install Dependencies
2. Configure Salesforce Credentials
Create a .env file in the project root:
How to get your Security Token:
Log into Salesforce
Click your profile icon → Settings
On the left sidebar: Personal → Reset My Security Token
Check your email for the token
3. Run the Server
4. Test with MCP Inspector
Available Tools
get_account
Get a Salesforce Account by ID.
Parameters:
account_id(string): The Salesforce Account ID
Example:
search_accounts
Search for Accounts by name.
Parameters:
name(string): The account name to search for
Example:
get_recent_opportunities
Get the most recent Opportunities.
Parameters:
limit(integer, optional): Number to return (default: 5, max: 20)
Example:
Connect to Claude Desktop
Add to your Claude Desktop config file:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config. json
Security Notes
⚠️ Never commit
The
.gitignorefile is configured to exclude itUse environment variables in production
Troubleshooting
"Authentication Failed"
Double-check username, password, and security token
Verify your IP is not blocked in Salesforce
For sandboxes, use
SF_DOMAIN=test
"Module not found"
Make sure virtual environment is activated
Run
uv add "mcp[cli]" simple-salesforce python-dotenv
Next Steps
Add more Salesforce objects (Contacts, Cases, etc.)
Implement create/update operations
Add error logging
Add data validation