AgentPhone — Claude Code MCP server: what it does, how to install
Gives AI assistants real phone lines for voice calls and text messaging. Handy when your agent needs to dial clients or process SMS.
claude mcp add agentphone -e AGENTPHONE_API_KEY=<AGENTPHONE_API_KEY> -- npx -y agentphone-mcpWhat AgentPhone does
The server links MCP clients with the AgentPhone telecom backend. With 28 provided tools, an assistant can purchase North American numbers, send text dispatches, trigger outbound voice conversations, and catch incoming calls with webhooks. Each virtual agent can have its own voice style, dedicated prompt, and call forwarding logic.
You can skip local installs via the hosted endpoint https://mcp.agentphone.ai/mcp. Another option runs locally through npx using an AGENTPHONE_API_KEY. The platform handles authentication through bearer tokens or OAuth with PKCE verification.
On self-hosted setups, AGENTPHONE_ALLOW_ANONYMOUS=true gives full account control to anyone who reaches the open port. You must have an active account and API key from agentphone.ai to handle calls.
What it helps with
- purchase telephone numbers in US and Canadian area codes
- dispatch outbound SMS messages and view reply threads
- run conversational voice calls with custom agent personas
- track monthly usage breakdowns across calls and texts
Example prompts for the agent
- Buy a new phone number in the 415 area code for our support line
- Send an SMS to +14155551234 confirming our meeting tomorrow at 3 PM
- Call +14155551234 and handle the appointment scheduling discussion
How to install AgentPhone
1Platform CLI
claude mcp add agentphone -e AGENTPHONE_API_KEY=<AGENTPHONE_API_KEY> -- npx -y agentphone-mcpReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http agentphone https://mcp.agentphone.ai/mcp1Platform CLI: remote server
codex mcp add agentphone --url https://mcp.agentphone.ai/mcp2Platform CLI
codex mcp add agentphone --env AGENTPHONE_API_KEY=<AGENTPHONE_API_KEY> -- npx -y agentphone-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"agentphone": {
"url": "https://mcp.agentphone.ai/mcp"
}
}
}{
"mcpServers": {
"agentphone": {
"command": "npx",
"args": [
"-y",
"agentphone-mcp"
],
"env": {
"AGENTPHONE_API_KEY": "<AGENTPHONE_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"agentphone": {
"type": "http",
"url": "https://mcp.agentphone.ai/mcp"
}
}
}{
"servers": {
"agentphone": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agentphone-mcp"
],
"env": {
"AGENTPHONE_API_KEY": "<AGENTPHONE_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http agentphone https://mcp.agentphone.ai/mcp2Platform CLI
gemini mcp add -e AGENTPHONE_API_KEY=<AGENTPHONE_API_KEY> agentphone npx -y agentphone-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about AgentPhone
How to install AgentPhone in Claude Code?
Run claude mcp add --transport http agentphone https://mcp.agentphone.ai/mcp for the hosted endpoint, or claude mcp add agentphone -e AGENTPHONE_API_KEY=<AGENTPHONE_API_KEY> -- npx -y agentphone-mcp for local stdio execution.
What does AgentPhone do?
It gives AI models access to real telephony, including number provisioning, two-way SMS, and synthetic voice phone calls.
What credentials are required to use AgentPhone?
You need an account on agentphone.ai and a generated API key from the account settings to authenticate your requests.