Salesforce MCP 服务器

Salesforce MCP 服务器

一个集成了 Claude 和 Salesforce 的 MCP 服务器,支持自然语言交互管理数据和元数据。

快速入门

安装

运行以下命令安装:

npm install -g @tsmztech/mcp-server-salesforce

配置

用户名/密码认证方式

在配置文件中添加以下内容:

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@tsmztech/mcp-server-salesforce"],
      "env": {
        "SALESFORCE_CONNECTION_TYPE": "User_Password",
        "SALESFORCE_USERNAME": "your_username",
        "SALESFORCE_PASSWORD": "your_password",
        "SALESFORCE_TOKEN": "your_security_token"
      }
    }
  }
}

OAuth 2.0 客户端凭证认证方式

使用以下配置:

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@tsmztech/mcp-server-salesforce"],
      "env": {
        "SALESFORCE_CONNECTION_TYPE": "OAuth_2.0_Client_Credentials",
        "SALESFORCE_CLIENT_ID": "your_client_id",
        "SALESFORCE_CLIENT_SECRET": "your_client_secret",
        "SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com"
      }
    }
  }
}

示例查询

  • 查询对象:Find all objects related to Accounts
  • 插入记录:Insert a new Account record
  • 更新字段:Add a Rating field to the Feedback object