Bridgedocs

Bridge for AI assistants (MCP)

bridgectl mcp runs a Model Context Protocol server on stdio, so assistants such as Claude, Cursor and other MCP clients can send SMS and broadcasts, run phone verifications, check the opt-out list and check delivery through your Bridge, using an API key you choose.

bridgectl login --url https://api.sms.example.com   # once; or set BRIDGE_URL and BRIDGE_API_KEY
bridgectl mcp                                        # the client starts this for you

Start with a test key (bk_test_…): nothing is sent, messages are simulated, and verification codes are returned to the assistant, so it can try whole flows safely. Switch to a live key when you want real SMS.

Tools

ToolWhat it doesChanges anything
whoamiThe key's project and environment (live or test)No
send_smsQueues an SMS (to, message, optional device_id)Sends an SMS
get_messageA message's status and timelineNo
list_messagesRecent messages, filtered by status, direction or recipientNo
send_verification_codeGenerates and sends a one-time code (returned with test keys)Sends an SMS
check_verification_codeChecks a code by number or verification IDUses an attempt
create_broadcastSends one template to many numbers (template, recipients with to and vars, optional name, scheduled_at). With dry_run: true it only previewsSends SMS (nothing with dry_run)
get_broadcastA broadcast's status and countsNo
list_schedulesScheduled and repeating messages: timing, next run, last errorNo
check_opt_outWhether a number is on the opt-out listNo
list_devicesPaired phones: online status, battery, SIMs, send limitsNo
get_usageCounts and delivery rate for 24 hours and 30 daysNo

The verification tools take an optional app (a Verify app ID or slug) and use the project's default app without it. check_verification_code with a number and no app checks that number's latest pending code of any app.

Read-only tools are marked as such, so clients that ask before acting on the world will ask before send_sms, send_verification_code and create_broadcast. The server also tells the assistant to confirm the number and text before sending with a live key, and to preview a broadcast with dry_run and show you the result before creating it. Each send_sms call carries a fresh idempotency key, so a retried call never sends twice. Broadcasts take no idempotency key: if a create_broadcast call fails with a network error, check the recent broadcasts in the dashboard before asking again.

Set it up in your client

The server needs bridgectl on your PATH (see the CLI guide) and either a saved bridgectl login or these environment variables.

Claude Code

claude mcp add bridge --env BRIDGE_URL=https://api.sms.example.com --env BRIDGE_API_KEY=bk_test_… -- bridgectl mcp

Claude Desktop, Cursor and other clients that use a JSON config (claude_desktop_config.json, .cursor/mcp.json, and so on):

{
  "mcpServers": {
    "bridge": {
      "command": "bridgectl",
      "args": ["mcp"],
      "env": {
        "BRIDGE_URL": "https://api.sms.example.com",
        "BRIDGE_API_KEY": "bk_test_…"
      }
    }
  }
}

On Windows use the full path to bridgectl.exe if it is not on the PATH the client sees.

Good to know

  • The key decides what the assistant can reach: one project, one environment. Create a separate key for the assistant so you can revoke it on its own, and see its requests under Logs.
  • Errors come back as tool errors with Bridge's message (for example rate_limited with how long to wait), so the assistant can explain them instead of failing silently.
  • Live sends follow the project's routing: phones first, then providers if you enabled them.
  • Everything the tools do is also in the REST API and the TypeScript SDK.
Edit on GitHub

On this page