Skip to main content
Glama
simple-salesforce-mcp

simple-salesforce-mcp

by JustParent

simple-salesforce-mcp

Tests

Легковесный сервер MCP для Salesforce. Он общается напрямую с Salesforce REST API через stdio и имеет две зависимости времени выполнения (mcp, httpx) — создан как замена с быстрым холодным стартом для официального DX-сервера @salesforce/mcp, чьё дерево зависимостей слишком тяжело для песочниц.

Инструменты

Инструмент

Пишет?

Примечания

run_soql_query

нет

Сырой SOQL как запасной вариант с пагинацией (next_url)

search_records

нет

Полнотекстовый поиск по объектам (параметризованный API поиска)

get_record

нет

Получить запись по Id, опциональный список полей

create_record

да

Создать запись

update_record

да, требует подтверждения

Требует явного confirm=true

delete_record

да, требует подтверждения

Требует явного confirm=true

describe_object

нет

Сокращённые метаданные объекта (поля, типы, обязательность, списки выбора)

list_objects

нет

Объекты организации, системный шум отфильтрован по умолчанию

get_org_info

нет

Текущий пользователь, организация, URL инстанса, версия API

Каждый инструмент несёт аннотации MCP (readOnlyHint / destructiveHint / idempotentHint). update_record и delete_record отказываются действовать, если вызов не содержит confirm: true, а сообщение об отказе предписывает модели показать пользователю точное изменение и сначала получить одобрение. Сам SOQL не может изменять данные, поэтому запасной вариант остаётся доступным только для чтения.

Related MCP server: Salesforce MCP Server

Аутентификация

Сервер сам не выполняет OAuth-поток; он использует существующий токен доступа, который определяется при каждом вызове инструмента (так что внешний процесс может ротировать токен в любой момент):

  1. Хранилище аутентификации Salesforce CLI в $HOME:

    • ~/.sf/config.json → {"target-org": "<username>"} (или устаревший ~/.sfdx/sfdx-config.json → {"defaultusername": ...})

    • ~/.sfdx/<username>.json → {"accessToken": "...", "instanceUrl": "https://..."}

    Это формат, который создаёт sf org login, и формат, который платформа JustParent разворачивает в песочницах (при этом платформа обновляет токен доступа перед каждым вызовом). Refresh-токены и клиентские секреты в этих файлах игнорируются — они никогда не считываются в память, не сохраняются и не логируются.

  2. Переменные окружения (запасной вариант для локального/автономного использования): SALESFORCE_ACCESS_TOKEN и SALESFORCE_INSTANCE_URL.

Если токен отклонён (HTTP 401 / INVALID_SESSION_ID), сервер один раз перечитывает хранилище аутентификации и повторяет попытку, после чего сообщает, что соединение нужно установить заново.

Версия REST API по умолчанию — 62.0; переопределяется через SALESFORCE_API_VERSION.

Запуск

# Standalone with env vars (get a token via: sf org display --json)
SALESFORCE_ACCESS_TOKEN=... \
SALESFORCE_INSTANCE_URL=https://yourorg.my.salesforce.com \
uvx --from git+https://github.com/JustParent/simple-salesforce-mcp simple-salesforce-mcp

Конфигурация Claude Desktop / универсального MCP-клиента:

{
  "mcpServers": {
    "salesforce": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/JustParent/simple-salesforce-mcp", "simple-salesforce-mcp"],
      "env": {
        "SALESFORCE_ACCESS_TOKEN": "...",
        "SALESFORCE_INSTANCE_URL": "https://yourorg.my.salesforce.com"
      }
    }
  }
}

Смоук-тест (без сети, выводит версию, статус учётных данных и инструменты; завершается с кодом 0):

uvx --from . simple-salesforce-mcp --test

Разработка

uv run pytest                    # unit tests, no network needed
uv run ruff check .              # lint
uv run ruff format .             # format (--check to verify only)
uv run mypy                      # type check (src and tests)
uv run simple-salesforce-mcp --test
npx @modelcontextprotocol/inspector uv run simple-salesforce-mcp   # interactive

CI (.github/workflows/tests.yml) запускается при каждом push и pull request: тестовый набор на Python 3.10–3.13, проверки линтера и форматирования с помощью ruff, плюс mypy, а также задача упаковки, которая устанавливает пакет так же, как это делают песочницы (uvx --from .), чтобы выявить ошибки упаковки.

Замечания по безопасности

  • Только токен доступа: сервер никогда не запрашивает, не считывает и не сохраняет refresh-токены.

  • Деструктивные операции (update/delete) выполняются только при наличии явного аргумента confirm=true; модель получает инструкцию сначала получить одобрение пользователя.

  • Курсоры пагинации SOQL (next_url) проверяются на соответствие путям /services/data/..., а идентификаторы объектов/записей проверяются перед вставкой в URL.

  • Ответы ограничены по размеру с явными уведомлениями об усечении.

Available Tools

9 tools
create_recordA

Create a new Salesforce record. Use describe_object first to find the required fields and valid picklist values.

Inputs: data (required), object_type (required).

delete_recordA
DestructiveIdempotent

Permanently delete a Salesforce record. Requires confirm=true: first present the deletion to the user and get their approval.

Inputs: confirm (required), record_id (required), object_type (required).

describe_objectA
Read-onlyIdempotent

Get a Salesforce object's fields: API names, types, required flags, and picklist values. Use before writing SOQL or creating/updating records.

Inputs: object_type (required), detail.

get_org_infoA
Read-onlyIdempotent

Current Salesforce user, org id/name/type, instance URL, and API version in use. Call this first to establish context.

Inputs: no named parameters.

get_recordA
Read-onlyIdempotent

Fetch a single Salesforce record by Id.

Inputs: record_id (required), object_type (required), fields.

list_objectsA
Read-onlyIdempotent

List the org's Salesforce objects (API name and label). System noise (Share/History/Feed/ChangeEvent tables, non-queryable objects) is excluded by default.

Inputs: filter, include_system.

run_soql_queryA
Read-onlyIdempotent

Run a raw SOQL query against the Salesforce org. Read-only — SOQL cannot modify data. Use this as the escape hatch for anything the other tools don't cover: filtering, joins via relationship fields, aggregates, ORDER BY. Always include a LIMIT for exploratory queries. If a field or object name errors, check the exact API names with describe_object.

Inputs: query, next_url.

search_recordsA
Read-onlyIdempotent

Full-text search across Salesforce records (name, email, phone, and other searchable fields). Good for 'find the record for X' when you don't know the object or Id. For precise filtering use run_soql_query instead.

Inputs: search_term (required), limit, fields, object_types.

update_recordA
DestructiveIdempotent

Update fields on an existing Salesforce record. Requires confirm=true: first present the exact change to the user and get their approval.

Inputs: data (required), confirm (required), record_id (required), object_type (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct operation: SOQL query, full-text search, record CRUD by Id, object metadata, and org context. The descriptions explicitly contrast run_soql_query with search_records, and get_record with run_soql_query, leaving no ambiguity.

    Naming Consistency5/5

    All tool names follow a clear verb_noun pattern in snake_case: run_soql_query, search_records, get_record, create_record, update_record, delete_record, describe_object, list_objects, get_org_info. The naming is perfectly uniform and predictable.

    Tool Count5/5

    Nine tools is a well-scoped size for a Salesforce MCP server, covering query, search, CRUD, schema introspection, and org context. Every tool has a clear purpose with no redundant or filler tools.

    Completeness5/5

    The set provides complete CRUD lifecycle coverage (create, get, update, delete), plus two read/search mechanisms, object metadata discovery, and org context. It covers the full range of common Salesforce interactions an agent would need, with no glaring dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      A focused MCP server for Salesforce CRM that exposes read/write access to standard CRM objects via six tools, designed for multi-tenant gateway deployments.
      Apache 2.0
    • F
      license
      B
      quality
      D
      maintenance
      A customizable MCP server for integrating Salesforce APIs with GenAI applications, supporting SOQL queries, record CRUD, metadata access, and more.
      13
      8
      -
    • 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
      645 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to interact with Salesforce through MCP, supporting queries, records, metadata, and bulk operations with flexible OAuth authentication.
      16
      MIT