Salesforce

io.github.mindstone由 GitHub 账号 mindstone 发布v0.2.6更新于 Nov 7, 2026

Salesforce CRM MCP server: accounts, contacts, opportunities, leads, tasks, and custom objects

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

本地运行的 npm MCP 服务器,让助手读写 Salesforce CRM 记录,如客户、联系人、商机、潜在客户和任务。

可以做什么
  • 通过 OAuth 连接、列出和断开 Salesforce 账户
  • 读取、创建和更新客户、联系人、商机、潜在客户、任务、个案和事件
  • 将潜在客户转换为客户与联系人,并创建关联到记录的备注
  • 跨对象全文搜索,并运行已有的 Salesforce 报表
  • 执行原始 SOQL 查询、描述对象并列出可用对象
  • 通过通用 CRUD 工具创建、更新和查询任意 Salesforce 记录
适用场景
适合需要在本机以 stdio 方式接入 CRM 的宿主,用于日常销售工作,例如用一句自然语言请求查找客户、创建商机并添加后续任务,而不是使用 Salesforce 托管的端点。
运行要求
需要 Node.js 20+ 和 npm,通过 npx 在本地运行。OAuth 方式需要 Salesforce Connected App(SALESFORCE_CLIENT_ID 与 SALESFORCE_CLIENT_SECRET);手动令牌方式需要有效的 SALESFORCE_ACCESS_TOKEN 和 SALESFORCE_INSTANCE_URL。可选配置包括 SALESFORCE_SANDBOX、SALESFORCE_CONFIG_DIR、SALESFORCE_OAUTH_PORT 和 SALESFORCE_OAUTH_SCOPES。需要访问 Salesforce 的网络连接。
安装前请注意
需要 Salesforce 凭据:Connected App 客户端密钥或静态访问令牌,保存在 SALESFORCE_CONFIG_DIR 下。许多工具会写入 CRM(创建、更新、转换、断开),会改动真实业务记录;写入和断开类工具已做标记,能力足够的宿主可在执行前请求确认。原始 SOQL 查询和通用 CRUD 工具可访问该用户有权访问的任意对象。返回的记录文本按不可信内容处理。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Salesforce,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@mindstone/mcp-server-salesforce

[npm version] [License: FSL-1.1-MIT]

Salesforce CRM MCP server — accounts, contacts, opportunities, leads, tasks, users, and custom objects via the Salesforce API.

Best when an MCP host needs a local, install-and-run CRM connector for everyday sales work rather than a Salesforce-hosted endpoint.

Status

Why this exists

Salesforce's own MCP options are the right starting point for many teams. This package is for teams that want a normal npm MCP server they can run locally in any stdio host.

It gives an assistant focused access to the CRM work people actually ask for: finding accounts and contacts, updating leads, creating opportunities and tasks, running CRM searches, and working with custom objects. The benefit is a short path from a natural-language sales request to the right Salesforce records, with write actions kept visible to the host.

Example interaction

"Find Acme Corp in Salesforce, create a Q3 expansion opportunity for $75,000, and add a follow-up task for next Friday."

Tools the host calls:

  1. salesforce_get_accounts — searches accounts by name and returns the matching account ID.
  2. salesforce_create_opportunity — creates the opportunity against that account.
  3. salesforce_create_task — adds a follow-up task related to the new opportunity.

Response (trimmed):

json
{  "account": { "id": "001xx000003DGbYAAW", "name": "Acme Corp" },  "opportunity": {    "id": "006xx000004TmiYAAS",    "name": "Q3 expansion",    "amount": 75000,    "stage": "Prospecting"  },  "task": {    "id": "00Txx000006rYxDEAU",    "subject": "Follow up on Q3 expansion"  }}

Requirements

  • Node.js 20+
  • npm
  • A Salesforce Connected App for the OAuth path, or a valid access token plus instance URL for manual-token mode.

One-click install

[Add to Cursor] [Add to VS Code] [Add to VS Code Insiders]

After clicking the button, your host will prompt you to fill: SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_ACCESS_TOKEN, SALESFORCE_CONFIG_DIR, SALESFORCE_OAUTH_PORT.

Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Salesforce)
json
{  "mcpServers": {    "Salesforce": {      "command": "npx",      "args": [        "-y",        "@mindstone/mcp-server-salesforce"      ],      "env": {        "SALESFORCE_CLIENT_ID": "",        "SALESFORCE_CLIENT_SECRET": "",        "SALESFORCE_ACCESS_TOKEN": "",        "SALESFORCE_CONFIG_DIR": "~/.mcp/salesforce",        "SALESFORCE_OAUTH_PORT": "0"      }    }  }}

Quick Start

Install & build

bash
cd <path-to-repo>/connectors/salesforcenpm installnpm run build

npx

bash
npx -y @mindstone/mcp-server-salesforce

Local

bash
node dist/index.js

Configuration

OAuth (Recommended)

Set these environment variables:

  • SALESFORCE_CLIENT_ID — Your Salesforce Connected App client ID
  • SALESFORCE_CLIENT_SECRET — Your Salesforce Connected App client secret
  • SALESFORCE_SANDBOX — Set to "true" for sandbox environments (optional)

Then call salesforce_connect_account to start the OAuth flow.

Manual Token

  • SALESFORCE_ACCESS_TOKEN — A valid Salesforce access token
  • SALESFORCE_INSTANCE_URL — Your Salesforce instance URL (e.g., https://mycompany.my.salesforce.com)

Additional Options

  • SALESFORCE_CONFIG_DIR — Custom config directory (default: ~/.mcp/salesforce)
  • SALESFORCE_OAUTH_PORT — OAuth callback port (0 = OS-assigned; default: 0)
  • SALESFORCE_OAUTH_SCOPES — Space-separated OAuth scopes. Leave unset to use the connector default.

Available Tools (37)

Account Management

  • salesforce_connect_account — Connect a Salesforce account via OAuth
  • salesforce_list_connected_accounts — List connected accounts
  • salesforce_disconnect_account — Disconnect an account

CRM Accounts

  • salesforce_get_accounts — Get CRM accounts with filters
  • salesforce_create_account — Create a CRM account
  • salesforce_update_account — Update a CRM account

Contacts

  • salesforce_get_contacts — Get contacts with filters
  • salesforce_create_contact — Create a contact
  • salesforce_update_contact — Update a contact

Opportunities

  • salesforce_get_opportunities — Get opportunities with filters
  • salesforce_create_opportunity — Create an opportunity
  • salesforce_update_opportunity — Update an opportunity

Leads

  • salesforce_get_leads — Get leads with filters
  • salesforce_create_lead — Create a lead
  • salesforce_convert_lead — Convert a lead to Account + Contact
  • salesforce_update_lead — Update a lead

Tasks

  • salesforce_get_tasks — Get tasks with filters
  • salesforce_create_task — Create a task
  • salesforce_update_task — Update a task

Cases

  • salesforce_get_cases — Get support cases with filters
  • salesforce_create_case — Create a support case
  • salesforce_update_case — Update a support case

Events

  • salesforce_get_events — Get calendar events with filters
  • salesforce_create_event — Create a calendar event

Search

  • salesforce_search — Cross-object full-text search (SOSL); the response's truncated flag tells you whether more matches exist beyond the limit

Notes

  • salesforce_get_notes — Get notes attached to a record
  • salesforce_create_note — Create a note, optionally attached to a record (a failed attach rolls the note back, or reports the orphaned note ID)

Campaigns

  • salesforce_get_campaigns — Get marketing campaigns with filters
  • salesforce_get_campaign_members — Get leads/contacts in a campaign

Reports

  • salesforce_run_report — Run an existing Salesforce report (Analytics REST API)

Users

  • salesforce_get_users — Get Salesforce users

Query & Schema

  • salesforce_query — Execute raw SOQL queries
  • salesforce_describe_object — Get object metadata and fields
  • salesforce_list_objects — List available Salesforce objects

Generic CRUD

  • salesforce_create_record — Create any Salesforce record
  • salesforce_update_record — Update any Salesforce record
  • salesforce_get_records — Query any Salesforce object

Security notes

  • The standalone OAuth callback server binds to 127.0.0.1; it does not honour environment overrides that would expose the callback beyond loopback.
  • OAuth credentials are stored under SALESFORCE_CONFIG_DIR (default ~/.mcp/salesforce) with restrictive directory and file permissions.
  • Write and disconnect tools are marked so capable hosts can ask for confirmation before changing Salesforce data.
  • SOQL helper paths escape backslashes and apostrophes. Filters treat % and _ literally, including the LIKE operator in salesforce_get_records. SOSL searches escape reserved characters, including apostrophes. In salesforce_get_records, dates (2026-01-31), datetimes with a time zone (2026-01-31T09:00:00Z) and JSON null are sent unquoted: use dates for date fields and datetimes for datetime fields such as CreatedDate. Use JSON null, not the string "null", with = or != to match empty fields. For text that looks like a date, use salesforce_query.
  • Raw SOQL queries strip comments without changing string literals and cap row or grouped results at 200. Ungrouped aggregates receive no generated LIMIT: an explicit COUNT() limit is preserved to bound the count, while limits on other ungrouped aggregates are removed because Salesforce rejects them. FOR VIEW and FOR REFERENCE stay after LIMIT and OFFSET.
  • Read fields and generic filter fields accept relationship paths such as Owner.Name; write field keys must be single API names.
  • Session expiry is recognized by Salesforce's error code as well as its message. A refused expired or revoked refresh token asks you to reconnect and clears the cached connection, leaving the token file unchanged. A failed save of a renewed sign-in returns TOKEN_SAVE_FAILED without running the request; saving is retried on the next call. If that save still fails, the failure is logged and the request runs, but a restart may require reconnecting. Invalid field, invalid object and malformed query errors include recovery hints; vendor messages remain wrapped as untrusted content. When Salesforce refuses a field, the error can also include field_suggestions: up to three real field names from that object. These are possible matches, not confirmed replacements, because the field may be hidden from this user.
  • salesforce_get_notes reads up to 150 linked documents before fetching the linked notes, returns an empty result when no links exist, and adds truncated: true when it reaches 150, because linked files use up that allowance and notes may be missing. The note result limit remains 200 (default 50).
  • Record text returned by read tools is wrapped in <untrusted-content> envelopes so Salesforce-authored field values are presented to the model as data, not instructions.
  • salesforce_convert_lead reports a conversion as failed when Salesforce rejects it at the record level (e.g. a validation rule), instead of claiming success; the org-authored error detail is enveloped the same way.

Licence

FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.

来源:connectors/salesforce/README.md,提交 3ae4aa1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

5
  1. v0.2.6最新Nov 7, 2026
  2. v0.2.5Nov 3, 2026
  3. v0.2.4Nov 1, 2026
  4. v0.2.3Sep 29, 2026
  5. v0.2.2Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。