home / mcp / connect to salesforce mcp server

Connect To Salesforce MCP Server

Guides end users through installing Salesforce CLI, authenticating with OAuth, and connecting Claude Desktop to Salesforce.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jake-hebert-connect-to-salesforce-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@digitalrupix/connect-to-salesforce-mcp"
      ],
      "env": {
        "SALESFORCE_ORG_ALIAS": "mcp-server-connect",
        "SALESFORCE_INSTANCE_URL": "YOUR_SALESFORCE_INSTANCE_URL",
        "SALESFORCE_CONNECTION_TYPE": "Salesforce_CLI"
      }
    }
  }
}

You can connect Claude Desktop to Salesforce using an integrated setup assistant that guides you through installing the Salesforce CLI, authenticating securely, and saving your connection. This MCP server handles everything from checking a Salesforce CLI installation to opening a browser for OAuth and verifying your connection, so you can start using Salesforce features in Claude with no technical expertise.

How to use

Open Claude Desktop and ask Claude to help you connect to Salesforce. Say or type a request like “Help me set up Salesforce” or “Connect to Salesforce.” Claude will guide you through each step, including installing the Salesforce CLI if needed, starting a secure login in your browser, and confirming the connection. When the setup finishes, restart Claude Desktop if prompted and you’re ready to use Salesforce within Claude.

How to install

Prerequisites you need on your computer: Node.js 18.0.0 or higher, NPM (comes with Node.js), and Claude Desktop.

# Optional: install the MCP package globally
npm install -g @digitalrupix/connect-to-salesforce-mcp

# If you are an administrator deploying to many machines, place the configuration as needed per user
# Example configuration paths for Claude Desktop per operating system (for admins):
# Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%\Claude\claude_desktop_config.json
# Linux: ~/.config/Claude/claude_desktop_config.json

Configuration and workflow details

This MCP server uses two internal MCP configurations to connect to Salesforce: one to initiate and manage the connection process, and another to handle the actual Salesforce CLI integration. The environment variables shown below control the Salesforce instance URL and the org alias used for the authenticated connection.

{
  "mcpServers": {
    "connect-to-salesforce": {
      "command": "npx",
      "args": ["-y", "@digitalrupix/connect-to-salesforce-mcp"],
      "env": {
        "SALESFORCE_INSTANCE_URL": "https://your-org.my.salesforce.com",
        "SALESFORCE_ORG_ALIAS": "mcp-server-connect"
      }
    },
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@tsmztech/mcp-server-salesforce"],
      "env": {
        "SALESFORCE_CONNECTION_TYPE": "Salesforce_CLI",
        "SALESFORCE_INSTANCE_URL": "https://your-org.my.salesforce.com"
      }
    }
  }
}

Security and data handling

Credentials are stored by the Salesforce CLI in secure storage and never written in plain text within config files. Each user authenticates with their own Salesforce account, and the browser-based OAuth flow ensures credentials remain protected. If you ever need to restart the setup, you can simply re-run the process from Claude and re-authenticate as needed.

Troubleshooting

If you encounter problems, perform these checks in order: ensure Claude Desktop is fully closed before adjustments, verify Salesforce CLI is installed, and confirm the correct instance URL and alias are configured.

If the browser does not open automatically during login, try the manual login command shown in the setup flow and ensure pop-ups are allowed for the browser. If issues persist, contact your IT administrator for assistance.

Notes for administrators

Admins can deploy the Claude Desktop configuration to users’ machines and provide the following environment values for consistent setup across endpoints.

Key points to remember:
- Both MCP servers use the same Salesforce instance URL for a consistent experience.
- The org alias should match between the setup MCP and the Salesforce MCP configuration.
- End users must have Node.js and npm installed on their machines.

Available tools

setupWizard

Guides the user through installation, OAuth login in the browser, and verification of the Salesforce connection.

oauthLogin

Opens the browser for secure OAuth authentication and handles the login flow.

verifyConnection

Checks the Salesforce org status to confirm a successful connection and stores credentials securely.