Sinch Engage / MessageMedia MCP server

官方

Sinch Engage(在澳大利亚为Sinch MessageMedia)MCP服务器,将Sinch Engage API作为MCP工具提供。

你可以用 Sinch Engage MessageMedia MCP 做什么?

  • 发送短信 — 使用 sendMessage 向 E.164 格式的手机号码发送文本消息。
  • 生成详细消息报告 — 通过 getDetailedMessageReport 获取指定日期范围内已发送和已接收消息的详细报告。
  • 生成摘要消息报告 — 使用 getSummaryMessageReportgetSummaryInsightMessageReport 获取指定日期范围内消息活动的摘要。
  • 请求异步详细报告 — 通过 requestAsyncDetailedMessageReport 启动异步详细报告导出,并使用 getAsyncReportStatus 检查其状态。
  • 管理联系人和群组 — 使用 createContactupdateContactcreateContactGroupdeleteContactGroup 创建、更新或删除联系人和联系人群组。
  • 搜索和查看联系人 — 通过 getContactWithSearch 按电话号码、姓名或群组查找联系人,并通过 getContactGroups 列出群组。

文档

Sinch Engage MCP 服务器

Latest Release

本仓库包含 Sinch Engage(在澳大利亚为 Sinch MessageMedia)MCP 服务器的源代码,该服务器将 Sinch Engage API 作为 MCP 工具提供。

工具概览

以下是 MCP 服务器中可用的工具列表(所有电话号码必须使用 E.164 格式,例如澳大利亚号码为 +61400000000)。

消息

工具描述类别模式
sendMessage向手机号码发送短信messagingwrite

报告

工具描述类别模式
getDetailedMessageReport生成指定日期范围内已发送和已接收消息的详细报告,可按方向、账户、元数据和分组进行可选筛选。reportingread
getSummaryMessageReport生成指定日期范围内已发送和已接收消息的摘要报告,可按方向、账户和分组进行可选筛选。reportingread
getSummaryInsightMessageReport获取指定日期范围内已发送和已接收消息的预编译摘要报告,可按方向、账户和分组进行可选筛选。reportingread
getAsyncReportStatus通过 report_id 检索异步报告请求的状态。reportingread
getAsyncReportFields检索异步详细报告导出可用的字段列表。reportingread
requestAsyncDetailedMessageReport请求指定日期范围内已发送和已接收消息的异步详细报告,可设置报告格式和目标的交付选项。reportingread

联系人

工具描述类别模式
getContactGroups检索与账户关联的联系人组(列表)的分页列表。reportingread
getContactGroupDetails检索由 group_id 标识的特定联系人组(列表)的详细信息。reportingread
getContactWithSearch检索联系人列表,可按组、电话号码、姓名和渠道类型进行筛选。reportingread
createContactGroup使用指定名称和可选别名创建新的联系人组(列表)。reportingwrite
createContact使用指定详细信息创建新联系人。reportingwrite
updateContact使用新详细信息更新由 contact_id 标识的现有联系人。reportingwrite
deleteContactGroup删除由 group_id 标识的特定联系人组(列表)。reportingdelete

入门指南

前提条件

API 凭证

要使用 MCP 工具所调用的 API,您需要以下凭证:

MCP 服务器配置

Sinch Engage MCP 服务器以 NPM 包的形式提供执行。以下是在 Claude Desktop 配置文件(claude_desktop_config.json)中进行设置的方法。请记得在环境变量中填入您自己的凭证和区域(目前支持 EUAU):

{
  "mcpServers": {
    "Sinch Engage": {
      "command": "npx",
      "args": [
        "-y",
        "@sinch-engage/mcp-server"
      ],
      "env": {
        "SINCH_ENGAGE_API_KEY": "<your-key>",
        "SINCH_ENGAGE_API_SECRET": "<your-secret>",
        "SINCH_ENGAGE_REGION": "<region>",
        "MCP_TOOL_CATEGORIES": "reporting, contacts, messaging",
        "MCP_TOOL_MODES": "read, write, delete"
      }
    }
  }
}

在本地运行 MCP 服务器

选项 1:使用 Claude Desktop 通过 stdio 启动 MCP 服务器

要在本地使用 Claude Desktop 运行 MCP 服务器,您需要克隆仓库并构建 MCP 服务器。此选项适用于本地开发和测试。

步骤 1:克隆仓库

git clone https://github.com/messagemedia/sinch-engage-mcp-server.git

步骤 2:安装依赖项

cd sinch-engage-mcp-server
npm install

步骤 3:设置 Claude Desktop 配置

以下是在 Claude Desktop 配置文件(claude_desktop_config.json)中配置 MCP 服务器的示例,您可以在其中提供 Sinch Engage 凭证和区域(EUAU):

{
  "mcpServers": {
    "Sinch Engage": {
      "command": "node",
      "args": ["/path/to/sinch-engage-mcp-server/src/index.js"],
      "env": {
        "SINCH_ENGAGE_API_KEY": "<your-key>",
        "SINCH_ENGAGE_API_SECRET": "<your-secret>",
        "SINCH_ENGAGE_REGION": "<region>",
        "MCP_TOOL_CATEGORIES": "reporting, contacts, messaging",
        "MCP_TOOL_MODES": "read, write, delete"
      }
    }
  }
}

步骤 4:(可选)筛选 MCP 服务器中可用的工具

工具过多意味着上下文更大,令牌使用量更高,并且 LLM 在选择正确工具时更容易混淆。
您可以通过在 Claude Desktop 配置选项中提供 MCP_TOOL_CATEGORIES 来筛选 MCP 服务器中可用的工具。

如果您想按权限筛选工具,可以使用 MCP_TOOL_MODES 仅选择可以读取、写入或删除数据的工具,或它们的任意组合。