textbee-mcp
Official@textbee/mcp
用于 textbee.dev 的 MCP 服务器,textbee.dev 是一个开源 SMS 网关,可将 Android 手机变成 SMS API。它为 Claude Desktop、Claude Code、Cursor 以及任何 MCP 客户端提供通过您自己的手机和号码发送和读取短信的能力。
三个工具,无逐条消息标记,支持自托管的 textbee 实例。
设置
您需要一个 textbee 账户、一台已配对的 Android 设备以及来自控制台的 API 密钥。该密钥拥有完整的账户访问权限,请像对待密码一样妥善保管。
Claude Code
claude mcp add textbee -s user -e TEXTBEE_API_KEY=your-key -- npx -y @textbee/mcpClaude Desktop
添加到 claude_desktop_config.json(macOS:~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"textbee": {
"command": "npx",
"args": ["-y", "@textbee/mcp"],
"env": { "TEXTBEE_API_KEY": "your-key" }
}
}
}Cursor
在 ~/.mcp.json 中使用相同的对象:
npm install -g @textbee/mcp首次启动较慢
npx 会在首次运行时下载包。如果您的客户端等待超时,请全局安装一次,然后将配置指向该二进制文件:
{ "mcpServers": { "textbee": { "command": "textbee-mcp", "env": { "TEXTBEE_API_KEY": "your-key" } } } }Related MCP server: clicksend-mcp
工具
send_sms
向一个或多个收件人发送短信(E.164 格式,例如 +15550100123)。发送手机是自动选择的:优先使用您的默认设备,否则使用心跳时间最近的已启用设备。可选参数包括 device_id、sim_subscription_id 和 scheduled_at。当账户使用 SMS 队列时,会返回一个 sms_batch_id 用于投递检查。
get_messages
读取账户上所有设备的消息。默认返回已接收消息,按最新优先排序。可按 direction(received、sent、all)、自由文本 search、sms_batch_id(一次发送的每个收件人投递状态)、device_ids 以及 from/to 时间窗口进行筛选。支持游标分页,可无重复、无遗漏地轮询。
list_devices
账户上的手机列表:ID、启用状态、默认发送设备、最近一次心跳时间以及消息数量。
自托管 textbee
将服务器指向您自己的实例:
"env": {
"TEXTBEE_API_KEY": "your-key",
"TEXTBEE_BASE_URL": "https://sms.example.com"
}/api/v1 后缀是可选的,会自动添加。子路径部署(如 https://example.com/textbee)同样适用。无效的 URL 会直接报错,而不会静默回退,因此拼写错误绝不会将您的密钥发送到公共 API。
环境变量
变量 | 必需 | 默认值 | 用途 |
| 是 | 无 | 来自 textbee 控制台的 API 密钥 |
| 否 |
| 自托管时您的实例 URL |
| 否 |
| 每次请求的超时时间(毫秒) |
备注
您的密钥只保存在您的机器上:此服务器仅与上述基础 URL 上的 textbee API 通信。
发送会消耗您 textbee 套餐的配额,套餐的速率限制在服务端生效。
所有诊断信息输出到 stderr;stdout 保留给 MCP 协议使用。
作为库使用
该包还导出了其工具定义,可用于嵌入到另一个 MCP 主机中(托管式远程端点正是这样复用的):
import { createTextbeeMcpServer, staticCredentials, loadConfig } from '@textbee/mcp'
const server = createTextbeeMcpServer({
credentials: staticCredentials(loadConfig(process.env)),
})凭据在每次工具调用时解析,因此多租户主机可以为每个请求注入不同的密钥。请参阅 credentialsFromAuthInfoExtra。
许可证
MIT。属于 textbee 项目的一部分。
Available Tools
3 toolsget_messagesRead messagesARead-only
Read the SMS messages on the user's textbee account, covering every device, no device id needed. direction defaults to "received": checking for a reply or a one-time code is the usual case. Pass direction "sent" to review what went out (each row carries its delivery status), or "all" for a conversation in order. Pass the sms_batch_id from a send to see that send's per-recipient delivery status. To poll for new messages without missing or repeating any: use order "asc" with a from bound, then keep calling with the next_cursor each result prints. from is inclusive and to is exclusive, so consecutive windows tile exactly. Reading does not consume the plan send quota. Messages reach textbee within a few seconds of arriving on the phone, so when waiting for a code, wait briefly and call again rather than tight-polling.
Inputs: to, from, limit, order, +5 more.
list_devicesList devicesARead-only
List the Android phones registered to this textbee account: id, name, enabled state, which one is the default sender, when each last checked in, and message counts. Call this when a send fails with a device error, when the user asks which phone will be used, or when you need a device_id. Takes no arguments and sends no SMS.
Inputs: no named parameters.
send_smsSend SMSA
Send an SMS through the user's own textbee account and Android phone. Recipients are phone numbers or short codes, sent as the user gives them. A local number or short code reaches recipients in the sending phone's country. For a number in another country, use international format with the country code, such as +15550100123. Sender names such as MYBANK cannot receive SMS. The sending phone is chosen automatically: the account default device, otherwise the enabled device with the most recent heartbeat. Only pass device_id when the user explicitly names a phone; ids come from list_devices. Sending costs the user a real message against their textbee plan quota, so do not send speculatively and do not retry a send that may already have gone out. When the account has SMS queueing enabled the result includes an sms_batch_id; pass it to get_messages as sms_batch_id to check per-recipient delivery status.
Inputs: message (required), recipients (required), device_id, sim_number, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool occupies a distinct role: send_sms writes, get_messages reads, list_devices enumerates devices. The descriptions explicitly clarify boundaries (e.g. list_devices sends no SMS, get_messages covers all devices without a device id), leaving no realistic chance of misselection.
All three names follow a consistent snake_case verb_noun pattern: send_sms, get_messages, list_devices. The verb choice (send/get/list) is semantically appropriate per tool rather than arbitrary, so the set reads predictably.
Three tools is exactly right for a narrow SMS gateway: send, read, and device discovery, with each tool earning its place. Nothing is padded and nothing feels thin given the constrained domain.
The core lifecycle is covered and cross-referenced well: sms_batch_id from send feeds get_messages, device_id from list_devices feeds send, and pagination/cursor rules prevent dead ends. Minor gaps remain (no account/quota info, no way to enable or disable a device when a send fails with a device error, no message deletion).
Maintenance
Related MCP Connectors
Send and read WhatsApp, email and SMS from Claude, ChatGPT, Cursor or any MCP client, from your own accounts: your WhatsApp number (linked by QR code), your mailbox (IMAP/SMTP) and your Android phone (SMS from its SIM). Tools: list-accounts, get-account, add-account, add-email-account, list-messages, send-message (one channel or several in one call). Hosted, OAuth 2.1, nothing to install. Free plan with unlimited messages; paid plans from 19 EUR/month remove the footer and add media and webhooks. Docs and client configs: github.com/UnlimitedMessaging/unlimited-messaging-mcp
SMS alerts for AI agents and scripts. Text your own phone and read replies. API key required.
Send texts (SMS) from your own Android phone and your own number, from any AI app.
Text your own phone from Claude and ChatGPT: reminders, alerts, scheduled SMS. Free 5 texts/mo.
Related MCP Servers
- AlicenseBqualityDmaintenanceAndroidAPI.net MCP Connector lets Claude send SMS, WhatsApp messages, and OTPs via your linked Android device or gateway credits. Features * 52 tools covering SMS, WhatsApp, OTP, Contacts, Android devices * Works with Claude Desktop and Claude Code * Install: npx -y androidapi-mcp Setup Set ANDROIDAPI_SECRET env var with your API key from AndroidAPI.net → Tools → API Keys5239 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables Claude to read, organize, and send SMS messages through your ClickSend account.-
- FlicenseNot gradedqualityDmaintenanceEnables an AI-powered SMS assistant that receives inbound messages via TextBee, processes them with a local Ollama model and optional MCP tools, and sends replies back to the sender.1-
- FlicenseNot gradedqualityCmaintenanceEnables AI applications to send and receive real iMessage/SMS messages through a local MCP service, with tools for sending texts, checking new messages, browsing history, and querying line status.4-