AgentPhone

io.github.AgentPhone-AI由 GitHub 账号 AgentPhone-AI 发布v0.8.0更新于 Oct 29, 2026

Give AI agents real phone numbers, messages, and voice calls via MCP.

已验证Streamable HTTP可网页运行沟通与协作商业与电商

概览

AI 生成的概览

AgentPhone 让 AI 助手拥有真实电话号码,可收发短信/iMessage、发起 AI 语音通话,并管理代理、联系人和 Webhook。

可以做什么
  • 管理代理与号码:创建、更新或删除代理,查看可用语音,购买号码并绑定或解绑
  • 收发消息:发送短信或 iMessage,查看消息与对话列表,设置对话元数据
  • 发起与查看通话:发起 Webhook 驱动或内置 AI 对话的通话,列出通话并获取转写
  • 管理联系人:列出、创建、更新和删除已保存联系人
  • 配置 Webhook:获取、设置、删除、测试 Webhook 并查看投递记录
  • 查看账户状态:代理、号码与限额概览,以及用量明细
适用场景
适合需要让助手通过电话网络触达真实用户的场景,例如发送确认短信、打电话预约或做问卷、运营呼入客服线路,而不只是在软件内部操作。也适合已有或计划开通 AgentPhone 账户、希望从 MCP 客户端直接驱动它的团队。
运行要求
可使用托管端点 mcp.agentphone.ai,或本地 npm 包 agentphone-mcp(需 Node 20.19+ 或 22.12+)。需要 AgentPhone 账户和 API 密钥:stdio 模式用 AGENTPHONE_API_KEY,HTTP 模式用 Authorization bearer 头;也支持 OAuth 登录。自建 HTTP 模式需指定端口,启用 OAuth 还需预先注册的客户端 ID。
安装前请注意
会产生费用:购买号码、通话和消息均按次计费,buy_number 需传 confirm=true 才会执行。delete_agent 和删除联系人均不可撤销。通过这些工具发起的通话会强制附加 AI 披露语,无法关闭。API 密钥拥有账户完全控制权,reveal_secret 会把 Webhook 签名密钥暴露到模型上下文和日志中。开启 AGENTPHONE_ALLOW_ANONYMOUS 后,任何能访问该端点的人都可操作该账户。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AgentPhone,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.AgentPhone-AI%2Fagentphone/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

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

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:

json
{  "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)

json
{  "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:

bash
PORT=3000 npx agentphone-mcp --http

Then connect to http://localhost:3000/mcp and configure your MCP client to send Authorization: Bearer <your AgentPhone API key> with each request. A server-side AGENTPHONE_API_KEY alone does not authorize HTTP callers.

Warning: AGENTPHONE_ALLOW_ANONYMOUS=true opts into using the server's AGENTPHONE_API_KEY for requests with no Authorization header, only when OAuth is off. Anyone who can reach that endpoint can act as the account: only enable this behind your own authentication. Malformed headers are rejected, and a caller's supplied bearer is never replaced by the server key.

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"

Transport & hosting

The server ships two transports from one entry point (node dist/index.js):

  • stdio (default): bare npm start / npx agentphone-mcp runs the standard MCP stdio transport for local clients, using AGENTPHONE_API_KEY.

  • HTTP: set PORT (or pass --http, optionally with --port <n>) to run the Streamable HTTP server, reachable at /mcp. --port alone does not switch transports — --http or PORT selects HTTP. The HTTP layer is built on the mcp-use framework, which owns Streamable HTTP, the SSE stream, session management, and the OAuth discovery endpoints.

  • Hosted: https://mcp.agentphone.ai/mcp

  • Self-hosted HTTP: PORT=3000 npm start → http://localhost:3000/mcp

Authentication

  1. OAuth (recommended for end users): the framework proxies an Authorization Code + PKCE flow to the AgentPhone authorization server, so the client opens a browser to sign in at agentphone.ai — no key to paste. Enable it by setting MCP_OAUTH_CLIENT_ID (a client pre-registered with the AgentPhone AS). MCP_OAUTH_CLIENT_SECRET is optional: set it to run the gateway as a confidential client, or leave it unset to run as a public client (the gateway must then be registered with token_endpoint_auth_method=none). Public mode advertises none to downstream clients, which strict OAuth clients require.
  2. API key (scripts / single-tenant, OAuth off): each request sends Authorization: Bearer <your API key>. The server-side AGENTPHONE_API_KEY is only used for callers that send nothing, and only when AGENTPHONE_ALLOW_ANONYMOUS=true. Without that flag an unauthenticated call is rejected, so an exposed port cannot act as your account.

With OAuth enabled, bearer tokens are verified through the backend’s /auth/me; the anonymous opt-in does not bypass that verification.

The caller’s credential is forwarded to the AgentPhone REST API for validation. The optional anonymous mode instead uses the configured server API key.

Environment

VarPurpose
PORTHTTP port (default 3000)
AGENTPHONE_API_KEYFallback API key when OAuth is off. Only used for callers that send no Authorization header when AGENTPHONE_ALLOW_ANONYMOUS=true
AGENTPHONE_ALLOW_ANONYMOUSDefault off; ignored when OAuth is enabled. Set to true to let requests with no Authorization header act with the server's AGENTPHONE_API_KEY. Anyone who can reach the port then controls the account: put the server behind your own auth first
MCP_OAUTH_CLIENT_IDEnable OAuth; a gateway client pre-registered with the AgentPhone AS
MCP_OAUTH_CLIENT_SECRETOptional. Set = confidential gateway; unset = public client (gateway registered with token_endpoint_auth_method=none, advertises none downstream)
AGENTPHONE_BASE_URLAPI base (default https://api.agentphone.ai)
AGENTPHONE_OAUTH_AUTHORIZEOverride authorize/consent URL (default https://agentphone.ai/oauth/authorize)
AGENTPHONE_MCP_PUBLIC_URLPublic base URL this server is reached at, advertised in the /.well-known/mcp.json install manifest (e.g. https://mcp.agentphone.ai). If unset, it's derived from the request.

Support matrix

DimensionSupported
Transportsstdio (default) and Streamable HTTP (set PORT / --http)
Tested runtimeNode ^20.19.0 || >=22.12.0 (CI runs 20, 22, 24)
ClientsAny MCP client — verified with Cursor, Claude Desktop, Claude Code, Windsurf (stdio); Streamable-HTTP clients and remote agent platforms (HTTP)
Auth modesstdio: AGENTPHONE_API_KEY. HTTP: per-request bearer, OAuth (Authorization Code + PKCE), or anonymous server-key fallback (AGENTPHONE_ALLOW_ANONYMOUS=true, OAuth off)
ChannelsSMS and iMessage (send/receive); voice calls (webhook-driven or built-in AI)
Number typesUS and Canada numbers

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 number usage, message/call/webhook volume, and daily/monthly breakdowns

All Tools (32)

Account

ToolDescription
account_overviewGet a full snapshot of your account — agents, numbers, webhook, and usage
get_usageGet usage stats — number usage, billed SMS segments, and message/call/webhook volume. Use breakdown for daily or monthly time-series.

Phone Numbers

ToolDescription
list_numbersList all phone numbers in your account
buy_numberPurchase a new phone number with optional area_code and agent_id

SMS

ToolDescription
send_messageSend SMS, iMessage, or WhatsApp. Supports media, threaded replies (reply_to_message_id), iMessage effects (send_style), existing groups (to_number) or new groups (recipients), and WhatsApp interactive content (channel=whatsapp with buttons/list/cta/template)
check_capabilitiesCheck which channels a phone number can receive (iMessage / SMS / RCS) before sending
check_readinessCheck a number is ready before sending/calling: active + assigned + channel-capable are hard blockers; A2P/10DLC registration and recipient reachability are warnings. Returns ready, blockers, warnings, and next steps (credit/concurrency are enforced at send time, not pre-checkable)
get_messagesGet messages for a specific number. Page older history with cursor (from nextCursor); before/after are optional time filters.
list_conversationsList SMS conversations. Pass agent_id to filter by agent.
get_conversationGet a conversation with a bounded tail of recent messages
get_conversation_messagesPage through a conversation's full message history with cursor
update_conversationSet metadata on a conversation

Contacts

ToolDescription
list_contactsList saved contacts (address book). Filter with a search term.
manage_contactCreate, update, or delete a contact (set action)

Voice Calls

ToolDescription
list_callsList calls. Scope by agent_id or number_id, or filter the account-wide list by status/direction/search. Scope and filters can't be combined.
get_callGet call details and transcript
end_callEnd an in-progress call (safe to retry; ending a finished call is a no-op)
make_callPlace an outbound call (webhook-driven). Supports recording, variables, model tier, and call-screening controls
make_conversation_callPlace a call with built-in AI conversation — no webhook needed. Supports recording, variables, model tier, and call-screening controls

Agents

ToolDescription
list_agentsList all agents with their numbers and voice config
create_agentCreate an agent with voice, system prompt, call transfer, voicemail, and voice tuning (speed, interruption sensitivity, backchannel, language, and more)
update_agentUpdate an agent's configuration
delete_agentDelete an agent (numbers are kept but unassigned)
get_agentGet agent details including phone numbers and voice config
attach_numberAssign a phone number to an agent
detach_numberRemove a phone number from an agent
list_voicesList 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.

ToolDescription
get_webhookGet webhook configuration
set_webhookSet a webhook URL for inbound messages and call events
delete_webhookRemove a webhook
test_webhookSend a test event to verify your webhook works
list_webhook_deliveriesView delivery history for debugging

get_webhook and set_webhook mask signing secrets by default, for both scopes. Retrieve the secret from the dashboard when possible. Passing reveal_secret: true includes it in tool output, exposing it to model context, transcripts and client logs. This prevents accidental disclosure; it is not an authorization boundary against a model that deliberately requests the secret.

Environment Variables

VariableRequiredDescription
AGENTPHONE_API_KEYstdio: yes; HTTP anonymous mode: yesIn HTTP mode, used only with AGENTPHONE_ALLOW_ANONYMOUS=true, OAuth off, and no caller Authorization header
AGENTPHONE_ALLOW_ANONYMOUSNoExplicit HTTP server-key fallback; default off, ignored when OAuth is enabled. See the self-hosting warning above
AGENTPHONE_BASE_URLNoOverride the API base URL (defaults to https://api.agentphone.ai)
PORTNoPort for HTTP mode (defaults to 3000; set with PORT)

Development

bash
git clone https://github.com/AgentPhone-AI/agentphone-mcp.gitcd agentphone-mcpnpm installnpm run dev     # Run with tsx (hot reload)npm run build   # Compile TypeScriptnpm start       # Run compiled JS — stdio by default; set PORT (or pass --http) for the HTTP servernpm test        # Build + run the full test suite (both transports, output-schema contracts)

Release & deployment checks

CommandWhat it verifies
npm run check:releaseVersion is identical across package.json, server.json, and the built handshake (run in prepublishOnly).
npm run smoke:packRuns npm pack, installs the resulting tarball in a clean dir, and runs the 204 detach regression against that packed tarball (the same bytes npm publish would upload; run in prepublishOnly).
npm run check:contractFetches the live OpenAPI and asserts the endpoints/fields the tools depend on still exist (message cursors + item fields, call filters, outbound-call request/response fields the client uses, the detach endpoint, and the from_ sender field). Network-dependent, so it's not part of npm test — run before a release or as a non-blocking CI job. Override with OPENAPI_URL.
npm run canaryRead-only post-deploy canary: connects to MCP_CANARY_URL, checks the handshake and tool surface, and (with MCP_CANARY_TOKEN) runs one read-only tool. No mutations; skips cleanly when MCP_CANARY_URL is unset.

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

来源:README.md,提交 cd4cab8

工具

28

account_overview

Account Overview

Get a complete snapshot of your AgentPhone account: agents, phone numbers, webhook status, and usage limits.

无需输入参数。

list_numbers

List Phone Numbers

List all phone numbers in your account. Returns each number with its ID, status, country, and the agent it is assigned to (if any).

输入参数limitoffset

buy_number

Buy Phone Number

Purchase a new phone number. This is a paid purchase that charges the account's balance, and requires confirm=true to actually go through. Returns the purchased number's details: its phone number, ID, country, and status.

输入参数confirmcountryagent_idarea_code

send_message

Send Message

Send an SMS or iMessage from one of your agent's phone numbers, or react to an existing message. The tool has two modes, so which inputs are required depends on the mode: - Send: give a recipient (to_number) and a sender (agent_id, from_number, or number_id), plus body and/or media. The agent must have a phone number attached; number_id or from_number picks which one when it has several. - React: set reaction and react_to_message_id (iMessage only) to tapback or emoji-react to a message. Pass no send fields (recipient, sender, body/media, or send options); those are rejected. iMessage extras (ignored on SMS): reply_to_message_id threads a reply under an earlier message, and send_style adds an expressive screen/bubble effect. Returns the sent message (id, status, channel, from/to numbers), or the applied reaction.

输入参数bodyagent_idreactionmedia_urlnumber_idto_numbermedia_urlssend_stylefrom_numberreact_to_message_idreply_to_message_id

get_messages

Get Messages

Get SMS messages for a specific phone number, identified by its number ID. Returns a list of individual messages — each with its timestamp, sender, recipient, and text — rather than grouped conversation threads.

输入参数limitnumber_id必填

list_calls

List Calls

List recent calls. Scope by agent_id or number_id, or use status/direction/search to filter globally. When agent_id or number_id is passed, status/direction/search filters are not applied. Returns call summaries including each call's ID, direction, participants, and status.

输入参数limitoffsetsearchstatusagent_iddirectionnumber_id

get_call

Get Call

Get details and transcript for a specific call, identified by its call ID. Returns the call's direction, participants, status, timestamps, and full transcript. Pass wait=true to block until an in-progress call finishes before returning.

输入参数waitcall_id必填timeout

make_call

Make Call

Initiate an outbound, webhook-driven phone call where your backend handles the conversation logic. The agent must have a phone number attached and a webhook configured. This MCP connector prepends an automated-assistant disclosure to the greeting sent to the API; no tool argument disables that prefix. Calls made directly through the AgentPhone API or SDKs bypass this connector's disclosure logic. Returns the new call's ID, status, and the numbers it connects.

输入参数voiceagent_id必填to_number必填from_number_idinitial_greeting

make_conversation_call

Make AI Conversation Call

Place a phone call where the AI has an autonomous conversation about a given topic — scheduling, surveys, follow-ups, etc. No webhook setup needed. The agent must have a phone number attached. This MCP connector prepends an automated-assistant disclosure to the greeting sent to the API and adds AI identity instructions around the topic. No tool argument disables these additions, but they do not guarantee the model's behavior. Calls made directly through the AgentPhone API or SDKs bypass this connector's disclosure logic. By default (wait=true) this waits for the call to finish — up to max_wait_seconds — and returns the call with its transcript. If that wait elapses first, it returns the call while it may still be in progress (check later with get_call). With wait=false it returns immediately with the call's ID and status, and you fetch the transcript later with get_call.

输入参数waittopic必填voiceagent_id必填to_number必填from_number_idinitial_greetingmax_wait_seconds

list_agents

List Agents

List agents in your account (a single page, sized by limit). An agent is required before you can make calls — it owns phone numbers and handles voice/SMS. Returns each agent's ID, name, voice configuration, and attached phone numbers.

输入参数limit

create_agent

Create Agent

Create a new agent. An agent owns phone numbers and handles calls/SMS. A newly created agent has no phone number until one is attached. Set voice_mode to 'hosted' with a system_prompt for autonomous AI voice calls, or 'webhook' (default) to forward call transcripts to your webhook URL. Returns the created agent, including its new ID and full configuration.

输入参数name必填voicelanguagestt_modemodel_tiervoice_modedescriptionvoice_speedambient_soundbegin_messagesystem_promptdenoising_mode另有 6 个

update_agent

Update Agent

Update an agent's configuration — name, description, voice settings, instructions, greeting, call transfer, or voicemail. Only provided fields are updated; omitted fields keep their current value. Switching voice_mode to 'hosted' requires a system_prompt. Returns the agent's full configuration after the update.

输入参数namevoiceagent_id必填languagestt_modemodel_tiervoice_modedescriptionvoice_speedambient_soundbegin_messagesystem_prompt另有 7 个

delete_agent

Delete Agent

Delete an agent permanently. Phone numbers attached to it are kept but unassigned. This cannot be undone. Returns the deleted agent's name and ID as confirmation.

输入参数agent_id必填

get_agent

Get Agent

Get one agent's full configuration. Returns its voice settings, system prompt, model tier, transfer and voicemail setup, and the phone numbers attached to it.

输入参数agent_id必填

attach_number

Attach Number to Agent

Attach a phone number to an agent so the agent handles calls/SMS on that number. Takes an agent ID and a phone number ID. Returns the attached number and the agent it now belongs to.

输入参数agent_id必填number_id必填

detach_number

Detach Number from Agent

Detach a phone number from an agent. The number is kept in your account but becomes unassigned, and the agent stops handling calls and texts on it.

输入参数agent_id必填number_id必填

list_voices

List Voices

List the voices available for agents. Returns each voice's ID (used in an agent's voice field), name, provider, gender, and accent.

无需输入参数。

list_conversations

List Conversations

List SMS conversations. Optionally filter by agent_id to see conversations for a specific agent. Each conversation is a thread between your number and an external contact, with its ID, participant, message count, and last-message preview.

输入参数limitoffsetagent_id

get_conversation

Get Conversation

Get one SMS conversation with its message history (up to message_limit most recent messages), identified by its conversation ID. Returns the contact, your phone number, the message count, any stored metadata, and the messages.

输入参数message_limitconversation_id必填

update_conversation

Update Conversation

Set metadata on a conversation. Use this to store custom state, tags, or context that persists between messages. Pass null to clear metadata.

输入参数metadata必填conversation_id必填

list_contacts

List Contacts

List saved contacts (your address book). Returns each contact's name, phone number, email, and ID. Optionally filter with a search term that matches name or phone number.

输入参数limitoffsetsearch

manage_contact

Manage Contact

Create, update, or delete a saved contact. Set `action` to choose the operation. - create: requires phone_number and name - update: requires contact_id; only the fields you pass are changed - delete: requires contact_id (permanent) contact_id refers to a saved contact. Create and update return the saved contact (id, name, phone number, email, notes); delete returns a success flag.

输入参数nameemailnotesaction必填contact_idphone_number

get_usage

Get Usage

Get account usage statistics. By default returns a summary with number usage plus message, call, and webhook volume. Use breakdown='daily' or 'monthly' for time-series data.

输入参数daysmonthsbreakdown

get_webhook

Get Webhook

Get the webhook configuration — its URL, status, and signing secret. Pass agent_id to get an agent-specific webhook, or omit for the project-level default.

输入参数agent_idreveal_secret

set_webhook

Set Webhook

Set a webhook URL to receive inbound messages and call events. Pass agent_id to set a webhook for a specific agent (overrides project default). Omit agent_id to set the project-level webhook for all agents. The signing secret is masked by default. Prefer retrieving it from the dashboard; reveal_secret=true exposes it to model context, transcripts and client logs.

输入参数url必填timeoutagent_idcontext_limitreveal_secret

delete_webhook

Delete Webhook

Remove a webhook. Deleting an agent's webhook makes that agent fall back to the project-level webhook; deleting the project-level webhook stops events for agents using that default until you set one again (agents with their own webhook are unaffected). Pass agent_id to remove an agent's webhook, or omit it to remove the project-level webhook.

输入参数agent_id

test_webhook

Test Webhook

Send a test event to verify a webhook is working. Returns the HTTP status code and response time. Pass agent_id to test that agent's webhook. Omit to test the project-level webhook.

输入参数agent_id

list_webhook_deliveries

List Webhook Deliveries

View recent webhook delivery history. Shows which events were delivered, HTTP status codes, and timing. Pass agent_id to see deliveries for that agent's webhook. Omit for project-level.

输入参数hourslimitagent_id

版本历史

2
  1. v0.8.0最新Oct 21, 2026
  2. v0.6.0Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分