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

# MCP Server

> Connect to the Phonic MCP

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open
standard that allows AI assistants connect to external systems through a uniform
interface. Phonic's MCP server exposes the Phonic API as MCP tools, so a
client such as Claude Code, Codex, or Cursor can manage your agents,
conversations, voices, and projects.

> **Note**
>
> This page covers Phonic's **inbound** MCP server, where an MCP client connects
> to Phonic to drive the API. It is distinct from [MCP Tools](/docs/build/tools/mcp_tools),
> the **outbound** feature where a Phonic agent connects to your external MCP
> servers to call their tools during a conversation.

Phonic's MCP server stays up to date with the Phonic API — every endpoint is
exposed as an MCP tool. See the [API reference](/api-reference) for the full
list of resources and operations.

## Setup

Phonic's MCP server supports OAuth, so most clients just need the server URL
and will prompt you to sign in through your browser. If your client or
environment can't complete a browser sign-in, use an API key instead.

### Connect via OAuth

#### Claude Code

```bash
claude mcp add --transport http phonic https://mcp.phonic.ai/mcp
```

Then run `/mcp` in a Claude Code session and follow the prompt to
authenticate in your browser.

#### Codex

```bash
codex mcp add phonic --url https://mcp.phonic.ai/mcp
```

Or add it to `~/.codex/config.toml` by hand:

```toml
[mcp_servers.phonic]
url = "https://mcp.phonic.ai/mcp"
```

Then run `codex mcp login phonic` to authenticate in your browser.

#### Cursor

Add Phonic to your Cursor MCP configuration (`~/.cursor/mcp.json`, or
`.cursor/mcp.json` in your project):

```json
{
  "mcpServers": {
    "phonic": {
      "url": "https://mcp.phonic.ai/mcp"
    }
  }
}
```

Cursor will prompt you to sign in through your browser the first time it
connects.

#### Claude

1. Go to the [connectors page](https://claude.ai/new#settings/customize-connectors).
2. Click **Add custom connector** and enter `https://mcp.phonic.ai/mcp`.
3. Click **Connect** and sign in when your browser opens.

### Connect via API key

Create an API key on the [API keys page](https://phonic.ai/api-keys) and
provide it to your client as a bearer token. Each request runs with that
key's permissions, exactly as a REST call would.

> **Warning**
>
> Your API key carries full access to your workspace. Store it as a secret and
> never commit it or expose it to a browser.

#### Claude Code

```bash
claude mcp add --transport http phonic https://mcp.phonic.ai/mcp --header "Authorization: Bearer $PHONIC_API_KEY"
```

#### Codex

```bash
codex mcp add phonic --url https://mcp.phonic.ai/mcp --bearer-token-env-var PHONIC_API_KEY
```

Or add it to `~/.codex/config.toml` by hand:

```toml
[mcp_servers.phonic]
url = "https://mcp.phonic.ai/mcp"
bearer_token_env_var = "PHONIC_API_KEY"
```

Either way, `--bearer-token-env-var` takes the *name* of an environment
variable rather than the token itself, so export `PHONIC_API_KEY` in your
shell before starting Codex.

#### Cursor

Add Phonic to your Cursor MCP configuration (`~/.cursor/mcp.json`, or
`.cursor/mcp.json` in your project):

```json
{
  "mcpServers": {
    "phonic": {
      "url": "https://mcp.phonic.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_PHONIC_API_KEY"
      }
    }
  }
}
```

#### Claude

1. Go to the [connectors page](https://claude.ai/new#settings/customize-connectors).
2. Click **Add custom connector** and enter `https://mcp.phonic.ai/mcp`.
3. When prompted to authenticate, add an `Authorization` header set to
   `Bearer YOUR_PHONIC_API_KEY`.

## Example prompts

Once connected, ask Phonic:

* "Create an agent named `support-bot` and assign it a phone number."
* "List my last 10 conversations and summarize the ones flagged for follow-up."
* "Which voices are available, and what does the default agent use?"
* "Add a webhook tool to `support-bot` that posts to my orders endpoint."