Salesforce MCP 服务器
使用 jsforce 通过其 REST API 与 Salesforce 交互的模型上下文协议服务器实现。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Salesforce Server:
npx -y @smithery/cli install salesforce-mcp-server --client claude
特征
- 执行 SOQL 查询
- 检索对象元数据
- 创建、更新和删除记录
- 安全身份验证处理
- 实时数据访问
设置
- 克隆存储库
- 将
.env.example
复制到.env
并填写您的 Salesforce 凭据 - 安装依赖项:
npm install
- 构建:
npm run build
- 开始:
npm start
用法
该服务器公开了几个功能:
询问
针对您的 Salesforce 实例执行 SOQL 查询:
{
"name": "query",
"parameters": {
"query": "SELECT Id, Name FROM Account LIMIT 5"
}
}
描述对象
获取有关 Salesforce 对象的元数据:
{
"name": "describe-object",
"parameters": {
"objectName": "Account"
}
}
创造
创建新记录:
{
"name": "create",
"parameters": {
"objectName": "Contact",
"data": {
"FirstName": "John",
"LastName": "Doe",
"Email": "john.doe@example.com"
}
}
}
更新
更新现有记录:
{
"name": "update",
"parameters": {
"objectName": "Contact",
"data": {
"Id": "003XXXXXXXXXXXXXXX",
"Email": "new.email@example.com"
}
}
}
删除
删除记录:
{
"name": "delete",
"parameters": {
"objectName": "Contact",
"id": "003XXXXXXXXXXXXXXX"
}
}
安全
请确保:
- 确保
.env
文件的安全,切勿提交 - 尽可能在 Salesforce 中使用 IP 限制
- 定期轮换您的安全令牌
- 考虑为 MCP 服务器实施额外的身份验证
贡献
欢迎贡献!请提交改进的 PR。
Salesforce MCP 服务器
使用 jsforce 通过其 REST API 与 Salesforce 交互的模型上下文协议服务器实现。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Salesforce Server:
npx -y @smithery/cli install salesforce-mcp-server --client claude
特征
- 执行 SOQL 查询
- 检索对象元数据
- 创建、更新和删除记录
- 安全身份验证处理
- 实时数据访问
设置
- 克隆存储库
- 将
.env.example
复制到.env
并填写您的 Salesforce 凭据 - 安装依赖项:
npm install
- 构建:
npm run build
- 开始:
npm start
用法
该服务器公开了几个功能:
询问
针对您的 Salesforce 实例执行 SOQL 查询:
{
"name": "query",
"parameters": {
"query": "SELECT Id, Name FROM Account LIMIT 5"
}
}
描述对象
获取有关 Salesforce 对象的元数据:
{
"name": "describe-object",
"parameters": {
"objectName": "Account"
}
}
创造
创建新记录:
{
"name": "create",
"parameters": {
"objectName": "Contact",
"data": {
"FirstName": "John",
"LastName": "Doe",
"Email": "john.doe@example.com"
}
}
}
更新
更新现有记录:
{
"name": "update",
"parameters": {
"objectName": "Contact",
"data": {
"Id": "003XXXXXXXXXXXXXXX",
"Email": "new.email@example.com"
}
}
}
删除
删除记录:
{
"name": "delete",
"parameters": {
"objectName": "Contact",
"id": "003XXXXXXXXXXXXXXX"
}
}
安全
请确保:
- 确保
.env
文件的安全,切勿提交 - 尽可能在 Salesforce 中使用 IP 限制
- 定期轮换您的安全令牌
- 考虑为 MCP 服务器实施额外的身份验证
贡献
欢迎贡献!请提交改进的 PR。
执照
MIT 许可证
MIT License
Copyright (c) 2024 Kablewy,LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.