Salesforce MCP 服务器是一个借助 jsforce 通过 Salesforce 的 REST API 实现的模型上下文协议(Model Context Protocol)服务器,可用于执行各类 Salesforce 操作。
您可以通过 Smithery 自动安装 Salesforce 服务器以供 Claude 桌面版使用,只需执行以下命令:
npx -y @smithery/cli install salesforce-mcp-server --client claude
.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",
"fields": {
"FirstName": "John",
"LastName": "Doe",
"Email": "john.doe@example.com"
}
}
}
更新现有记录:
{
"name": "update",
"parameters": {
"objectName": "Contact",
"fields": {
"Id": "001xx00003fH7WFSQAK",
"FirstName": "Jane"
}
}
}
删除记录:
{
"name": "delete",
"parameters": {
"objectName": "Contact",
"fields": {
"Id": "001xx00003fH7WFSQAK"
}
}
}
欢迎贡献!请通过提交拉取请求的方式改进此项目。
本项目采用 MIT License,具体内容如下:
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.