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

# MCP

> Run cartesia-mcp with uvx to use Cartesia voices and TTS from MCP clients like Cursor and Claude Desktop.

The **`cartesia-mcp`** package exposes Cartesia through the **Model Context Protocol (MCP)** so MCP-capable clients—**Cursor**, **Claude Desktop**, **OpenAI Agents**, and similar—can list voices, run **TTS**, clone voices, infill audio, and more without custom scripts.

## Requirements

* **[uv](https://docs.astral.sh/uv/)** — runs the server via `uvx` with no global install
* **Python 3.13+** (installed automatically by `uvx`)
* A [Cartesia API key](https://play.cartesia.ai/keys)

## Setup

Add this to your MCP config. You only need your API key.

**Cursor** — `.cursor/mcp.json` in your project, or `~/.cursor/mcp.json` globally.

**Claude Desktop** — **Settings → Developer → Edit Config** (`claude_desktop_config.json`).

```json theme={null}
{
  "mcpServers": {
    "cartesia-mcp": {
      "command": "uvx",
      "args": ["cartesia-mcp"],
      "env": {
        "CARTESIA_API_KEY": "<your-api-key>"
      }
    }
  }
}
```

Restart the client (or refresh MCP in Cursor) and confirm **cartesia-mcp** is connected.

## Try it

Ask your agent things like:

* List all available Cartesia voices
* Convert text to audio with a chosen voice
* Localize an existing voice into another language
* Infill audio between two existing audio segments
* Change an audio file to use a different voice

## Tools

| Tool             | Description                                                     |
| ---------------- | --------------------------------------------------------------- |
| `text_to_speech` | Convert text to audio with a chosen voice and model             |
| `list_voices`    | List available voices (optionally filter by language or gender) |
| `get_voice`      | Fetch metadata for a voice by ID                                |
| `clone_voice`    | Clone a voice from an audio sample                              |
| `update_voice`   | Update a cloned voice's name or description                     |
| `delete_voice`   | Delete a cloned voice                                           |
| `infill`         | Generate audio between two existing audio segments              |
| `voice_change`   | Re-render audio with a different voice                          |
| `localize_voice` | Adapt a voice to another language or dialect                    |

<AccordionGroup>
  <Accordion title="Advanced configuration">
    ### Output directory

    By default, generated audio is written to the server's working directory. To choose a fixed folder, add `OUTPUT_DIRECTORY` to `env`:

    ```json theme={null}
    "env": {
      "CARTESIA_API_KEY": "<your-api-key>",
      "OUTPUT_DIRECTORY": "~/cartesia-output"
    }
    ```

    ### Local audio files

    Tools like `infill` and `voice_change` need paths to existing audio files on disk. Pass the full path to each file when prompting your agent.
  </Accordion>
</AccordionGroup>

<Card title="cartesia-mcp" icon="github" href="https://github.com/cartesia-ai/cartesia-mcp">
  The official Cartesia MCP Server
</Card>
