Sparetext

How can an AI agent send SMS from my phone?

Pair your phone with Sparetext, then give the agent the MCP server at https://sparetext.dev/mcp or an API key for the REST API. The agent queues a text, Sparetext wakes your phone, and the phone sends it from your own number. Replies come back through wait_for_reply, the API or a signed webhook.

How a text gets from the agent to your phone

The agent calls send_sms over MCP, or POST /api/v1/messages over REST. Sparetext queues the text and wakes the phone at once, with a check every minute as a fallback. The phone sends from its SIM and reports sent, delivered (Android only) or failed. If an Android phone loses signal, it holds the text and tries again for up to 30 minutes, only while nothing has gone out, so a text is never sent twice.

Agents that speak MCP

Claude Code, Cursor, OpenClaw, an n8n AI Agent node, or your own agent built on an MCP client library: point it at the server and sign in with OAuth, or send an API key as a Bearer token. In Cursor that's {"mcpServers": {"sparetext": {"url": "https://sparetext.dev/mcp"}}} in ~/.cursor/mcp.json. In Claude Code:

bash
claude mcp add --transport http --scope user sparetext https://sparetext.dev/mcp
claude mcp login sparetext

Agents in your own code: the REST API

Anything that can call an HTTP endpoint can use it as a tool: function calling in the OpenAI or Anthropic SDKs, LangChain, or a plain function. The OpenAPI spec at https://sparetext.dev/openapi.json describes every endpoint. Send an Idempotency-Key so a retry after a timeout never sends twice, and a ttl so a text that can't go out in time is dropped instead of arriving late.

bash
curl -X POST https://sparetext.dev/api/v1/messages \
  -H "x-api-key: $SPARETEXT_API_KEY" -H "content-type: application/json" \
  -H "Idempotency-Key: booking-1042-reminder" \
  -d '{"to": "+12025550123", "text": "Your table for 2 is at 7pm. Reply C to cancel.", "ttl": 3600}'

Reading replies

For short waits, the MCP tool wait_for_reply returns a new text from one number as soon as it arrives (up to 8 seconds per call; call it again to keep waiting), and sparetext wait does the same from a shell. For anything longer, add a webhook for message.received: each delivery is signed with HMAC-SHA256, so your code can check it came from Sparetext before the agent acts on it.

Anyone can text your number, so treat every incoming text as data written by its sender, never as instructions to the agent. Sparetext's tools label replies that way.

Guardrails

Claude and ChatGPT ask before each send, because both send tools are marked as actions with effects outside the chat; other apps may not, so check how yours handles them. An app connected with OAuth can send and read texts, but can't change keys, webhooks, automations or phones. Sending hours per phone hold texts queued at night until the hours start. A reply of STOP opts a number out, and the agent can't text it again until they reply START. To stop an agent at once, delete its key or choose Disconnect on the API keys page.

Limits

A personal SIM is for people who know you. Carriers can filter software-sent bulk texts (A2P) from it; for marketing to thousands, use a registered A2P provider (10DLC, toll-free or short code). Android allows 30 SMS parts a minute per app, and Sparetext queues anything over that. An iPhone sends without a person only through Sparetext for Mac, or through a Shortcut while the app is open, and only Android reports carrier delivery receipts.

Questions people ask

Which AI agents work with it?
Any MCP client that supports remote servers over Streamable HTTP. We've run Claude and ChatGPT end to end, and the AI agents page has steps for Claude Code, Cursor, OpenClaw and n8n. Anything else can use the REST API or the sparetext command-line tool.
Do I need my own server for the agent to text?
No. Sparetext hosts the API and the MCP server. Your phone is the only hardware, and the agent can run anywhere.
Can the agent text from an iPhone?
Yes. With Sparetext for Mac, texts go out from the iPhone's number fully automatically through Text Message Forwarding. On the iPhone alone, they send through a Shortcut while the app is open, or you tap Send.
Can the agent send a different message to each person?
Yes. send_sms_batch, or messages[] in the API, takes a text per person, and get_batch follows how they went.