simple-salesforce-mcp
simple-salesforce-mcp
一个轻量级的 Salesforce MCP 服务器。它通过 stdio 直接与 Salesforce REST API 通信,仅有两个运行时依赖(mcp、httpx)——旨在作为官方 @salesforce/mcp DX 服务器的快速冷启动替代品,后者的依赖树对于沙盒环境来说过于庞大。
工具
工具 | 是否写入? | 备注 |
| 否 | 带分页( |
| 否 | 跨对象的全文搜索(参数化搜索 API) |
| 否 | 按 Id 获取单条记录,可选字段列表 |
| 是 | 创建一条记录 |
| 是,受 confirm 门控 | 必须包含字面量 |
| 是,受 confirm 门控 | 必须包含字面量 |
| 否 | 精简的对象元数据(字段、类型、必填、下拉列表) |
| 否 | 组织对象,默认过滤系统噪音 |
| 否 | 当前用户、组织、实例 URL、API 版本 |
每个工具都带有 MCP 注解(readOnlyHint / destructiveHint / idempotentHint)。
update_record 和 delete_record 拒绝执行,除非调用包含 confirm: true,
并且拒绝消息会指示模型先将确切的更改展示给用户并获得批准。
SOQL 本身无法修改数据,因此该逃生通道保持只读。
Related MCP server: Salesforce MCP Server
身份验证
服务器本身不执行 OAuth 流程;它使用现有的访问令牌,该令牌在每次工具调用时解析(因此外部进程可以随时轮换令牌):
Salesforce CLI 认证存储,位于
$HOME下:~/.sf/config.json→{"target-org": "<username>"}(或旧版~/.sfdx/sfdx-config.json→{"defaultusername": ...})~/.sfdx/<username>.json→{"accessToken": "...", "instanceUrl": "https://..."}
这是
sf org login写入的格式,也是 JustParent 平台在沙盒中生成的格式(平台会在每次调用前刷新访问令牌)。这些文件中的刷新令牌和客户端密钥会被忽略——绝不会读入内存、存储或记录。环境变量(备用,用于本地/独立使用):
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-mcpClaude 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 # interactiveCI(.github/workflows/tests.yml)在每次推送和拉取请求时运行:针对 Python 3.10–3.13 的测试套件、ruff lint 和格式检查以及 mypy,还有一个打包任务,它会以沙盒的方式安装该包(uvx --from .),以捕获打包问题。
安全说明
仅使用访问令牌:服务器从不请求、读取或持久化刷新令牌。
破坏性操作(update/delete)受显式
confirm=true参数门控, 并带有面向模型的指引,要求先获得用户批准。SOQL 分页游标(
next_url)会被验证为/services/data/...路径, 对象/记录标识符在放入 URL 之前也会经过验证。响应有大小上限,并带有明确的截断提示。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA focused MCP server for Salesforce CRM that exposes read/write access to standard CRM objects via six tools, designed for multi-tenant gateway deployments.19MIT
- FlicenseBqualityDmaintenanceA customizable MCP server for integrating Salesforce APIs with GenAI applications, supporting SOQL queries, record CRUD, metadata access, and more.137
- AlicenseAqualityAmaintenanceEnables SOQL queries, SOSL search, and record CRUD operations on a single Salesforce org via MCP, with optional read-only mode.953MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Salesforce through MCP, supporting queries, records, metadata, and bulk operations with flexible OAuth authentication.MIT
Related MCP Connectors
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustParent/simple-salesforce-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server