> ## Documentation Index
> Fetch the complete documentation index at: https://docs.audiopod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect any agent to AudioPod via Model Context Protocol — music generation, TTS, voice cloning, transcription, and more from one endpoint.

<Info>
  **What is MCP?** [Model Context Protocol](https://modelcontextprotocol.io) is an open standard that lets AI assistants (Claude Desktop, Cursor, Continue, Cline, Goose, Codex…) call external tools through a single transport. AudioPod publishes a Streamable-HTTP MCP server that exposes ten audio AI tools.
</Info>

## Endpoint

| Field     | Value                                                                                                                                                                                               |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL       | `https://mcp.audiopod.ai`                                                                                                                                                                           |
| Transport | `streamable-http` (MCP 2025-06-18)                                                                                                                                                                  |
| Auth      | `X-API-Key: ap_*` (from your dashboard) **or** `Authorization: Bearer <jwt>`                                                                                                                        |
| Discovery | [`/.well-known/mcp/server-card.json`](https://audiopod.ai/.well-known/mcp/server-card.json) and [`/.well-known/oauth-protected-resource`](https://audiopod.ai/.well-known/oauth-protected-resource) |

Need a key? [Create one in your dashboard](https://www.audiopod.ai/dashboard/account/api-keys). Free tier credits unlock the full tool surface — no card required.

***

## Tools exposed

The server advertises ten tools. Schemas are returned by `tools/list` — these are the names and one-liners:

| Tool                | Description                                                                                                               | Required scope     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `generate_music`    | Songs, instrumentals, rap, vocal stems from a text prompt.                                                                | `music:generate`   |
| `text_to_speech`    | TTS in 85+ languages with 500+ voices and custom clones.                                                                  | `voice:synthesize` |
| `clone_voice`       | Clone a voice from a 5–30s reference clip.                                                                                | `voice:clone`      |
| `separate_stems`    | Up to 16 stems (vocals, drums, bass, guitar, piano, other…). Two-stem mode returns a vocals/instrumental (karaoke) split. | `stems:separate`   |
| `transcribe_audio`  | Word-level timestamps, speaker diarization, SRT/VTT/JSON.                                                                 | `transcribe`       |
| `denoise_audio`     | Remove background noise while preserving voice character.                                                                 | `audio:write`      |
| `convert_media`     | MP3 / WAV / FLAC / OGG / M4A / MP4 / MOV conversion.                                                                      | `audio:write`      |
| `separate_speakers` | Isolate each speaker into a separate track from multi-speaker audio.                                                      | `audio:write`      |
| `change_voice`      | Convert a recording to a different target voice (voice-to-voice).                                                         | `voice:synthesize` |
| `check_job_status`  | Poll the status and result of a long-running job.                                                                         | *none (free)*      |

Scopes are enforced when authenticating with an API key. JWT-based auth implies full user privileges.

***

## Setup

### One-line install (recommended)

Most modern MCP hosts now register an HTTP MCP server with a single command — no manual JSON edit, no restart needed beyond the host's normal config reload. Pick the one that matches your tool:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http audiopod https://mcp.audiopod.ai \
      --header "X-API-Key: ap_YOUR_KEY" --scope user
    ```

    The `--scope user` flag installs at the user level so every Claude Code project picks up the server. Run `claude mcp list` to verify, then `/mcp` inside the TUI to see the ten tools.
  </Tab>

  <Tab title="Codex CLI">
    ```bash theme={null}
    codex mcp add audiopod --url https://mcp.audiopod.ai \
      --header "X-API-Key: ap_YOUR_KEY"
    ```

    Verify with `codex mcp list`. Inside the Codex TUI, `/mcp` shows the connected servers and their tools.
  </Tab>

  <Tab title="Universal (mcp-remote)">
    For any MCP client that only speaks stdio (older Claude Desktop builds, Continue, Cline before they ship native HTTP support, etc.), the [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge spawns a stdio process that proxies to our HTTP endpoint:

    ```bash theme={null}
    npx -y mcp-remote https://mcp.audiopod.ai \
      --header "X-API-Key: ap_YOUR_KEY"
    ```

    Wire it in as a stdio server in your client's config. Useful when manual JSON is too fiddly.
  </Tab>
</Tabs>

### Manual config (for desktop apps without a CLI)

<Tabs>
  <Tab title="Claude Desktop">
    Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

    ```json theme={null}
    {
      "mcpServers": {
        "audiopod": {
          "url": "https://mcp.audiopod.ai",
          "headers": {
            "X-API-Key": "ap_YOUR_KEY"
          }
        }
      }
    }
    ```

    Restart Claude Desktop. Try: *"Generate a 30-second lo-fi instrumental for studying."*
  </Tab>

  <Tab title="Cursor">
    Edit `~/.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "audiopod": {
          "url": "https://mcp.audiopod.ai",
          "headers": { "X-API-Key": "ap_YOUR_KEY" }
        }
      }
    }
    ```

    Reload Cursor. Try: *"Use audiopod to generate a 60s upbeat intro track and download it."*
  </Tab>

  <Tab title="Continue">
    Edit `~/.continue/config.json`:

    ```json theme={null}
    {
      "experimental": {
        "modelContextProtocolServers": [
          {
            "transport": {
              "type": "streamable-http",
              "url": "https://mcp.audiopod.ai",
              "headers": { "X-API-Key": "ap_YOUR_KEY" }
            }
          }
        ]
      }
    }
    ```
  </Tab>

  <Tab title="Cline">
    Edit `~/.config/cline/cline_mcp_settings.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "audiopod": {
          "url": "https://mcp.audiopod.ai",
          "transport": "streamable-http",
          "headers": { "X-API-Key": "ap_YOUR_KEY" }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Goose">
    Run `goose configure` and add a Streamable-HTTP extension:

    ```
    Type:   streamable-http
    URL:    https://mcp.audiopod.ai
    Header: X-API-Key=ap_YOUR_KEY
    ```
  </Tab>

  <Tab title="cURL">
    Probe the server directly to confirm your key works:

    ```bash theme={null}
    curl https://mcp.audiopod.ai \
      -H "X-API-Key: ap_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/list"
      }'
    ```
  </Tab>
</Tabs>

***

## JSON-RPC examples

### Initialize

```json theme={null}
POST https://mcp.audiopod.ai
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-06-18",
    "clientInfo": { "name": "my-agent", "version": "0.1.0" }
  }
}
```

### List tools

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list"
}
```

### Call a tool

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "generate_music",
    "arguments": {
      "prompt": "lo-fi rainy 90 BPM, soft pads",
      "duration": 60,
      "task_type": "text2music"
    }
  }
}
```

The response includes a `structuredContent.job_id` — long-running tools return a job id immediately. Poll the matching `/api/v1/<service>/jobs/<id>` endpoint, or call `tools/call` again with the `jobs` lookup tool wired into your CLI.

***

## Auth flow

AudioPod publishes RFC 9728 OAuth Protected Resource Metadata so clients can discover how to authenticate:

```bash theme={null}
curl https://audiopod.ai/.well-known/oauth-protected-resource
```

Returns the issuer, supported scopes, and the bearer-token pattern. Most agent clients use a simple `X-API-Key: ap_*` header — get your key in the [dashboard](https://www.audiopod.ai/dashboard/account/api-keys).

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Tools don't appear in my client">
    1. Re-check your config file path — most agents won't reload after edits without a restart.
    2. Confirm the URL is exactly `https://mcp.audiopod.ai` (no trailing slash, no `/sse`).
    3. Hit the discovery URL: `curl https://mcp.audiopod.ai` returns a small JSON descriptor when the proxy is healthy.
  </Accordion>

  <Accordion title="401 Unauthorized">
    * Verify your key starts with `ap_`.
    * Check the key's scopes — the [dashboard](https://www.audiopod.ai/dashboard/account/api-keys) shows the per-tool scopes granted.
    * For wildcard access use scope `*`.
  </Accordion>

  <Accordion title="Tool calls hang">
    Music and stem extraction return job ids immediately and resolve over the next 30–180 seconds. Most clients display the partial result; if yours doesn't, fall back to the [REST API](/api-reference/music/jobs) to poll for completion.
  </Accordion>
</AccordionGroup>

***

## Next steps

<Columns cols={2}>
  <Card title="Use the CLI" icon="terminal" href="/sdks/cli">
    Same ten tools, terminal-first.
  </Card>

  <Card title="For Agents landing" icon="robot" href="https://audiopod.ai/for-agents">
    Single-pane overview of every developer surface.
  </Card>

  <Card title="Get an API key" icon="key" href="https://www.audiopod.ai/dashboard/account/api-keys">
    Free credits, no card required.
  </Card>

  <Card title="Read the spec" icon="book" href="https://modelcontextprotocol.io">
    Model Context Protocol reference.
  </Card>
</Columns>
