AgentPhone MCP tool for ADK¶
The AgentPhone MCP Server connects your ADK agent to AgentPhone, a telephony platform built for AI agents. This integration gives your agent the ability to make and receive phone calls, send and receive SMS, manage phone numbers, and create autonomous AI voice agents using natural language.
Use cases¶
-
Autonomous Phone Calls: Have your agent call a phone number and hold a full AI-powered conversation about a specified topic, returning the complete transcript when done.
-
SMS Messaging: Send and receive text messages, manage conversation threads across multiple phone numbers, and retrieve message history.
-
Phone Number Management: Provision phone numbers with specific area codes, assign them to agents, and release them when no longer needed.
-
AI Voice Agents: Create agents with configurable voices and system prompts that autonomously handle inbound and outbound calls without requiring webhooks.
-
Webhook Integration: Set up project-level or per-agent webhooks to receive real-time notifications for inbound messages and call events.
Prerequisites¶
- Create an AgentPhone account
- Generate an API key from the AgentPhone Settings
Use with agent¶
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters
AGENTPHONE_API_KEY = "YOUR_AGENTPHONE_API_KEY"
root_agent = Agent(
model="gemini-2.5-pro",
name="agentphone_agent",
instruction="Help users make phone calls, send SMS, and manage phone numbers",
tools=[
McpToolset(
connection_params=StdioConnectionParams(
server_params=StdioServerParameters(
command="npx",
args=[
"-y",
"agentphone-mcp",
],
env={
"AGENTPHONE_API_KEY": AGENTPHONE_API_KEY,
}
),
timeout=30,
),
)
],
)
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
AGENTPHONE_API_KEY = "YOUR_AGENTPHONE_API_KEY"
root_agent = Agent(
model="gemini-2.5-pro",
name="agentphone_agent",
instruction="Help users make phone calls, send SMS, and manage phone numbers",
tools=[
McpToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://mcp.agentphone.to/mcp",
headers={
"Authorization": f"Bearer {AGENTPHONE_API_KEY}",
},
),
)
],
)
import { LlmAgent, MCPToolset } from "@google/adk";
const AGENTPHONE_API_KEY = "YOUR_AGENTPHONE_API_KEY";
const rootAgent = new LlmAgent({
model: "gemini-2.5-pro",
name: "agentphone_agent",
instruction: "Help users make phone calls, send SMS, and manage phone numbers",
tools: [
new MCPToolset({
type: "StdioConnectionParams",
serverParams: {
command: "npx",
args: ["-y", "agentphone-mcp"],
env: {
AGENTPHONE_API_KEY: AGENTPHONE_API_KEY,
},
},
}),
],
});
export { rootAgent };
import { LlmAgent, MCPToolset } from "@google/adk";
const AGENTPHONE_API_KEY = "YOUR_AGENTPHONE_API_KEY";
const rootAgent = new LlmAgent({
model: "gemini-2.5-pro",
name: "agentphone_agent",
instruction: "Help users make phone calls, send SMS, and manage phone numbers",
tools: [
new MCPToolset({
type: "StreamableHTTPConnectionParams",
url: "https://mcp.agentphone.to/mcp",
transportOptions: {
requestInit: {
headers: {
Authorization: `Bearer ${AGENTPHONE_API_KEY}`,
},
},
},
}),
],
});
export { rootAgent };
Available tools¶
Account¶
| Tool | Description |
|---|---|
account_overview |
Full snapshot of account: agents, numbers, webhook status, usage limits |
get_usage |
Detailed usage stats: plan limits, number quotas, message/call volume |
Phone numbers¶
| Tool | Description |
|---|---|
list_numbers |
List all phone numbers in account |
buy_number |
Purchase a new phone number with optional country and area code |
release_number |
Permanently release a phone number back to carrier pool |
SMS / Messages¶
| Tool | Description |
|---|---|
get_messages |
Get SMS messages for a specific phone number |
list_conversations |
List SMS conversation threads across all numbers |
get_conversation |
Get a specific conversation with full message history |
Voice calls¶
| Tool | Description |
|---|---|
list_calls |
List recent calls across all numbers |
list_calls_for_number |
List calls for a specific phone number |
get_call |
Get call details and transcript with optional long-polling |
make_call |
Place an outbound call using webhook for conversation handling |
make_conversation_call |
Place an autonomous AI call that returns the full transcript |
Agents¶
| Tool | Description |
|---|---|
list_agents |
List all agents with phone numbers and voice config |
create_agent |
Create a new agent with configurable voice and system prompt |
update_agent |
Update agent configuration |
delete_agent |
Delete an agent |
get_agent |
Get agent details including numbers and voice config |
attach_number |
Assign a phone number to an agent |
list_voices |
List available voice options |
Webhooks¶
| Tool | Description |
|---|---|
get_webhook |
Get project-level webhook configuration |
set_webhook |
Set project-level webhook for inbound messages and call events |
delete_webhook |
Remove project-level webhook |
get_agent_webhook |
Get webhook for a specific agent |
set_agent_webhook |
Set agent-specific webhook (overrides project-level) |
delete_agent_webhook |
Remove agent-specific webhook |
Configuration¶
The AgentPhone MCP server can be configured using environment variables:
| Variable | Description | Default |
|---|---|---|
AGENTPHONE_API_KEY |
Your AgentPhone API key | Required (stdio mode) |
AGENTPHONE_BASE_URL |
Override API base URL | https://api.agentphone.to |
For remote HTTP mode, pass the API key via the Authorization: Bearer header
instead of an environment variable.