Get the FREE Ultimate OpenClaw Setup Guide →

mcp -salesforce

Salesforce MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tsmztech-mcp-server-salesforce npx -y @tsmztech/mcp-server-salesforce

How to use

The Salesforce MCP Server provides a natural language interface for interacting with your Salesforce data and metadata by linking Claude with Salesforce. It enables you to search for objects, read schemas, run queries and data manipulation, manage Apex code, and handle cross-object operations all through conversational prompts. Tools exposed by this server include capabilities for object discovery, detailed object descriptions, SOSL-based multi-object searches, complex SOQL-like queries with relationship support, data manipulation (insert, update, delete, upsert), and Apex code management (read/write Apex classes and triggers). This setup lets Claude translate everyday language into Salesforce actions, making it easier to explore your data, automate routine tasks, and generate insights without writing SQL or SOQL by hand. To use it, install the MCP server, connect Claude Desktop (or your Claude integration) to the server, and start issuing natural language requests such as “Show me all accounts with related contacts,” “Create a new custom object for Customer Feedback,” or “Describe the Account object and its fields.”

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to a terminal/command prompt

Installation steps:

  1. Install the MCP Salesforce server globally via npx (no global install required): npm install -g @tsmztech/mcp-server-salesforce

    or prepare to run directly with npx as shown in the config

  2. Verify npm and node versions: node -v npm -v

  3. Start the MCP server via your preferred method (examples below):

    • Using npx directly (recommended for on-demand runs): npx -y @tsmztech/mcp-server-salesforce

    • Or install locally and run from a script: npm install @tsmztech/mcp-server-salesforce node path/to/server.js # if you have a local entry point

  4. If integrating with Claude Desktop, configure your mcpServers section in claude_desktop_config.json to point to this MCP server, as shown in the usage section.

  5. Optional: set up Salesforce authentication methods as described in the Setup/Usage sections (Salesforce CLI, Username/Password, or OAuth2 Client Credentials).

Additional notes

Tips and notes:

  • If using Claude Desktop, you can provide Salesforce authentication via environment variables, e.g., SALESFORCE_CONNECTION_TYPE=Salesforce_CLI to enable Salesforce CLI-based authentication.
  • Ensure the Salesforce CLI is installed and authenticated if you plan to use Salesforce_CLI authentication.
  • When running in a shared or CI environment, consider pinning the MCP server version to a specific release to avoid breaking changes.
  • Review Salesforce API limits and ensure your org has appropriate permissions for the operations you intend to perform (read, write, delete, upsert, manage Apex, etc.).
  • For multi-org setups, you can switch active orgs based on your VS Code workspace default; this server supports switchable authentication modes as described in the Setup section.
  • If you encounter connectivity issues, verify that the environment variables (like SALESFORCE_CONNECTION_TYPE) are correctly set and that the Salesforce credentials or CLI login are accessible from the environment running the MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers