MCP Salesforce Connector
Provides tools for interacting with Salesforce, including executing SOQL queries and SOSL searches, retrieving object metadata, performing record CRUD operations, and making Tooling API, Apex REST, and direct REST API calls.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Salesforce Connector
A Model Context Protocol (MCP) server implementation for Salesforce integration, allowing LLMs to interact with Salesforce data through SOQL queries and SOSL searches. This project provides Docker containerization for easy deployment.
Recent Updates
New Streaming Server: Added SSE-based streaming MCP server as the main entry point for Docker workflow
Health Check Endpoints: Added /health and /metrics endpoints for Docker health checks
Debugging Support: Added debug mode for troubleshooting (
--debugflag)Clean Docker Workflow: Added scripts for clean Docker management
Improved Error Handling: Better error handling and logging for MCP server communication
Multiple Deployment Options: Support for both Cloud Run (serverless) and VM deployment methods
Related MCP server: MCP Salesforce Lite
Features
Execute SOQL (Salesforce Object Query Language) queries
Perform SOSL (Salesforce Object Search Language) searches
Retrieve metadata for Salesforce objects, including field names, labels, and types
Retrieve, create, update, and delete records
Execute Tooling API requests
Execute Apex REST requests
Make direct REST API calls to Salesforce
SSE-based streaming server for real-time communication
Health check endpoints for container monitoring
Deployment Options
This server can be deployed in two ways:
Google Cloud Run (Serverless): For a fully managed serverless experience.
See DEPLOYMENT-CLOUD-RUN.md for detailed instructions.
Google Compute Engine VM: For more consistent performance and easier troubleshooting.
See DEPLOYMENT-VM.md for detailed instructions.
Note: There are some known issues with Salesforce authentication in Cloud Run environments. If you encounter authentication problems with Cloud Run, the VM deployment option is recommended as a workaround.
Docker Setup
This project includes scripts for running the MCP server in a Docker container:
Using Docker Script
Start the server:
./scripts/run_mcp_server.shAdditional options:
./scripts/run_mcp_server.sh --debug --port 8080 --log-level debug
Using Streaming Server Locally
Start the streaming server:
./scripts/run_mcp_server.sh --port 8080Access the SSE endpoint at
http://localhost:8080/sseRun in debug mode (if needed):
./scripts/run_mcp_server.sh --debugVerify the server is working:
./scripts/verify_mcp_server.shRestart the server if needed:
./scripts/restart_mcp_server.sh
Configuration
Salesforce Authentication Methods
This server supports two authentication methods:
OAuth (Recommended): Set
SALESFORCE_ACCESS_TOKENandSALESFORCE_INSTANCE_URLas environment variables.Username/Password (Legacy): If
SALESFORCE_ACCESS_TOKENandSALESFORCE_INSTANCE_URLare not set, the server will fall back to usingSALESFORCE_USERNAME,SALESFORCE_PASSWORD, andSALESFORCE_SECURITY_TOKEN.
Streaming Server Architecture
This project uses an SSE (Server-Sent Events) based streaming server as the main entry point for Docker deployments. The streaming server offers several advantages over the traditional stdio-based MCP server:
Web-based communication: Uses HTTP and SSE for communication instead of stdio, making it more suitable for web-based clients and Docker environments
Health monitoring: Provides
/healthand/metricsendpoints for monitoring the server's statusPersistent connections: Maintains persistent connections with clients, allowing for real-time updates
Docker-friendly: Designed to work seamlessly in containerized environments
Endpoints
/sse: The main SSE endpoint for MCP protocol communication/health: Health check endpoint that returns status 200 if the server is running properly/metrics: Provides additional metrics about the server's state
Environment Variables
The streaming server uses the following environment variables:
SALESFORCE_USERNAME,SALESFORCE_PASSWORD,SALESFORCE_SECURITY_TOKEN: Salesforce credentials (username-based authentication)SALESFORCE_ACCESS_TOKEN,SALESFORCE_INSTANCE_URL: Salesforce credentials (token-based authentication)PORT: The port the server listens on (default: 8080)LOG_LEVEL: Set logging level (default: info, options: debug, info, warning, error)MCP_DEBUG: Enable debug logging (default: false)
Troubleshooting
If you encounter issues with the MCP server, refer to the TROUBLESHOOTING.md file for common issues and solutions.
Clean Start
To completely clean up all Docker resources related to this project and start fresh:
# Clean up all Docker containers and images
./scripts/cleanup_docker.sh
# Rebuild and start the container
./scripts/run_mcp_server.shThis will remove all containers and images related to the MCP server and give you a clean starting point.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
Run SOQL queries against your Salesforce org to retrieve records and insights. Explore objects, fi…
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Run SOQL queries to explore and retrieve Salesforce data. Inspect records, fields, and relationshi…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Salesforce organizations through natural language by exposing Salesforce APIs (REST, Bulk v2, GraphQL, Tooling, Auth) as MCP tools for querying data, managing records, and executing SOQL queries.19MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to securely interact with Salesforce CRM data through SOQL queries, CRUD operations, and metadata exploration. Supports connecting to Salesforce objects like Accounts, Contacts, and Opportunities via OAuth 2.0 authentication.82MIT
- AlicenseAqualityCmaintenanceEnables interaction with Salesforce orgs to perform operations like querying data with SOQL, managing records, and executing Apex code. It provides configurable access levels and support for both standard and Tooling APIs via natural language interfaces.11MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying and managing Salesforce records using SOQL, CRUD operations, and schema exploration through natural language or direct tool calls.71 npmMIT