MCP Server
The AgentPhone MCP Server lets your AI agent buy phone numbers, send/receive SMS, and place voice calls — all through natural language in Claude Code, Cursor, Claude Desktop, Windsurf, or any MCP-compatible client.
There are two ways to connect:
Either way, the MCP server is a thin, stateless bridge that translates MCP tool calls into AgentPhone API requests. All state (numbers, calls, messages) lives on the AgentPhone platform.
Hosted server (Streamable HTTP)
The hosted endpoint is the fastest way to connect, and the only option for clients that cannot spawn a local process (Claude Code web, ChatGPT, hosted agent frameworks).
Authentication
The endpoint accepts two forms of auth:
- Browser sign-in (OAuth). Add the URL with no credentials. Clients that support MCP OAuth open a browser window to sign in; no key to paste.
- API key. Send your key as a bearer token:
Authorization: Bearer YOUR_API_KEY. Use this for clients without OAuth support, headless environments, and server-side frameworks.
An unauthenticated request returns 401 with {"error": "Missing Authorization header"}.
Claude Code
This works in Claude Code web as well as the CLI. The stdio npx command below does not work in Claude Code web.
Cursor, Windsurf, and other JSON-configured clients
Most clients accept a remote server in their mcpServers config. Cursor uses url:
Windsurf uses serverUrl instead of url. Drop the headers block to use browser sign-in where the client supports it.
Claude Desktop and ChatGPT
Claude Desktop: Settings → Connectors → Add custom connector, paste https://mcp.agentphone.ai/mcp, and sign in when prompted. ChatGPT: Settings → Connectors → Create with the same URL.
Python / server-side frameworks
Frameworks such as Google ADK, LangChain, and the OpenAI Agents SDK connect to the hosted URL directly with the bearer header. See the Google ADK and LangChain guides for full examples.
Local server (npm)
Run the same server as a local process when you prefer to keep the API key in your own environment.
1. Get your API key
Sign up at agentphone.ai and create an API key from Settings.
2. Add to your AI client
Add the following to your MCP configuration:
Cursor: Settings > MCP or ~/.cursor/mcp.json
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
You can also clone the repo and run the built server directly with node dist/index.js.
3. Start using it
Once configured, ask your AI agent things like:
- “Show me an overview of my account”
- “Buy me a phone number in the 415 area code”
- “Create a support agent with a hosted AI voice that greets callers and helps with billing”
- “Call +14155551234 and have a conversation about scheduling a dentist appointment”
- “List the available voices and switch my agent to a different one”
- “Show me my recent calls and transcripts”
- “Set up a webhook to receive inbound messages”
- “How many numbers can I still provision?”
Environment variables
Available tools (26)
Account
Phone Numbers
SMS
Voice Calls
make_call forwards speech to your webhook for processing. make_conversation_call uses a built-in LLM so the AI can hold a full conversation autonomously — no webhook setup needed. The agent must have a phone number attached for either tool.
Agents
Set voice_mode to "hosted" with a system_prompt for autonomous AI voice calls. Set it to "webhook" (default) to forward call transcripts to your webhook URL. Use list_voices to see available voice IDs before creating or updating an agent.
Webhooks (project-level)
Webhooks (per-agent)
Per-agent webhooks let you route different agents to different backends. When an agent has its own webhook, its events go there instead of the project-level webhook. Removing an agent’s webhook causes it to fall back to the project default.
Development
npm
The package is published as agentphone-mcp on npm.

