Get the FREE Ultimate OpenClaw Setup Guide →

salesforce

MCP server for Salesforce API integration - Complete CRM integration for GenAI applications

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lokimcpuniverse-salesforce-mcp-server python -m salesforce_mcp.server \
  --env SALESFORCE_DOMAIN="login" \
  --env SALESFORCE_SANDBOX="false" \
  --env SALESFORCE_TIMEOUT="30" \
  --env SALESFORCE_PASSWORD="your_password" \
  --env SALESFORCE_USERNAME="your_username@company.com" \
  --env SALESFORCE_CLIENT_ID="your_connected_app_client_id" \
  --env SALESFORCE_API_VERSION="59.0" \
  --env SALESFORCE_MAX_RETRIES="3" \
  --env SALESFORCE_REDIRECT_URI="http://localhost:8080/callback" \
  --env SALESFORCE_CLIENT_SECRET="your_connected_app_client_secret" \
  --env SALESFORCE_SECURITY_TOKEN="your_security_token"

How to use

This Salesforce MCP server provides a rich set of tools to interact with Salesforce data through the Model Context Protocol. It exposes operations for querying data with SOQL, retrieving, creating, updating, and deleting records, describing object metadata, and performing bulk operations. It also includes Apex execution, SOSL search, and report-related capabilities, all accessible through MCP tool calls that you send to the server. Typical usage involves starting the server, then issuing tool payloads that specify the tool name (e.g., salesforce_query, salesforce_get_record) and the corresponding arguments. The included Claude Desktop configuration snippet demonstrates how to wire the server into Claude, enabling natural-language driven data access against Salesforce within your workflows.

How to install

Prerequisites:

  • Python 3.8+ and pip
  • Git (optional, for cloning the repository)

Install from PyPI:

pip install salesforce-mcp-server

Or install from source:

git clone https://github.com/LokiMCPUniverse/salesforce-mcp-server.git
cd salesforce-mcp-server
pip install -e .

Run the MCP server

python -m salesforce_mcp.server

Configure MCP in Claude or your orchestrator by wiring the Python module as shown in the Quick Start section of the README. Ensure environment variables for Salesforce credentials are set as described in the mcp_config section.

Additional notes

Tips and notes:

  • Use environment variables to securely pass Salesforce credentials and tokens. Consider alternative auth flows (OAuth, JWT) as supported by the server.
  • API version, domain, and sandbox settings are configurable via environment variables (SALESFORCE_API_VERSION, SALESFORCE_DOMAIN, SALESFORCE_SANDBOX).
  • For multi-org setups, the README mentions an Advanced Configuration approach with multiple OrgConfig definitions; adapt to your deployment if you need separate production and sandbox environments.
  • If you encounter connectivity issues, verify network access to Salesforce endpoints and that the connected app has appropriate OAuth scopes.
  • The server supports bulk operations and pagination; handle large result sets by using the provided bulk tools and query pagination tools.
  • When integrating with Claude Desktop, use the provided configuration example to map tools like salesforce_query, salesforce_get_record, and others to your natural-language prompts.

Related MCP Servers

Sponsor this space

Reach thousands of developers