使用说明
twilio mcp
通过Twilio发送短信的简单MCP服务器。纯TypeScript,无构建步骤。
为什么存在: 这 官方Twilio MCP 有一个 程序错误 这会导致无效的工具模式,使其无法与Claude一起使用。这是一个可行的最小替代方案。
用法
npx tsx src/index.ts --account-sid <sid> --auth-token <token> --messaging-service-sid <sid> [--default-to <number>]
参数
--account-sid-Twilio帐户SID(必需)--auth-token-Twilio认证令牌(必填)--messaging-service-sid-Twilio消息服务SID(必需)--default-to-默认收件人电话号码(可选)
Claude代码配置
添加 ~/.claude/settings.json:
{
"mcpServers": {
"twilio": {
"command": "npx",
"args": [
"tsx",
"/path/to/twilio-mcp/src/index.ts",
"--account-sid", "YOUR_ACCOUNT_SID",
"--auth-token", "YOUR_AUTH_TOKEN",
"--messaging-service-sid", "YOUR_MESSAGING_SERVICE_SID",
"--default-to", "+1987654321"
]
}
}
}
工具
send_text
发送短信。
参数:
to(可选,如果--default-to已设置)-E.164格式的收件人电话号码message(必填)-要发送的短信
