About Salesforce MCP Server
Salesforce MCP Server is an MCP server published by jaworjar95 in the Developer Tools category: a comprehensive Model Context Protocol (MCP) server that provides seamless Salesforce integration for AI development tools like Claude Desktop, Cline, and other MCP-compatible clients.
The repository has 42 stars and 16 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/jaworjar95/salesforce-mcp-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Salesforce MCP Server
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 6 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
Salesforce MCP Server
A comprehensive Model Context Protocol (MCP) server that provides seamless Salesforce integration for AI development tools like Claude Desktop, Cline, and other MCP-compatible clients.
🚀 Features
17 Comprehensive Tools
🔍 Query & Search Tools
execute-soql- Execute SOQL queries with auto-bulk switching and paginationexecute-sosl- Multi-object search with result aggregationdescribe-sobject- SObject metadata with intelligent caching
⚡ Apex Development Tools
execute-apex- Anonymous Apex execution with debug log capturerun-apex-tests- Apex test execution with coverage reportingget-apex-logs- Debug log retrieval with filtering
📊 Data Management Tools
create-record- Single/bulk record creation with auto-bulk switchingget-record- Record retrieval with field selectionupdate-record- Single/bulk record updates with validationdelete-record- Single/bulk record deletionupsert-record- External ID-based upsert operations
🔧 Metadata Tools (Component-Based)
list-metadata-types- Discover metadata typesdeploy-metadata- Deploy individual metadata components (e.g., ApexClass, CustomObject) from files or JSONdeploy-bundle- Deploy a metadata bundle (e.g., LWC) from a directory pathretrieve-metadata- Retrieve individual metadata components, with an option to save to a filecheck-deploy-status- Check the status of a deployment
🔗 Connection Tools
test-connection- Connection validation and health monitoring
Key Capabilities
- 🔄 Auto-Bulk Switching - Intelligent API selection for optimal performance
- 🔐 Dual Authentication - OAuth2 and Username/Password support
- ⚡ Smart Caching - 1-hour TTL for SObject metadata
- 🛡️ Type Safety - Full TypeScript implementation with runtime validation
- 📝 Comprehensive Logging - Detailed debugging and monitoring
- 🔍 Raw Error Exposure - Preserve exact Salesforce errors for debugging
🚀 Installation
To use with Desktop APP, such as Claude Desktop, Cline, Cursor, and so on, add the MCP server config below.
On macOS / Linux systems:
{
"mcp.servers": {
"salesforce": {
"command": "npx",
"args": [
"-y",
"@jjar/salesforce-mcp-server"
],
"env": {
"SF_USERNAME": "your-username@company.com",
"SF_PASSWORD": "your-password",
"SF_SECURITY_TOKEN": "",
"SF_LOGIN_URL": "https://login.salesforce.com"
},
"disabled": false,
"alwaysAllow": [
"test-connection",
"execute-soql",
"describe-sobject",
"get-record",
"get-apex-logs",
"list-metadata-types"
]
}
}
}
{
"mcp.servers": {
"salesforce": {
"command": "npx",
"args": [
"-y",
"@jjar/salesforce-mcp-server"
],
"env": {
"SF_CLIENT_ID": "your-oauth2-client-id",
"SF_CLIENT_SECRET": "your-oauth2-client-secret",
"SF_REFRESH_TOKEN": "your-refresh-token",
"SF_INSTANCE_URL": "https://yourorg.my.salesforce.com"
},
"disabled": false,
"alwaysAllow": [
"test-connection",
"execute-soql",
"describe-sobject",
"get-record",
"get-apex-logs",
"list-metadata-types"
]
}
}
}
On Windows systems:
{
"mcp.servers": {
"salesforce": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@jjar/salesforce-mcp-server"
],
"env": {
"SF_USERNAME": "your-username@company.com",
"SF_PASSWORD": "your-password",
"SF_SECURITY_TOKEN": "",
"SF_LOGIN_URL": "https://login.salesforce.com"
},
"disabled": false,
"alwaysAllow": [
"test-connection",
"execute-soql",
"describe-sobject",
"get-record",
"get-apex-logs",
"list-metadata-types"
]
}
}
}
{
"mcp.servers": {
"salesforce": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@jjar/salesforce-mcp-server"
],
"env": {
"SF_CLIENT_ID": "your-oauth2-client-id",
"SF_CLIENT_SECRET": "your-oauth2-client-secret",
"SF_REFRESH_TOKEN": "your-refresh-token",
"SF_INSTANCE_URL": "https://yourorg.my.salesforce.com"
},
"disabled": false,
"alwaysAllow": [
"test-connection",
"execute-soql",
"describe-sobject",
"get-record",
"get-apex-logs",
"list-metadata-types"
]
}
}
}
Configuration File Locations
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Linux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
⚠️ Important: After adding or modifying the MCP server configuration, you must restart VS Code for the changes to take effect.
- Windows:
%USERPROFILE%\.cursor\mcp.json - macOS:
~/.cursor/mcp.json - Linux:
~/.cursor/mcp.json
Tool Safety Levels
✅ Safe for Auto-Approval (alwaysAllow)
test-connection- Connection validation (read-only)execute-soql- SOQL queries (read-only)describe-sobject- Metadata inspection (read-only)get-record- Single record retrieval (read-only)get-apex-logs- Debug log access (read-only)list-metadata-types- Metadata type discovery (read-only)
⚠️ Requires Manual Approval
create-record,update-record,delete-record,upsert-record- Data modificationdeploy-metadata- Metadata deploymentexecute-apex,run-apex-tests- Code executionexecute-sosl- Search operations (can be resource-intensive)retrieve-metadata- Metadata retrieval (can be large)
Authentication
Username/Password Authentication
- Obtain your security token from Salesforce Setup → Personal Information → Reset Security Token (only required if your IP is not trusted)
- Set environment variables as shown in the configuration section
- Use
https://login.salesforce.comfor production orhttps://test.salesforce.comfor sandboxes
💡 Security Token: Only add the security token if Salesforce requires it for your connection. If not leave
SF_SECURITY_TOKENempty.
OAuth2 Authentication
- Create a Connected App in Salesforce Setup
- Configure OAuth settings and obtain client credentials
- Generate a refresh token using the OAuth2 flow
- Set environment variables as shown in the configuration section
🏗️ Architecture
Core Components
- Authentication Manager - Dual OAuth2/Username-Password support
- Connection Manager - Singleton pattern with health monitoring
- Tool Classes - Organized by functionality (Query, Apex, Data, Metadata)
- Error Handler - Comprehensive error formatting with context
- Cache Manager - TTL-based caching for performance optimization
Performance Features
- Auto-Bulk Switching - Automatically uses Bulk API for large operations
- Intelligent Caching - SObject metadata cached for 1 hour
- Connection Reuse - Single connection across all operations
- Polling Optimization - Efficient monitoring of long-running operations
🧪 Testing
# Test individual tools
node tests/test-query-tools.js
node tests/test-data-tools.js
node tests/test-apex-tools.js
node tests/test-metadata-tools.js
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
🔗 Related Projects
- Model Context Protocol - The protocol this server implements
- jsforce - Salesforce API library used in this project
- Claude Desktop - AI assistant that supports MCP servers
- Cline - VS Code extension for AI-assisted development
👨💻 Author
Jarosław Jaworski
🤖 Development Credits
Part of this implementation was developed with assistance from Claude Sonnet 4 using the Cline VS Code extension, demonstrating the power of AI-assisted development in creating comprehensive developer tools.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
README fetched from the repository 6 days ago. The original is authoritative.