> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentphone.to/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentphone.to/_mcp/server.

# Google ADK

> Give your Google ADK agent phone numbers, voice calls, and SMS with AgentPhone

Give your [Google ADK](https://google.github.io/adk-docs/) agent a real phone number. Make calls, receive calls, send and read SMS — all through the AgentPhone MCP server.

> **Info**
>
> Get your API key from [Settings](https://agentphone.ai/settings), install `google-adk` for Python or `@google/adk` for TypeScript, and configure credentials for your chosen model. The local transport also needs Node and `npx`. MCP actions and hosted voice do not need your own webhook server; real-time custom inbound handling does.

## Setup

ADK supports MCP servers natively. Choose between running the server locally or connecting to the hosted remote endpoint.

#### Python

#### Local MCP Server

```python
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,
            ),
        )
    ],
)
```

#### Remote MCP Server

```python
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.ai/mcp",
                headers={
                    "Authorization": f"Bearer {AGENTPHONE_API_KEY}",
                },
            ),
        )
    ],
)
```

#### TypeScript

#### Local MCP Server

```typescript
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 };
```

#### Remote MCP Server

```typescript
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.ai/mcp",
      transportOptions: {
        requestInit: {
          headers: {
            Authorization: `Bearer ${AGENTPHONE_API_KEY}`,
          },
        },
      },
    }),
  ],
});

export { rootAgent };
```

## Use cases

* **Autonomous phone calls** — have your agent call a number and hold a full AI conversation about a topic, then retrieve the transcript after the call ends
* **SMS messaging** — send and receive texts, manage conversation threads across multiple numbers
* **Phone number management** — provision numbers with specific area codes, assign them to agents
* **AI voice agents** — create agents with configurable voices, system prompts, and model tiers that handle calls autonomously
* **Call transfer and voicemail** — configure agents to transfer calls to a human and set up voicemail greetings
* **Webhook integration** — set up the account webhook for real-time events; configure per-agent overrides through the API

## What your agent can do

Once connected, inspect tool discovery for your server version. The MCP 0.8.0 source exposes 28 tools:

| Category          | Tools                                                                                                                       |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Account**       | `account_overview`, `get_usage`                                                                                             |
| **Phone numbers** | `list_numbers`, `buy_number`                                                                                                |
| **SMS**           | `send_message`, `get_messages`, `list_conversations`, `get_conversation`, `update_conversation`                             |
| **Voice calls**   | `list_calls`, `get_call`, `make_call`, `make_conversation_call`                                                             |
| **Agents**        | `list_agents`, `create_agent`, `update_agent`, `delete_agent`, `get_agent`, `attach_number`, `detach_number`, `list_voices` |
| **Contacts**      | `list_contacts`, `manage_contact`                                                                                           |
| **Webhooks**      | `get_webhook`, `set_webhook`, `delete_webhook`, `test_webhook`, `list_webhook_deliveries`                                   |

## Resources

* [Full integration guide on ADK docs](https://adk.dev/integrations/agentphone/)
* [AgentPhone MCP Server on GitHub](https://github.com/AgentPhone-AI/agentphone-mcp)
* [agentphone-mcp on npm](https://www.npmjs.com/package/agentphone-mcp)
* [API Reference](/api-reference)