MCP_Salesforce
Enables sales, marketing, and C-suite teams to search, view, and update Salesforce records through Claude, with tools for record management, activity tracking, and global search.
README
MCP Salesforce Server
A Model Context Protocol (MCP) server for Salesforce integration, designed for sales, marketing, and C-suite teams to seamlessly search, view, and update Salesforce records through Claude.
Features
- Search Functionality: Search across Accounts, Contacts, Opportunities, and Leads
- Record Management: View detailed information and update records
- Activity Management: Track recent activities and create new tasks
- Global Search: Search across all Salesforce records simultaneously
- Executive Dashboard: Access key metrics and data for decision-making
Prerequisites
- Node.js 18.0.0 or higher
- A Salesforce account with API access
- Connected App configured in Salesforce (see setup instructions below)
Salesforce Setup
1. Create a Connected App
- Log into your Salesforce org
- Go to Setup → App Manager
- Click New Connected App
- Fill in the basic information:
- Connected App Name: MCP Salesforce Integration
- API Name: MCP_Salesforce_Integration
- Contact Email: Your email address
- Enable OAuth Settings:
- Check Enable OAuth Settings
- Callback URL:
https://login.salesforce.com/services/oauth2/success - Selected OAuth Scopes: Add these scopes:
- Access and manage your data (api)
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Access your basic information (id, profile, email, address, phone)
- Click Save
- Wait for the Connected App to be created (may take 2-10 minutes)
2. Get Your Credentials
After creating the Connected App:
- Go to Setup → App Manager
- Find your Connected App and click View
- Copy the Consumer Key (this is your
CLIENT_ID) - Copy the Consumer Secret (this is your
CLIENT_SECRET)
3. Get Your Security Token
- Go to your personal settings by clicking your profile picture → Settings
- In the left sidebar, click Reset My Security Token
- Click Reset Security Token
- Check your email for the security token
4. Test Your Credentials
You can test your credentials using the Salesforce login:
- Username: Your Salesforce username (usually your email)
- Password: Your Salesforce password
- Security Token: The token you received via email
Installation and Usage
Option 1: Using npx (Recommended)
- Configure your Claude Desktop
mcp_settings.jsonfile:
{
"mcpServers": {
"MCP_Salesforce": {
"command": "npx",
"args": ["github:waaljair/MCP_Salesforce"],
"env": {
"SALESFORCE_LOGIN_URL": "https://login.salesforce.com",
"SALESFORCE_CLIENT_ID": "your_consumer_key_here",
"SALESFORCE_CLIENT_SECRET": "your_consumer_secret_here",
"SALESFORCE_USERNAME": "your_salesforce_username",
"SALESFORCE_PASSWORD": "your_salesforce_password",
"SALESFORCE_SECURITY_TOKEN": "your_security_token_here"
}
}
}
}
- Restart Claude Desktop
Option 2: Local Development
- Clone the repository:
git clone https://github.com/waaljair/MCP_Salesforce.git
cd MCP_Salesforce
- Install dependencies:
npm install
- Build the project:
npm run build
- Configure your environment variables (create a
.envfile):
SALESFORCE_LOGIN_URL=https://login.salesforce.com
SALESFORCE_CLIENT_ID=your_consumer_key_here
SALESFORCE_CLIENT_SECRET=your_consumer_secret_here
SALESFORCE_USERNAME=your_salesforce_username
SALESFORCE_PASSWORD=your_salesforce_password
SALESFORCE_SECURITY_TOKEN=your_security_token_here
- Configure Claude Desktop to use the local server:
{
"mcpServers": {
"MCP_Salesforce": {
"command": "node",
"args": ["/path/to/MCP_Salesforce/dist/index.js"],
"env": {
"SALESFORCE_LOGIN_URL": "https://login.salesforce.com",
"SALESFORCE_CLIENT_ID": "your_consumer_key_here",
"SALESFORCE_CLIENT_SECRET": "your_consumer_secret_here",
"SALESFORCE_USERNAME": "your_salesforce_username",
"SALESFORCE_PASSWORD": "your_salesforce_password",
"SALESFORCE_SECURITY_TOKEN": "your_security_token_here"
}
}
}
}
Available Tools
Search Tools
search_accounts- Search for accounts by name, industry, or other criteriasearch_contacts- Search for contacts by name, email, or other criteriasearch_opportunities- Search for opportunities by name, stage, or other criteriasearch_leads- Search for leads by name, company, or other criteriasearch_all_records- Global search across all Salesforce records
Detail Tools
get_account_details- Get detailed information about a specific accountget_contact_details- Get detailed information about a specific contactget_opportunity_details- Get detailed information about a specific opportunity
Update Tools
update_account- Update account informationupdate_contact- Update contact informationupdate_opportunity- Update opportunity information
Create Tools
create_account- Create new Salesforce accountscreate_contact- Create new Salesforce contactscreate_opportunity- Create new Salesforce opportunities
Activity Tools
get_recent_activities- Get recent activities for any recordcreate_task- Create new tasks in Salesforce
Usage Examples
For Sales Teams
- "Search for all opportunities in the 'Negotiation' stage"
- "Show me details for the Acme Corp account"
- "Update the close date for opportunity XYZ to next month"
- "Create a follow-up task for contact John Doe"
- "Create a new opportunity for the Tech Solutions account"
- "Create a new contact for the marketing director at Acme Corp"
For Marketing Teams
- "Find all leads from the technology industry"
- "Search for contacts at companies with 'Software' in their name"
- "Show me recent activities for our key accounts"
- "Create a new account for the prospect company we just met"
- "Create a new contact for the lead that just signed up"
For C-Suite
- "Search for all opportunities over $100,000"
- "Find accounts in the financial services industry"
- "Show me recent activities across all major accounts"
- "Create a new strategic account for our enterprise prospect"
Environment Variables
| Variable | Description | Required |
|---|---|---|
SALESFORCE_LOGIN_URL |
Salesforce login URL (usually https://login.salesforce.com) | Yes |
SALESFORCE_CLIENT_ID |
Connected App Consumer Key | Yes |
SALESFORCE_CLIENT_SECRET |
Connected App Consumer Secret | Yes |
SALESFORCE_USERNAME |
Your Salesforce username | Yes |
SALESFORCE_PASSWORD |
Your Salesforce password | Yes |
SALESFORCE_SECURITY_TOKEN |
Your Salesforce security token | Yes |
Troubleshooting
Common Issues
-
Authentication Failed
- Verify your username and password are correct
- Ensure your security token is current (regenerate if needed)
- Check that your Connected App is properly configured
-
Permission Errors
- Ensure your user has appropriate permissions for the records you're trying to access
- Check that your Connected App has the correct OAuth scopes
-
Connection Issues
- Verify the
SALESFORCE_LOGIN_URLis correct - For sandbox environments, use
https://test.salesforce.com
- Verify the
Getting Help
If you encounter issues:
- Check the Claude Desktop logs for error messages
- Verify all environment variables are set correctly
- Test your Salesforce credentials in the Salesforce web interface
- Ensure your Connected App is active and properly configured
Security Considerations
- Never commit your Salesforce credentials to version control
- Use environment variables for all sensitive configuration
- Regularly rotate your security token
- Monitor your Connected App usage in Salesforce
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT License - see LICENSE file for details
Author
Jair Waal
Repository
https://github.com/waaljair/MCP_Salesforce
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。