Docs menu

Connect an AI agent with the MCP server

Connect Claude Code, Cursor, Claude Desktop or your own agent to a bubblr line over MCP, with the tools it gets and the guardrails that keep it safe.

The Model Context Protocol lets an AI agent use tools from other services. bubblr's MCP server gives an agent your line's conversations: it can read chats, search messages, send or draft replies, react, and place and steer calls. Each tool is an API call made with the key you give the agent, so the agent can do exactly what that key allows, no more.

  • Server: https://api.bubblr.io/mcp (Streamable HTTP)
  • Authentication: Authorization: Bearer sk_live_…, an API key made for this agent

1. Make a key for the agent

In the app, Developers → API keys, make a key just for this agent:

  • Scopes: messages:read to read, messages:send to reply, calls:read and calls:write for calls.
  • Lines: only the lines it serves.
  • Guardrails: start with drafts only (it writes drafts your team approves in the inbox), allowed recipients (your own number while testing) and a rate limit (30 an hour is a good start). See Guardrails and rate limits.

2. Add the server to your client

Claude Code

Shell
claude mcp add --transport http bubblr https://api.bubblr.io/mcp --header "Authorization: Bearer sk_live_…"

Cursor (~/.cursor/mcp.json)

JSON
{ "mcpServers": { "bubblr": { "url": "https://api.bubblr.io/mcp", "headers": { "Authorization": "Bearer sk_live_…" } } } }

VS Code (.vscode/mcp.json)

JSON
{ "servers": { "bubblr": { "type": "http", "url": "https://api.bubblr.io/mcp", "headers": { "Authorization": "Bearer sk_live_…" } } } }

Claude Desktop and other clients that only speak stdio: bridge with mcp-remote:

JSON
{ "mcpServers": { "bubblr": { "command": "npx",
    "args": ["-y", "mcp-remote", "https://api.bubblr.io/mcp", "--header", "Authorization:${BUBBLR_KEY}"],
    "env": { "BUBBLR_KEY": "Bearer sk_live_…" } } } }

The Claude API (the Messages API's MCP connector):

JSON
{
  "mcp_servers": [{ "type": "url", "url": "https://api.bubblr.io/mcp", "name": "bubblr", "authorization_token": "sk_live_…" }],
  "tools": [{ "type": "mcp_toolset", "mcp_server_name": "bubblr" }]
}

Anything else that takes a remote MCP server URL and a header works the same way. Connectors added from a chat app's settings page expect OAuth sign-in, which the server doesn't offer yet: use a client that sends a header.

3. Try it

Ask the agent something that uses a tool: "Which chats on my line are waiting for a reply?" or "Draft a reply to Hannah saying Thursday works." With a drafts-only key, the reply shows up as a draft in the app's inbox for someone to approve.

The tools

Tool What it does Scope
list_profiles The lines the key can use. any
list_chats Recent chats on a line, with their newest message. messages:read
read_messages A conversation, by chat_id or with a person (with), oldest first. messages:read
search_messages Searches the line's messages for text. messages:read
get_message One message and its status. messages:read
send_message Sends a message, or makes a draft with a drafts-only key. messages:send
react Adds or removes a reaction. messages:send
set_typing Shows the typing indicator. messages:send
mark_read Marks a chat read. messages:send
list_drafts Drafts waiting for approval (and decided ones). messages:read
list_calls · get_call The call log, and one call. calls:read
place_call Calls a number and connects a voice agent or a teammate. calls:write
transfer_call · hangup_call Steers a live call. calls:write

profile_id can be left out when the key covers one line. send_message and place_call take an optional idempotency_key, so an agent that retries doesn't send twice. A tool the key's scopes don't allow answers with the API's error (insufficient_scope, recipient_not_allowed, rate_limited, …), which tells the agent what happened.

Approving drafts isn't a tool, on purpose: a person approves, in the app or through the API with a key that can send.

Keeping an agent safe

  • One key per agent, with only the scopes and lines it needs. Revoke it in the app to cut it off at once.
  • Start with drafts only and allowed recipients; widen them as you trust it.
  • Keep a rate limit even on a trusted agent: a loop in a prompt shouldn't text a customer a hundred times.
  • Mark chats you want people to handle with assigned_to: "human", and tell your agent to leave those alone.
  • Read what it did: drafts and messages record the key that made them.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite