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 來僅選擇可讀取、寫入或刪除資料的工具,或它們的任意組合。