AgentPhone MCP Server
Enables AI agents to manage phone numbers, send/receive SMS, and place voice calls through natural language, connecting to the phone network via the AgentPhone API.
README
AgentPhone MCP Server
Give AI agents real phone numbers, SMS, and voice calls via the Model Context Protocol.
AgentPhone lets your AI agent buy phone numbers, send/receive SMS, and place voice calls — all through natural language in Cursor, Claude Desktop, or any MCP-compatible client.
Agents are the core concept — each agent gets its own phone numbers, voice personality, system prompt, and webhook. Think of an agent as a virtual team member with its own phone line. You can create agents for different purposes (support, sales, scheduling) and configure how they sound and behave on calls.
Quick Start
1. Get your API key
Sign up at agentphone.ai and create an API key from Settings.
2. Connect via MCP
Option A: Remote server (recommended)
Point your MCP client at the hosted endpoint — no install needed:
{
"mcpServers": {
"agentphone": {
"type": "streamable-http",
"url": "https://mcp.agentphone.ai/mcp",
"headers": {
"Authorization": "Bearer your_api_key_here"
}
}
}
}
Works with any MCP client that supports Streamable HTTP transport (Switchboard, remote agent platforms, etc.).
Option B: Local server (stdio)
Runs locally via npx — works with Cursor, Claude Desktop, Windsurf, and Claude Code:
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)
{
"mcpServers": {
"agentphone": {
"command": "npx",
"args": ["-y", "agentphone-mcp"],
"env": {
"AGENTPHONE_API_KEY": "your_api_key_here"
}
}
}
}
Option C: Self-hosted HTTP server
Run your own HTTP MCP endpoint:
AGENTPHONE_API_KEY=your_api_key npx agentphone-mcp --http --port 3000
Then connect to http://localhost:3000/mcp.
What Can It Do?
Once configured, just ask your AI agent things like:
- "Buy me a phone number in the 415 area code"
- "Create a support agent that greets callers and helps with billing"
- "Call +14155551234 and have a conversation about scheduling a dentist appointment"
- "Text +14155551234 saying 'Your appointment is confirmed for 3pm tomorrow'"
- "Show me my recent calls and transcripts"
- "List the available voices and switch my agent to a different one"
- "Set up a webhook so I get notified when someone calls or texts my number"
- "Show me this month's usage breakdown"
Transports
| Transport | Command | Use case |
|---|---|---|
| Streamable HTTP (remote) | https://mcp.agentphone.ai/mcp |
Agent platforms (Switchboard, etc.), remote clients |
| Streamable HTTP (self-hosted) | npx agentphone-mcp --http --port 3000 |
Your own infrastructure |
| stdio (default) | npx agentphone-mcp |
Cursor, Claude Desktop, Windsurf, Claude Code |
Authentication
- stdio: API key via
AGENTPHONE_API_KEYenvironment variable - HTTP (self-hosted): API key via env var or
Authorization: Bearer <key>header per request - HTTP (hosted): API key via
Authorization: Bearer <key>header per request
Endpoints (HTTP mode)
| Method | Path | Description |
|---|---|---|
POST |
/mcp |
MCP Streamable HTTP endpoint (stateless — each request is independent) |
GET |
/health |
Health check |
Highlights
- Phone numbers — buy and manage numbers in any US/CA area code
- SMS — send and receive text messages, view conversation threads
- Voice calls — place outbound calls with built-in AI conversation (no webhook needed) or bring your own webhook
- Inbound handling — set up webhooks to receive and respond to inbound calls and texts in real time
- Agents — create agents with custom voices, system prompts, call transfer, and voicemail
- Usage & billing — monitor your plan limits, message/call volume, and daily/monthly breakdowns
All Tools (26)
Account
| Tool | Description |
|---|---|
account_overview |
Get a full snapshot of your account — agents, numbers, webhook, and usage |
get_usage |
Get usage stats, plan limits, and quotas. Use breakdown for daily or monthly time-series. |
Phone Numbers
| Tool | Description |
|---|---|
list_numbers |
List all phone numbers in your account |
buy_number |
Purchase a new phone number with optional area_code and agent_id |
SMS
| Tool | Description |
|---|---|
send_message |
Send an SMS from one of your agent's numbers |
get_messages |
Get messages for a specific number |
list_conversations |
List SMS conversations. Pass agent_id to filter by agent. |
get_conversation |
Get a conversation with full message history |
update_conversation |
Set metadata on a conversation |
Voice Calls
| Tool | Description |
|---|---|
list_calls |
List calls. Filter by agent_id, number_id, status, direction, or keyword. |
get_call |
Get call details and transcript |
make_call |
Place an outbound call (webhook-driven) |
make_conversation_call |
Place a call with built-in AI conversation — no webhook needed |
Agents
| Tool | Description |
|---|---|
list_agents |
List all agents with their numbers and voice config |
create_agent |
Create a new agent with voice, system prompt, call transfer, and voicemail |
update_agent |
Update an agent's configuration |
delete_agent |
Delete an agent (numbers are kept but unassigned) |
get_agent |
Get agent details including phone numbers and voice config |
attach_number |
Assign a phone number to an agent |
detach_number |
Remove a phone number from an agent |
list_voices |
List available voices for agents |
Webhooks
All webhook tools accept an optional agent_id — pass it to manage an agent-specific webhook, omit it for the project-level default. Agent webhooks take priority over project-level.
| Tool | Description |
|---|---|
get_webhook |
Get webhook configuration |
set_webhook |
Set a webhook URL for inbound messages and call events |
delete_webhook |
Remove a webhook |
test_webhook |
Send a test event to verify your webhook works |
list_webhook_deliveries |
View delivery history for debugging |
Environment Variables
| Variable | Required | Description |
|---|---|---|
AGENTPHONE_API_KEY |
stdio: yes, HTTP: no | Your AgentPhone API key (HTTP mode can use Authorization header instead) |
AGENTPHONE_BASE_URL |
No | Override the API base URL (defaults to https://api.agentphone.ai) |
PORT |
No | Port for HTTP mode (defaults to 3000, overridden by --port) |
Development
git clone https://github.com/AgentPhone-AI/agentphone-mcp.git
cd agentphone-mcp
npm install
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm start # Run compiled JS (stdio)
How It Works
This MCP server connects your AI assistant to the AgentPhone API. Your assistant talks to the MCP server, which calls the AgentPhone API, which talks to the phone network.
Your AI Assistant <--> agentphone-mcp <--> AgentPhone API <--> Phone Network
Outbound: your assistant places calls and sends texts through AgentPhone's API.
Inbound: when someone calls or texts your number, AgentPhone sends a webhook event to your server — you can then respond programmatically or let your agent's built-in AI handle it.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。