Cartesia MCP Server for Voice Infill & TTS
Localize speech, convert text to audio, and infill voice clips using the Cartesia MCP server for seamless TTS and API integrations.
npx -y @cartesia-ai/cartesia-mcpOverview
Cartesia MCP Server implements the Model Context Protocol (MCP) adapter that lets local agents and desktop assistants (for example Claude Desktop, Cursor, and other MCP-capable clients) call Cartesia’s audio models. Use the server to convert text to speech (TTS), localize existing speech into another language/voice, infill missing audio between clips, and otherwise manage voice transformations using Cartesia’s API while keeping tooling local and agent-friendly.
This server is intended for developers who want an easy, MCP-compatible bridge to Cartesia from an agent or IDE environment. It runs as an executable exposed to your MCP client, takes an API key for Cartesia, and accepts commands and file paths so downstream agents can request audio operations programmatically.
Features
- Text-to-speech (TTS) using Cartesia voices
- Voice localization: convert speech from one language/voice to another
- Audio infill: generate audio to fill gaps between two clips
- Voice replacement: transform an existing audio clip to use a different voice
- MCP-compatible: integrates with Claude Desktop, Cursor, and other MCP clients
- Local file output support with configurable output directory
Installation / Configuration
Install the package from PyPI and verify the executable path:
Create a Cartesia account and API key at https://play.cartesia.ai/sign-in. There is a free tier and you can create a key under API Keys → New.
Environment variables and configuration:
# Required environment variable:
# Optional: where generated audio files will be saved
Typical environment/config keys:
| Key | Required | Description |
|---|---|---|
| CARTESIA_API_KEY | Yes | Your Cartesia API key for server requests |
| OUTPUT_DIRECTORY | No | Local folder to store generated audio files (defaults to working directory) |
Claude Desktop Integration
Edit Claude Desktop’s configuration file (Settings → Developer → Edit Config) and add an MCP server entry that points to the cartesia-mcp executable:
Notes:
- Use the absolute path returned by
which cartesia-mcp. - Configure OUTPUT_DIRECTORY if you want all outputs in a specific folder.
- When invoking infill or localization from Claude, provide absolute file paths to existing audio files.
Cursor Integration
Create either a project-level file .cursor/mcp.json or a global ~/.cursor/mcp.json:
Cursor will then present the Cartesia tools to your workspace for agent workflows.
Available Tools / Resources
The MCP server exposes a set of tools (actions) that MCP clients can call. Typical tool names and capabilities you will see in the MCP interface:
- list_voices — return available Cartesia voices and metadata
- text_to_speech — synthesize audio from a text prompt and voice selection
- localize_speech — translate/convert an audio file into another language/voice
- infill_audio — generate audio between two clips, given start/end audio
- change_voice — re-render an existing clip in a different voice
Refer to the GitHub repository for the definitive list and current behavior: https://github.com/cartesia-ai/cartesia-mcp
Use Cases (Concrete Examples)
Text-to-Speech (from Claude or Cursor)
- Ask your agent: “Convert ‘Welcome to our app’ to audio using voice ‘amy’.” The agent will call text_to_speech and return a saved audio file path (e.g., /Users/you/cartesia-output/welcome_amy.wav).
Localize speech to another language
- Provide an existing clip path and request localization: “Localize
/tmp/input_en.wavto Spanish using voice ‘sofia’.” The tool runs localize_speech and returns the output file path and metadata (language confidence, duration).
- Provide an existing clip path and request localization: “Localize
Infill missing audio between clips
- You have two clips,
start.wavandend.wav. Ask the agent: “Create a smooth infill between these two files.” Provide absolute paths and a target voice. The server will call infill_audio and produce a new audio file containing the generated segment.
- You have two clips,
Replace voice on an existing clip
- Request: “Render
/tmp/announcement.wavusing voice ‘omar’.” This uses change_voice to create a voice-transformed copy.
- Request: “Render
Tips:
- Always use absolute file paths when calling localize, infill, or change_voice so the MCP server can access files.
- Inspect the output directory for generated assets; filenames usually include the operation and voice for clarity.
Troubleshooting & Next Steps
- If the executable is not found, ensure your Python environment’s bin directory is on PATH or use the absolute path in the MCP config.
- For permission errors, confirm the OUTPUT_DIRECTORY exists and is writable by the user running the MCP client.
- For feature updates or issues, open an issue or review examples in the repository: https://github.com/cartesia-ai/cartesia-mcp
This MCP server streamlines integrating Cartesia audio capabilities into agent-driven workflows, enabling programmatic TTS, localization, and intelligent audio editing directly from desktop agents and developer tools.