MCP server that gives Claude, Cursor and other AI agents a voice: generate voiceovers, multi-speaker dialogue and SRT/VTT subtitles with the Miragea API.
pip install miragea-voice-mcp Copy PIP instructions
Miragea Voice MCP is an open-source Model Context Protocol server that lets AI agents such as Claude Desktop, Claude Code, Cursor, VS Code and Windsurf create voiceovers and subtitles. Ask your agent to narrate a script, voice a multi-speaker dialogue, clone a voice from a short sample URL, or subtitle an existing video. The server saves real audio files (MP3, WAV, FLAC, Opus, AAC) and matching SRT/VTT subtitle files to disk and returns their paths. Speech is generated by the Miragea voice API. Setup is one uvx line and one API key.
You: Narrate intro.md as a voiceover for my YouTube video, with subtitles. Claude: Done. Saved ~/miragea-voice/intro.mp3, intro.srt and intro.vtt, and reported the duration and credits used. Contents How it works Why this server Quick start Client setup: Claude Desktop · Claude Code · Cursor · VS Code · Windsurf Tools Configuration Writing multi-speaker scripts How subtitles are timed Credits and cost control Comparison with other TTS MCP servers FAQ Troubleshooting Development How it works
Your MCP client starts miragea-voice-mcp locally over stdio. When the agent calls a tool, the server sends the request to the Miragea API, waits for the result, writes the audio and subtitle files to disk, and returns their absolute paths to the agent.
Most text-to-speech MCP servers just play a sound or return a link. Making video, podcast or course content needs more than that:
{ "mcpServers": { "miragea-voice": { "command": "uvx", "args": ["miragea-voice-mcp"], "env": { "MIRAGEA_API_KEY": " " } } } } Restart the client and try: "List my Miragea voices, then read this paragraph in the warmest one and give me SRT subtitles."
MIRAGEA_API_KEY=... uvx miragea-voice-mcp doctor
uvx miragea-voice-mcp config prints a ready-to-paste snippet for claude-desktop, cursor, claude-code, vscode or windsurf.
Settings → Developer → Edit Config (claude_desktop_config.json), add the mcpServers block from Quick start, and restart Claude Desktop.
claude mcp add miragea-voice -e MIRAGEA_API_KEY= -- uvx miragea-voice-mcp Voicing long scripts can take a few minutes. To raise Claude Code's tool timeout, start it with MCP_TOOL_TIMEOUT=600000 claude.
Add this to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{ "servers": { "miragea-voice": { "type": "stdio", "command": "uvx", "args": ["miragea-voice-mcp"], "env": { "MIRAGEA_API_KEY": " " } } } } Windsurf and other MCP clients Any client that can launch a stdio server works. Use command uvx, args ["miragea-voice-mcp"], and set MIRAGEA_API_KEY in the environment. If you'd rather not use uvx:
pip install miragea-voice-mcp miragea-voice-mcp # or: python -m miragea_voice_mcp Tools Tool What it does Spends credits text_to_speech Text of any length → audio file + SRT/VTT subtitles Yes generate_dialogue Speaker: line script → one joined audio file, per-line WAVs, speaker-labelled subtitles Yes transcribe_to_subtitles Local audio/video → SRT, VTT, TXT, JSON next to the media Yes (per second) list_voices Voices saved in your Miragea account (name, actor_id, language) No get_capabilities Models, emotion/style tags, formats, speed range, limits, pricing No estimate_cost Estimated credits for a text before you generate it No check_task Resume a long task by task_id and save its result No list_recent_tasks Recent tasks with status and credits used No text_to_speech Parameter Default Notes text (required) Any length; split automatically past the per-request limit voice MIRAGEA_DEFAULT_VOICE Saved voice name or actor_id, or a public https:// URL of a clean 5–30 s speech sample (zero-shot cloning) model standard standard stays closest to the voice (×1). expressive is more emotive (×1 with reference_text, ×3 without when cloning from a URL) format mp3 mp3, wav, flac, opus, aac, pcm; also inferred from output_path speed 1.0 0.25–4 tags none Emotion/style labels from get_capabilities (not billed as text) reference_text none Exact transcript of the URL sample. Better quality, and cheaper on expressive language none Language hint for the reference sample output_path auto Absolute, or relative to MIRAGEA_OUTPUT_DIR; never overwrites subtitles ["srt","vtt"] Any of srt, vtt, txt, json; [] for none max_credits none Refuse to run if the estimate is higher fresh false Force a new take of identical input Example result:
{ "status": "succeeded", "audio_path": "/Users/you/miragea-voice/welcome-to-the-show-20261108-101500.mp3", "subtitle_paths": { "srt": "/Users/you/miragea-voice/welcome-to-the-show-20261108-101500.srt", "vtt": "/Users/you/miragea-voice/welcome-to-the-show-20261108-101500.vtt" }, "duration_seconds": 6.84, "voice": "Ava", "model": "standard", "format": "mp3", "task_ids": ["3f2c..."], "credits_used": 14, "subtitle_timing": "estimated from measured audio duration (sentence-level)", "notes": [] } generate_dialogue Parameter Default Notes script (required) See script format voices (required unless a default voice is set) {"Ava": "Ava", "Narrator": "https://.../narrator.wav"} (speaker names are case-insensitive) gap_seconds 0.35 Silence between lines speaker_labels true Ava: … in SRT/TXT and voice spans in VTT model, format, speed, output_path, subtitles, max_credits, fresh Same as text_to_speech The result includes each line's exact start/end in the final file, the joined audio path, and a segments_dir with one WAV per line.
All configuration is through environment variables in your client's env block. Only the API key is required.
Narrator: Welcome to Two Minute Tech. Ava: Today's idea: the Model Context Protocol. Leo: Wait, is that the thing that lets Claude use tools? [pause 600ms] Ava: Exactly. And this line has no speaker, so Ava keeps talking. One utterance per line: Speaker: text. Lines with no speaker continue the previous speaker. Before the first speaker appears, they belong to Narrator. [pause 1.5s], [pause 800ms] or [pause 2] adds silence after the previous line. See examples/podcast-script.txt. Lines are synthesized one by one as WAV and joined in pure Python, so no extra software is needed. If ffmpeg is installed, the joined file is converted to the format you asked for. Without it you get a WAV, and the result says so.
Text-to-speech engines return audio without word timestamps. This server times subtitles in three ways:
Generation uses your Miragea account's credits. Live rates come from get_capabilities. At the time of writing:
This comparison is based on each project's public README as of November 2026. "Not documented" means we couldn't find it, not that it's impossible. Corrections are welcome as PRs.
Where others are stronger: ElevenLabs' tool set is much broader (sound effects, voice design, agents, music). Local engines are free and work offline. FreeTTS lists thousands of stock voices and needs no install. Pick Miragea Voice MCP when you want production files with subtitles, multi-speaker scripts and predictable cost, from any OS, without a GPU.
How do I add text-to-speech to Claude Desktop? Add the miragea-voice block from Quick start to claude_desktop_config.json with your Miragea API key and restart Claude. Then ask Claude to read any text aloud into a file.
How can Claude Code or Cursor generate a voiceover for my video? Install this server (see Client setup) and ask, for example: "Write a 30-second voiceover for this product demo, generate it with my 'Narrator' voice, and save it to ./assets/vo.mp3 with subtitles." The agent gets back the file paths and can drop them into your project.
How do I generate SRT subtitles from text with AI? text_to_speech writes .srt and .vtt next to every voiceover by default, timed to the generated audio. For a video you already have, use transcribe_to_subtitles.
How do I make a multi-speaker podcast or dialogue with AI voices? Write the script as Speaker: line and call generate_dialogue with one voice per speaker. You get a single audio file, a WAV per line and speaker-labelled subtitles.
Can I clone a voice with an MCP server? Yes. Pass a public https:// link to a clean 5–30 second speech sample as voice. Adding its exact transcript as reference_text improves quality and lowers the cost on the expressive model. You can also save voices in your Miragea account and use them by name. Only clone voices you have the right to use.
Is Miragea Voice MCP free? The server is free and MIT-licensed. Speech generation uses credits from your Miragea account. Free accounts can call the API by default, and estimate_cost tells you the price before you generate.
Where are the audio files saved? In ~/miragea-voice by default. Change it with MIRAGEA_OUTPUT_DIR or pass output_path per call. Files are never overwritten: a -2, -3… suffix is added instead.
Does it work offline? No. Speech is generated by the Miragea API, so you need an internet connection.
What languages and emotions are supported? Whatever your Miragea account offers. get_capabilities lists the live models and emotion/style tags, and list_voices shows each saved voice's language.
What if a long job times out in my client? The task keeps running on Miragea. Call check_task with the returned task_id, or simply repeat the same request: the idempotency key returns the original task, so you aren't charged twice.
git clone https://codeberg.org/miragea-voice/miragea-voice-mcp cd miragea-voice-mcp uv venv && uv pip install -e ".[dev]" uv run pytest # tests use a mocked API: no key, no network, no credits uv run ruff check src tests npx @modelcontextprotocol/inspector uv run miragea-voice-mcp # poke at the tools Project layout:
src/miragea_voice_mcp/ server.py MCP tools (works with mcp 1.x FastMCP and mcp 2.x MCPServer) service.py tool logic: voices, chunking, dialogue, transcription, files client.py Miragea HTTP client: auth, polling, idempotency, downloads subtitles.py cue splitting, timing, SRT/VTT/TXT writers audio.py duration probing, WAV joining, optional ffmpeg transcode script.py multi-speaker script parser cli.py `doctor` and `config` commands Contributions are welcome: open an issue first for larger changes.
MIT. The voice engine is the Miragea API, which has its own terms of service.
ai-agents ai-voice claude claude-code claude-desktop cursor dubbing mcp mcp-server miragea model-context-protocol podcast speech-to-text srt subtitles text-to-speech transcription tts voice-cloning voiceover webvtt
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




