Sign inSign up

sergiocbx/mcp-salesforce

By sergiocbx

•Updated 6 months ago

MCP server for Salesforce - Connect AI assistants to your Salesforce org

Image
1

3.0K

sergiocbx/mcp-salesforce repository overview

⁠Salesforce MCP Server

A production-ready Model Context Protocol (MCP) server that enables AI assistants to interact with Salesforce data and automation through dynamically configurable tools.

⁠What is Salesforce MCP Server?

Salesforce MCP Server acts as a bridge between AI assistants (Claude, ChatGPT, Gemini, etc.) and your Salesforce org. It implements the MCP 2025-03-26 specification using Streamable HTTP transport.

Key Features:

  • Execute Apex REST endpoints via AI commands
  • Configure custom tools without additional code
  • OAuth 2.0 + PKCE authentication
  • Multi-org support
  • Session management with automatic cleanup

⁠How to use this image

⁠Quick Start
docker run -d \
  -p 3000:3000 \
  --name salesforce-mcp \
  -e MCP_PUBLIC_URL="https://your-server.com" \
  -e MCP_SESSION_SECRET="$(openssl rand -hex 32)" \
  -e SF_CLIENT_ID="your_consumer_key" \
  -e SF_CALLBACK_URL="https://your-server.com/auth/callback" \
  -e LICENSE_KEY="your_license_key" \
  sergiocbx/mcp-salesforce:latest
⁠Using Docker Compose
services:
  mcp-salesforce:
    image: sergiocbx/mcp-salesforce:latest
    ports:
      - "3000:3000"
    environment:
      - MCP_PUBLIC_URL=https://your-server.com
      - MCP_SESSION_SECRET=your_32_character_secret_minimum
      - SF_CLIENT_ID=your_consumer_key
      - SF_CALLBACK_URL=https://your-server.com/auth/callback
      - LICENSE_KEY=your_license_key
    restart: unless-stopped

⁠Environment Variables

⁠Required
VariableDescription
MCP_PUBLIC_URLPublic URL of your server
MCP_SESSION_SECRETEncryption key (min 32 characters)
SF_CLIENT_IDSalesforce Connected App Consumer Key
SF_CALLBACK_URLOAuth callback URL
LICENSE_KEYLicense key (get yours at cbxpert.com.br⁠)
⁠Optional
VariableDefaultDescription
PORT3000HTTP server port
MCP_CORS_ORIGINS-Allowed origins (comma-separated)
SF_CLIENT_SECRET-Connected App Consumer Secret
SF_LOGIN_URLhttps://login.salesforce.comSalesforce login URL
SF_API_VERSIONv61.0Salesforce API version
SF_INSTANCE_ALIAS-Tool name prefix (multi-org)

⁠Salesforce Setup

Before using this image, you need to:

  1. Install the managed package in your Salesforce org:

    /packaging/installPackage.apexp?p0=04tU6000000VN6nIAG
    
  2. Create a Connected App with:

    • OAuth enabled
    • PKCE required
    • Scopes: full, refresh_token, offline_access

⁠Endpoints

EndpointDescription
/healthHealth check
/mcpMCP endpoint (GET/POST/DELETE)
/authorizeOAuth authorization
/tokenOAuth token exchange

⁠Documentation

Full documentation available at: GitHub Repository⁠

⁠Tags

  • latest - Latest stable release
  • x.y.z - Specific version

⁠Architecture

Supports linux/amd64 and linux/arm64 platforms.

Tag summary

Content type

Image

Digest

sha256:690376672…

Size

52.3 MB

Last updated

6 months ago

docker pull sergiocbx/mcp-salesforce