Skip to main content
Glama
mintmcp

Salesforce MCP Server

by mintmcp

Salesforce MCP 服务器

设置

uv venv .venv
uv pip install --python .venv/bin/python -e .

配置

设置环境变量以进行身份验证:

用户名/密码(默认):

SALESFORCE_USERNAME=your-username
SALESFORCE_PASSWORD=your-password
SALESFORCE_SECURITY_TOKEN=your-token
SALESFORCE_DOMAIN=login          # or "test" for sandbox

注意: 在较新的 Salesforce 组织中,SOAP API 登录默认处于禁用状态。要启用它:

  1. 转到 设置 (Setup) → 快速查找 → 用户界面 (User Interface)

  2. API 设置 (API Settings) 下,勾选 启用 SOAP API 登录 (Enable SOAP API login())

  3. 点击 保存 (Save)

OAuth(替代方案,推荐用于企业环境):

SALESFORCE_ACCESS_TOKEN=your-token
SALESFORCE_INSTANCE_URL=https://your-instance.salesforce.com

访问模式

通过设置 SALESFORCE_ACCESS_MODE 来控制可用的工具:

可用工具

使用场景

read

list_objects, describe_object, run_soql_query, run_sosl_search, get_record, get_report_metadata, get_report_type_fields

安全探索、报表、只读集成

read_write

所有读取工具 + create_record, update_record

日常 CRM 操作

all (默认)

所有工具,包括 delete_record, tooling_execute, apex_execute, restful

完全 API 访问权限

推荐的安全级别

环境

推荐模式

理由

生产环境(最终用户)

read

防止意外的数据修改

生产环境(受信任的操作)

read_write

允许 CRM 数据录入,禁止删除和原始 API 调用

沙盒 / 开发环境

all

用于测试和开发的完全访问权限

演示 / 探索

read

安全地探索组织结构和数据

在您的环境或 MCP 服务器配置中进行设置:

SALESFORCE_ACCESS_MODE=read

提示: 当将此服务器与 MintMCP 一起使用时,您可以直接在 MintMCP 中配置细粒度的工具级权限,而无需使用环境变量。这为您提供了更精细的控制(例如,允许创建但不允许更新),且无需重启服务器。

按访问模式划分的工具权限

MCP 工具注解 (readOnlyHint, destructiveHint) 设置在每个工具上,以便 MCP 客户端可以强制执行额外的策略:

工具

访问模式

readOnlyHint

destructiveHint

openWorldHint

list_objects

read

true

describe_object

read

true

run_soql_query

read

true

run_sosl_search

read

true

get_record

read

true

get_report_metadata

read

true

get_report_type_fields

read

true

create_record

read_write

false

update_record

read_write

false

delete_record

all

false

true

tooling_execute

all

false

true

apex_execute

all

false

true

restful

all

false

true

运行

.venv/bin/python -m salesforce_mcp

工具

工具

描述

list_objects

列出组织中的所有 Salesforce 对象(带有可选的搜索过滤器)

describe_object

获取对象的字段、关系、选项列表值和记录类型

run_soql_query

执行 SOQL 查询

run_sosl_search

通过 SOSL 进行跨对象全文搜索

get_record

通过 ID 获取单条记录

get_report_metadata

获取报表的详细元数据(列、过滤器、分组、报表类型)

get_report_type_fields

深入了解报表类型的字段目录 — 列出类别,或获取某个类别的字段

create_record

创建新记录

update_record

更新现有记录上的字段

delete_record

永久删除记录

tooling_execute

Salesforce Tooling API(元数据、Apex 类、自定义字段)

apex_execute

调用自定义 Apex REST 端点

restful

通用 Salesforce REST API 调用

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - A tier

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/mintmcp/salesforce-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server