Connect Your AI Agent

Add phone calls, SMS, and iMessage to your AI agent. One config block and your agent can buy numbers, make calls, read texts, and manage voice agents — all through natural language.

AgentPhone ships an MCP server that works with any MCP-compatible client: Claude Code, Cursor, Windsurf, Claude Desktop, OpenClaw, Hermes, GBrain, and more. Quickstarts for each are below. The config block is the same everywhere — only where you put it changes.

Claude Code

Option A: MCP Server

$claude mcp add agentphone -- npx -y agentphone-mcp

Then set your API key:

$export AGENTPHONE_API_KEY=your_api_key_here

Option B: Skill (slash command)

$npx skills add AgentPhone-AI/skills
$export AGENTPHONE_API_KEY=your_api_key_here

Then use /agentphone in any conversation:

/agentphone buy a 415 number and create a support agent
/agentphone call +14155551234 and ask about their hours
/agentphone show me my recent SMS conversations

The MCP server exposes the full set of phone tools your agent can call autonomously. The skill wraps the same tools behind a /agentphone command. Pick whichever style you prefer.

Cursor

Add to your Cursor MCP settings (Settings > MCP or ~/.cursor/mcp.json):

~/.cursor/mcp.json
1{
2 "mcpServers": {
3 "agentphone": {
4 "command": "npx",
5 "args": ["-y", "agentphone-mcp"],
6 "env": {
7 "AGENTPHONE_API_KEY": "your_api_key_here"
8 }
9 }
10 }
11}

Restart Cursor. In Composer or Chat, try:

“Create an agent and buy it a phone number, then call me at +14155551234 to test it.”

Windsurf

Add the same block to your Windsurf MCP configuration:

MCP config
1{
2 "mcpServers": {
3 "agentphone": {
4 "command": "npx",
5 "args": ["-y", "agentphone-mcp"],
6 "env": {
7 "AGENTPHONE_API_KEY": "your_api_key_here"
8 }
9 }
10 }
11}

Claude Desktop

Add to your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

claude_desktop_config.json
1{
2 "mcpServers": {
3 "agentphone": {
4 "command": "npx",
5 "args": ["-y", "agentphone-mcp"],
6 "env": {
7 "AGENTPHONE_API_KEY": "your_api_key_here"
8 }
9 }
10 }
11}

OpenClaw

OpenClaw supports MCP servers natively. Add the block to your OpenClaw MCP configuration:

MCP config
1{
2 "mcpServers": {
3 "agentphone": {
4 "command": "npx",
5 "args": ["-y", "agentphone-mcp"],
6 "env": {
7 "AGENTPHONE_API_KEY": "your_api_key_here"
8 }
9 }
10 }
11}

“Buy me a US number and create a voice agent that answers calls as my personal assistant, then call +14155551234 to test it.”

Hermes

Hermes reads MCP servers from its config.yaml:

config.yaml
1mcp:
2 servers:
3 agentphone:
4 command: npx
5 args: ["-y", "agentphone-mcp"]
6 env:
7 AGENTPHONE_API_KEY: your_api_key_here

Restart Hermes, then:

“Buy a number and create a voice agent, then call +14155551234 and schedule a dentist appointment for Thursday.”

GBrain

GBrain is MCP-native — add AgentPhone alongside your brain so the agent has both context and a phone:

MCP config
1{
2 "mcpServers": {
3 "gbrain": {
4 "command": "npx",
5 "args": ["-y", "gbrain-mcp"],
6 "env": { "GBRAIN_DIR": "/path/to/your/brain" }
7 },
8 "agentphone": {
9 "command": "npx",
10 "args": ["-y", "agentphone-mcp"],
11 "env": {
12 "AGENTPHONE_API_KEY": "your_api_key_here"
13 }
14 }
15 }
16}

“Create a voice agent called Brain that greets callers warmly, buy it a 415 number, then call me at +14155551234.”

Handling inbound calls & texts

The MCP server is perfect for agent-initiated actions (buying numbers, making calls, sending texts). To have your agent respond to inbound calls and messages in real time, point an AgentPhone webhook at your server — every inbound message and call transcript is delivered as an event. See the Webhooks guide.

What your agent can do

Once configured, your agent has the full AgentPhone toolset:

CategoryToolsExample prompt
Phone numbersBuy, list, release”Buy a US number with area code 212”
Voice callsMake calls, list calls, get transcripts”Call +1234567890 and ask about their return policy”
SMS & iMessageSend, read messages, list conversations”Show me texts from the 415 number”
AgentsCreate, update, configure voice”Create a support agent with a friendly greeting”
ContactsSave, look up, update”Save this number as Jane Doe”
WebhooksSet up, manage per-agent routing”Set my webhook to https://my-server.com/hook

Real-world examples

Customer research from your IDE

> Create an agent, buy it a number, then call these 5 restaurants
and ask if they have availability for 8 people this Saturday:
+14155551111, +14155552222, +14155553333, +14155554444, +14155555555
Summarize what you find.

Test your app’s phone integration

> I just deployed a new IVR. Call +14155559999 and navigate through
the menu — press 1 for sales, then ask about enterprise pricing.
Tell me if anything sounds broken.

Set up a phone agent for your project

> Read my project's README and create a voice agent that can answer
questions about this codebase. Give it a phone number and set the
greeting to "Hi, I'm the docs bot for [project name]."

Get your API key

Sign up at agentphone.ai and grab your key from Settings. No Twilio account, no server, no ngrok needed.