Back to build guides
Integration4 min read· Nov 18, 2026

Give your Claude Code agent a phone number

One command adds the AgentPhone MCP server to Claude Code. From then on the agent can buy a number, text, call and read replies in plain language, from the terminal or Claude Code web.

AgentPhone TeamFounders
Give your Claude Code agent a phone number

Claude Code already runs your tests, edits your files and opens pull requests. With one more command it can also buy a phone number, send a text and place a call, and it can check for the reply before it moves on. This page is the setup, what the agent can do once it is connected, and the two or three things that trip people up.

Setup in one command

The AgentPhone MCP server is hosted, so there is nothing to install. Claude Code supports remote servers over Streamable HTTP and OAuth, which means no key to paste if you prefer the browser sign-in.

bash
claude mcp add --transport http agentphone https://mcp.agentphone.ai/mcp

Run /mcp inside Claude Code to finish the sign-in. If you would rather use an API key, which is the right choice for headless runs and CI:

bash
claude mcp add --transport http agentphone https://mcp.agentphone.ai/mcp \
--header "Authorization: Bearer $AGENTPHONE_API_KEY"

To share the server with everyone on a repo, commit a .mcp.json at the root instead:

json
{ "mcpServers": { "agentphone": { "type": "http", "url": "https://mcp.agentphone.ai/mcp" } } }

Each person signs in once. Keys never land in git.

Or install the skill

The skill is a slash command with the API reference baked in. It does not start a server; it teaches the agent how to use the REST API or the MCP server you already configured.

bash
npx skills add AgentPhone-AI/skills
export AGENTPHONE_API_KEY=sk_live_...

Then /agentphone buy a 415 number and create a support agent works from any conversation. Pick the MCP route when you want the agent to act on its own; pick the skill when you want to drive it.

What it can do once connected

The server exposes 28 tools. In practice you say things and it works out which to call:

  • "Show me my account" lists agents, numbers, the webhook and usage.
  • "Buy a number in 415 and attach it to the support agent" provisions and attaches in one go. Buying spends balance, so the tool asks for confirmation.
  • "Text my phone that the deploy is done" sends from the right number.
  • "Wait for a reply on that number" uses watch_messages instead of polling, and the reply arrives as a notification.
  • "Call +1 415 555 0123 and ask whether they are still coming tomorrow" places a hosted call and returns the transcript.
  • "Set the webhook to https://example.com/hook and send a test event" wires inbound messages to your server.

A nice pattern for coding agents: have Claude Code text you when a long task finishes, then keep working. The reply comes back into the same session.

Things to know

  • New accounts get $5 of credit and a number is $3, so the first number and about 100 one-segment messages are covered. Outbound calls need a paid balance; the tool tells you if a 402 comes back.
  • Inbound texts work immediately. Outbound SMS needs 10DLC registration on US numbers, which we submit for you from the dashboard. iMessage lines do not need it.
  • Claude Code web and cloud runs cannot spawn a local process, which is why the hosted URL exists. Use the API-key header there.
  • Only purchases are confirmed. Buying a number asks you first; sends and calls are billed as soon as the tool runs. Hosted calls the connector places begin with an AI disclosure.

Verify it worked

Ask for an account overview. If account_overview comes back with your project name, the connection is live. If you see 401 Missing Authorization header, the key or sign-in did not take; rerun /mcp.

FAQ

Do I need to run anything locally? No. The MCP server is hosted at mcp.agentphone.ai and Claude Code connects to it over HTTP. A local version exists (npx -y agentphone-mcp) if you want the key to stay in your own environment.

How does Claude Code authenticate to AgentPhone? Either OAuth through the browser, which /mcp starts, or an API key sent as a bearer header. Use the key for scripts and CI.

Can Claude Code receive texts, not only send them? Yes. Ask it to watch a number and the next inbound message arrives as a notification in the session. Your own server can also receive them on a webhook.

What does it cost to try? New accounts get $5 of credit without a card. A US number is $3 a month and SMS is $0.02 a segment, so the first inbound experiment fits inside the credit; sending from a US number also needs 10DLC registration, $25 for a sole proprietor or standard brand.

Is there a difference between the skill and the MCP server? The MCP server gives the agent tools it can call on its own. The skill is a /agentphone command that carries the API reference so the agent knows how to use the REST API or your configured MCP server. Many people install both.

Ready to give your AI Agent a phone number?