AgenText

Connect your AI agent to AgenText

AgenText lets an AI agent send and receive text messages through your own Android phone. The phone runs AgenText Messenger and relays every text, so messages go out from your real number and show up in your normal conversations. Agents connect over MCP, the REST API or signed webhooks.

1. Get an API key

  1. Install AgenText Messenger on your Android phone and sign in. Signing in creates your workspace and links the phone.
  2. Keep API Bridge turned on in the app. Your agent can only text while the phone is online.
  3. Open the AgenText portal (same account), and under API keys create a key for each agent. Keys start with mbk_, are shown once, and can be revoked at any time.

Open the portal

2. The MCP server

https://api.agentext.app/mcp

Tools

Every tool returns one JSON text block. Errors come back as tool errors with a message, for example device_required when you have more than one phone and didn't pass device_id.

Reading incoming texts

3. Set up your client

Replace mbk_… with your key. Treat it like a password: anyone with it can text from your phone.

Grok Bot

Grok Bot (xAI's agent that runs in Cursor's cloud) is in beta, and its connector screens are still changing. Add AgenText as a custom MCP server where your plan offers one: Connect apps in the sidebar, or for Teams and Enterprise, an admin adds it under Plugins & MCPs in the Cursor Team Marketplace. Use:

Grok Bot follows your Cursor MCP settings, so the Cursor entry below also works. If a screen only offers connectors that sign in with OAuth, AgenText can't be added there yet. The same applies to custom connectors on grok.com.

Grok Build CLI

Add --scope project to save it for one project only. Then run grok mcp doctor agentext to check the connection.

grok mcp add --transport http agentext https://api.agentext.app/mcp \
  --header 'Authorization: Bearer mbk_…'

xAI API (remote MCP tool)

Grok calls AgenText's tools for you during a Responses API request. Add AgenText to tools:

curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "grok-4.7",
  "input": "Text +14155550123: running 10 minutes late",
  "tools": [
    {
      "type": "mcp",
      "server_url": "https://api.agentext.app/mcp",
      "server_label": "agentext",
      "headers": {
        "Authorization": "Bearer mbk_…"
      }
    }
  ]
}'

With the xAI Python SDK:

from xai_sdk.tools import mcp

agentext = mcp(server_url="https://api.agentext.app/mcp", server_label="agentext",
               extra_headers={"Authorization": "Bearer mbk_…"})
# chat = client.chat.create(model="grok-4.7", tools=[agentext])

Claude Code

Add --scope user to use it in every project, or --scope project to share it through .mcp.json.

claude mcp add --transport http agentext https://api.agentext.app/mcp \
  --header 'Authorization: Bearer mbk_…'

Claude Desktop

If your organization has request headers for connectors: Customize → Connectors → Add custom connector, URL https://api.agentext.app/mcp, authentication No sign-in, and a request header Authorization with the value Bearer mbk_…. Otherwise, add this to claude_desktop_config.json (needs Node.js), which bridges through mcp-remote:

{
  "mcpServers": {
    "agentext": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.agentext.app/mcp",
        "--header",
        "Authorization:${AGENTEXT_AUTH}"
      ],
      "env": {
        "AGENTEXT_AUTH": "Bearer mbk_…"
      }
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "agentext": {
      "url": "https://api.agentext.app/mcp",
      "headers": {
        "Authorization": "Bearer mbk_…"
      }
    }
  }
}

Other MCP clients

Any client that supports Streamable HTTP with custom headers works with the URL and header above.

REST API and curl

Base URL https://api.agentext.app/v1, same Authorization header. The full reference is in the OpenAPI document (browse it).

# Send a text
curl -X POST https://api.agentext.app/v1/messages \
  -H 'Authorization: Bearer mbk_…' \
  -H 'Content-Type: application/json' \
  -d '{"to": "+14155550123", "body": "Hello from my agent"}'

# Read replies, newest first
curl 'https://api.agentext.app/v1/messages?direction=inbound&limit=20' \
  -H 'Authorization: Bearer mbk_…'

Send returns 202 with the message in status queued. Poll GET /v1/messages/{id} or use webhooks to follow it to delivered. Pass an Idempotency-Key header to retry a send safely.

For agents: a plain-text version of this page is at /llms.txt.