Skip to main content
Glama
Salesforce MCP Server

Salesforce MCP Server

by fagun04

Salesforce MCP Server

An MCP server that exposes Salesforce operations as tools over stdio, so any MCP client can query and modify Salesforce data.

Tools

Tool

Purpose

getAccount

Retrieve an Account by id

searchContacts

Search Contacts by name / email / account

listOpportunities

List Opportunities, filter by account and/or stage

createLead

Create a new Lead

updateCase

Update fields on an existing Case

Related MCP server: Salesforce MCP Server

Setup

  1. Install and build:

    npm install
    npm run build
  2. Create a Salesforce Connected App and enable the OAuth 2.0 Client Credentials flow (see .env.example for the exact steps).

  3. Copy .env.example to .env and fill in your credentials.

  4. Run:

    npm start          # runs dist/index.js
    # or during development:
    npm run dev

Using with an MCP client (e.g. Claude Desktop)

Add to your client's MCP config:

{
  "mcpServers": {
    "salesforce": {
      "command": "node",
      "args": ["/absolute/path/to/salesforce-mcp/dist/index.js"],
      "env": {
        "SF_LOGIN_URL": "https://login.salesforce.com",
        "SF_CLIENT_ID": "your_consumer_key",
        "SF_CLIENT_SECRET": "your_consumer_secret"
      }
    }
  }
}

Notes

  • The client caches the OAuth token and auto-refreshes on 401.

  • SOQL string inputs are escaped, but treat this as a starting point — add field-level and object-level permission checks appropriate to your org.

  • To target a sandbox, set SF_LOGIN_URL=https://test.salesforce.com.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      11 npm
      19
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables SOQL queries, SOSL search, and record CRUD operations on a single Salesforce org via MCP, with optional read-only mode.
      9
      209 npm
      MIT