Sinch Engage / MessageMedia MCP server
官方Sinch Engage(在澳洲為 Sinch MessageMedia)MCP 伺服器,提供 Sinch Engage API 作為 MCP 工具。
文件
Sinch Engage MCP 伺服器
此儲存庫包含 Sinch Engage(澳洲為 Sinch MessageMedia)MCP 伺服器的原始碼,該伺服器將 Sinch Engage API 提供為 MCP 工具。
工具概覽
以下是 MCP 伺服器中可用的工具列表(所有電話號碼必須以 E.164 格式提供,例如澳洲號碼為 +61400000000)。
訊息傳送
| 工具 | 說明 | 類別 | 模式 |
|---|---|---|---|
| sendMessage | 傳送簡訊至手機號碼 | messaging | write |
報表
| 工具 | 說明 | 類別 | 模式 |
|---|---|---|---|
| getDetailedMessageReport | 針對指定日期範圍產生已傳送及已接收訊息的詳細報表,可選擇性依方向、帳戶、中繼資料及分組進行篩選。 | reporting | read |
| getSummaryMessageReport | 針對指定日期範圍產生已傳送及已接收訊息的摘要報表,可選擇性依方向、帳戶及分組進行篩選。 | reporting | read |
| getSummaryInsightMessageReport | 擷取指定日期範圍內已傳送及已接收訊息的預編譯摘要報表,可選擇性依方向、帳戶及分組進行篩選。 | reporting | read |
| getAsyncReportStatus | 透過 report_id 擷取非同步報表請求的狀態。 | reporting | read |
| getAsyncReportFields | 擷取非同步詳細報表匯出可用的欄位列表。 | reporting | read |
| requestAsyncDetailedMessageReport | 針對指定日期範圍請求非同步詳細報表,包含報表格式與目的地的傳遞選項。 | reporting | read |
聯絡人
| 工具 | 說明 | 類別 | 模式 |
|---|---|---|---|
| getContactGroups | 擷取與帳戶相關聯的聯絡人群組(列表)的分頁列表。 | reporting | read |
| getContactGroupDetails | 擷取由 group_id 識別的特定聯絡人群組(列表)的詳細資料。 | reporting | read |
| getContactWithSearch | 擷取聯絡人列表,可依群組、電話號碼、姓名及頻道類型進行篩選。 | reporting | read |
| createContactGroup | 使用指定名稱及選用別名建立新的聯絡人群組(列表)。 | reporting | write |
| createContact | 使用指定詳細資料建立新的聯絡人。 | reporting | write |
| updateContact | 使用新詳細資料更新由 contact_id 識別的現有聯絡人。 | reporting | write |
| deleteContactGroup | 刪除由 group_id 識別的特定聯絡人群組(列表)。 | reporting | delete |
入門指南
先決條件
- Node.js >= 16.0
- 一個已佈建的 Sinch Engage 帳戶
- Claude Desktop(或任何其他 MCP 用戶端)。本 README 專注於 Claude Desktop,但此 MCP 伺服器可與任何 MCP 用戶端搭配使用。
API 憑證
若要使用 MCP 工具所使用的 API,您將需要以下憑證:
SINCH_ENGAGE_API_KEY和SINCH_ENGAGE_API_SECRETSinch Engage 憑證
MCP 伺服器設定
Sinch Engage MCP 伺服器以 NPM 套件形式提供執行。以下是如何在 Claude Desktop 設定檔 (claude_desktop_config.json) 中進行設定。請記得填入您自己的憑證以及區域(目前支援 EU 和 AU):
{
"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 憑證和區域 (EU 或 AU):
{
"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 來僅選擇可讀取、寫入或刪除資料的工具,或它們的任意組合。