kazuki1213/salesforce-mcp-server
If you are the rightful owner of salesforce-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that enables Claude Desktop to interact with Salesforce through natural language commands.
Salesforce MCP Server
A Model Context Protocol (MCP) server that enables Claude Desktop to interact with Salesforce through natural language commands.
π Quick Start
1. Clone and Setup
git clone https://github.com/salesforce/mcp-server.git
cd salesforce-mcp-server
./setup.sh
2. The setup script will:
- Collect your Salesforce credentials
- Install dependencies
- Build the project
- Generate Claude Desktop configuration
3. Install in Claude Desktop
# macOS
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/
# Windows
copy claude_desktop_config.json %APPDATA%\Claude\
# Linux
cp claude_desktop_config.json ~/.config/Claude/
4. Restart Claude Desktop and start using!
π¬ Natural Language Examples
In Claude Desktop, you can now use natural language:
"Show me all accounts created this month"
"Create a new contact named John Doe for Acme Corp"
"Find opportunities closing this quarter"
"Update the phone number for contact Jane Smith to 555-1234"
"List accounts without any opportunities"
π§ Available Tools
querySOQL
Execute SOQL queries or natural language searches:
"Show me all opportunities"
"SELECT Id, Name FROM Account LIMIT 10"
"Find contacts with email addresses"
getAccount
Retrieve account details by ID:
"Get account 001XX000003DHPl"
createContact
Create new contacts:
"Create contact John Doe with email john@example.com"
updateAccount
Update existing accounts:
"Update account 001XX000003DHPl set industry to Technology"
π Prerequisites
- Node.js 18 or higher
- Claude Desktop app
- Salesforce account with:
- API access enabled
- Security token (get from Setup β Personal Information β Reset Security Token)
π Manual Setup
If you prefer manual setup:
- Create .env file:
SF_INSTANCE_URL=https://login.salesforce.com
SF_USERNAME=your-email@example.com
SF_PASSWORD=your-password
SF_TOKEN=your-security-token
- Install and build:
npm install
npm run build
- Configure Claude Desktop:
Edit
claude_desktop_config.json
with your credentials and absolute path to the server.
π€ Troubleshooting
Connection Issues
- Invalid credentials: Check username/password in .env
- Missing security token: Reset in Salesforce Setup β Personal Information
- IP restrictions: Add your IP to Salesforce trusted ranges
Common Errors
INVALID_SESSION_ID
: Re-run setup.sh to refresh credentialsINSUFFICIENT_ACCESS
: Check API permissions for your Salesforce userUNABLE_TO_LOCK_ROW
: Retry the operation
Debug Mode
Add to .env for detailed logs:
LOG_LEVEL=debug
π¦ Resources
The server provides access to Salesforce metadata:
salesforce://objects
- List of available Salesforce objectssalesforce://account-fields
- Field definitions for Account object
π‘ Architecture
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Claude Desktop ββββββΆβ MCP Server ββββββΆβ Salesforce β
β βββββββ (Node.js) βββββββ REST API β
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β² β
β βΌ
β βββββββββββββββ
βββββββββββββββββββ Natural β
β Language β
β Processing β
βββββββββββββββ
π Examples
Basic Queries
// In Claude Desktop:
"Show me all accounts"
"Find contacts without email"
"List opportunities closing this month"
Creating Records
"Create a contact named Jane Smith with email jane@example.com for account Acme Corp"
"Create an opportunity called 'Big Deal' for $50,000 closing next month"
Complex Queries
"Find accounts with open opportunities worth more than $100k"
"Show me contacts from companies in the technology industry"
"List all won opportunities from last quarter"
π€ Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
π License
MIT License - see for details.