
TTS MCP Server
io.github.RTY2345RR由 GitHub 帳號 RTY2345RR 發布v0.1.1更新於 Nov 8, 2026
Text-to-speech, AI voiceover, voice cloning and SRT/VTT subtitles for AI agents.
概覽
本機 MCP 伺服器,讓助理把文稿轉成配音音訊並附上 SRT/VTT 字幕、複製聲音,或把音訊與影片轉成字幕。
- 可以做什麼
- 用文字或文字檔生成語音,可選帳號中已儲存的聲音或由參考音訊複製的聲音,並設定模型、情緒標籤、語速與音訊格式
- 一次呼叫完成文稿到配音:輸出音訊以及與該音訊對齊的 SRT 與 VTT 字幕,字幕保留文稿原文
- 把本機音訊或影片檔轉寫成 SRT、VTT、TXT 或 JSON 字幕
- 查詢語音引擎的即時能力,並列出帳號中儲存的聲音
- 依任務 ID 查詢、續取或列出生成任務
- 適用情境
- 適合讓助理在對話中直接為影片、短影音或播客製作旁白與搭配字幕,或為既有錄音產生字幕。適合已擁有 Miragea 帳號、使用 Claude Desktop、Claude Code、Cursor、Codex、VS Code 或 Windsurf 的創作者。
- 執行需求
- 透過 uvx、pip 或 Docker 以 stdio 在本機執行,需要 Python 3.10-3.13(或 Docker)。必須在 MIRAGEA_API_KEY 提供 Miragea API 金鑰;選用設定包括 API 根位址、輸出資料夾、等待逾時與 HTTP 逾時。需要能連線到 Miragea API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 TTS MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
TTS MCP Server — text-to-speech, AI voiceover, voice cloning and SRT/VTT subtitles for Claude, Cursor and Codex
[CI] [Release] [PyPI] [Docker] [Python 3.10+] [Hugging Face Space] [License: MIT] [MCP]
tts-mcp-server is an open-source text-to-speech (TTS) MCP server that gives AI agents a voice. It lets Claude Desktop, Claude Code, Cursor, OpenAI Codex, VS Code and Windsurf turn a script into a narration audio file (MP3, WAV, FLAC, Opus, AAC or PCM) plus matching SRT and WebVTT subtitles in one Model Context Protocol tool call. It also clones a voice from a reference audio URL, uses the voices saved in your account, and transcribes any local audio or video file into captions. Text-to-speech, voice cloning and speech recognition run on the Miragea voice engine. Install it with one command, uvx tts-mcp-server; it needs only a MIRAGEA_API_KEY and is MIT licensed.
Install: uvx tts-mcp-server · pip install tts-mcp-server · docker run -i --rm -e MIRAGEA_API_KEY miragea/tts-mcp-server · Try it in the browser: live demo on Hugging Face Spaces · Source: github.com/RTY2345RR/miragea-voice-mcp
Formerly published as
miragea-voice-mcp. Themiragea-voice-mcpcommand is still installed as an alias, so existing configs keep working.
Contents
- How it works
- Features
- Quickstart (60 seconds)
- Client setup: Claude Desktop, Claude Code, Cursor, Codex, VS Code, Windsurf
- Tools reference
- Examples with real output
- Example prompts
- Configuration
- How it compares
- FAQ
- Troubleshooting
- Agent Skill
- Development
- Links
How it works
- Your AI agent (Claude Desktop, Claude Code, Cursor, OpenAI Codex, VS Code or Windsurf) calls a tool such as
miragea_script_to_voiceoverover the Model Context Protocol (stdio). - The server checks the request against the live voice-engine capabilities (models, emotion tags, formats, text length) and adds an idempotency key.
- The Miragea voice engine generates the narration (or clones a voice from your reference clip), then runs speech recognition on the new audio for timestamps.
- The server writes
.mp3+.srt+.vttside by side, with captions that keep your exact script wording, ready to import into your video editor.
Features
- Script → voiceover + captions in one call.
miragea_script_to_voiceovergenerates the narration, times captions by running Miragea speech recognition on the new audio, and writes.mp3+.srt+.vttside by side, ready for CapCut, Premiere Pro, DaVinci Resolve, YouTube, TikTok, Reels and Shorts. - Captions spelled like your script. Recognition can mishear brand names ("Miragea" → "Mirage ear"). By default the server keeps the recognized timing but puts back your exact script wording, snapping cue breaks to sentence ends.
- Short-form friendly caption lengths.
max_caption_chars(default 42 for scripts) splits long cues and shares their time by length, so captions stay readable on vertical video. - Two voice sources. Use a voice already saved in your Miragea account (
actor_id), or clone from a public reference audio URL (reference_audio_url+ optionalreference_text). - Expressive or standard models, emotion tags, speed 0.25–4×. Options are read live from
/capabilities, and every argument is validated before a job is submitted. - Subtitles for any audio or video file.
miragea_transcribeuploads mp3/wav/m4a/mp4/mov… and saves SRT, VTT, TXT or JSON (text, language, timed segments). - No duplicate jobs on retry. Every job carries an
Idempotency-Key; network errors and 502/503/504 are retried with the same key, so a retry never creates a second job. Timeouts return thetask_idso the agent resumes withmiragea_get_taskinstead of resubmitting. - Never overwrites files. Existing outputs get
-2,-3… suffixes. - Secret-safe. The key is read from the environment, never logged, never echoed in errors, never sent to the audio download host, and API redirects are not followed.
- Starts without a key. Tool listing works with no key (handy for registries and inspectors); calls return a clear "set MIRAGEA_API_KEY" message.
- Works on MCP Python SDK 1.x and 2.x, Python 3.10–3.13, macOS, Windows and Linux. Two dependencies:
mcpandhttpx.
Quickstart (60 seconds)
- Get a voice-engine key. The server uses Miragea for voiceover, voice cloning and recognition. Sign in and create an API key at miragea.ai/workspace/api. Setup guide: Install https://miragea.ai/skills/miragea-audio/install.md.
- Install uv if you don't have it:
curl -LsSf https://astral.sh/uv/install.sh | sh(macOS/Linux) orpowershell -c "irm https://astral.sh/uv/install.ps1 | iex"(Windows). - Add the server to your client (Claude Code shown; others below):
- Verify (read-only, creates no job):
Then ask your agent: "List my Miragea voices, then read 'Welcome back to the channel!' in the first English one."
Prefer pip?
pip install tts-mcp-serverand use"command": "tts-mcp-server"with noargsin the snippets below. Prefer Docker? Use"command": "docker"with"args": ["run", "-i", "--rm", "-e", "MIRAGEA_API_KEY", "-v", "/path/to/output:/data", "miragea/tts-mcp-server"].
Client setup
Print any snippet with uvx tts-mcp-server --print-config <client> (claude-desktop, cursor, claude-code, codex, vscode, windsurf). Replace <your-miragea-api-key> and restart the client.
Claude Desktop
Settings → Developer → Edit Config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
Claude Code
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (project) — same JSON as Claude Desktop.
OpenAI Codex (CLI and IDE extension)
~/.codex/config.toml:
tool_timeout_sec matters: voiceover jobs can take longer than Codex's default tool timeout.
VS Code (Copilot agent mode)
.vscode/mcp.json:
Windsurf
~/.codeium/windsurf/mcp_config.json — same JSON as Claude Desktop.
Tools reference
Every generation tool returns task_id, status and the idempotency_key it used, plus the saved file paths.
Examples
Real outputs from this server (Miragea voice engine), committed in examples/. Voices are cloned from CMU ARCTIC reference clips (licensed free for any use); the audiobook clip is from LibriSpeech (CC BY 4.0).
Transcription output (audiobook-clip.srt), with words kept whole across cues:
Example prompts
- "Make a 30-second product-ad voiceover from
ad.txtwith my Nova voice, happy tone, 1.1× speed, and give me SRT + VTT with short captions." - "Clone the voice at
https://example.com/me.wav(it says: 'Hi, I'm Sam and this is my test.') and narrateintro.mdas WAV." - "Create subtitles for
~/Videos/vlog.mp4as SRT and VTT." - "That voiceover timed out — resume task
…and save it to~/Desktop/episode-3.mp3." - "What models and emotion tags does my Miragea account have, and how many characters can I send per request?"
Configuration
How it compares
Honest snapshot from each project's public README (November 2026). "–" means not offered or not documented.
Where the others are ahead: ElevenLabs and AllVoiceLab cover more audio tasks (sound effects, voice changer, dubbing, agents), and better-tts-mcp needs no key and offers batch and multi-voice synthesis. This server stays focused on the video-creator loop of script → voiceover → captions and does that one loop end to end.
FAQ
What is a TTS MCP server?
A TTS (text-to-speech) MCP server is a small program that exposes speech synthesis as tools over the Model Context Protocol, so an AI agent such as Claude or Cursor can turn text into an audio file on request. tts-mcp-server adds voice cloning, speech-to-text subtitles and a one-call script → voiceover + SRT/VTT workflow on top.
How do I install a text to speech MCP server in Claude Code?
Run claude mcp add tts -s user -e MIRAGEA_API_KEY=<your-miragea-api-key> -- uvx tts-mcp-server, then ask Claude to "read this paragraph aloud and save it as MP3". Use uvx tts-mcp-server --print-config <client> for Claude Desktop, Cursor, Codex, VS Code or Windsurf.
Is there a free text to speech MCP server?
The server itself is free, open-source software (MIT). Speech is generated by the Miragea voice engine, so you need a Miragea API key. If you need a keyless option, better-tts-mcp uses Microsoft Edge read-aloud, and kokoro-tts-mcp runs a local model; neither does voice cloning or subtitles from your own audio.
Is this an alternative to the ElevenLabs MCP server?
Yes, for the voiceover use case. Like elevenlabs-mcp it installs with uvx and gives agents text-to-speech and voice cloning; unlike it, one tool call returns the audio together with SRT/VTT captions that keep your exact script wording. ElevenLabs covers more audio tasks (sound effects, voice changer, conversational agents); see How it compares.
How do I add text-to-speech to Claude Desktop?
Add the tts block from Claude Desktop to claude_desktop_config.json, put your Miragea API key in env, and restart Claude. Claude can then call miragea_text_to_speech and save MP3 files to ~/Miragea.
How do I generate SRT subtitles from a video with an AI agent?
Ask the agent to run miragea_transcribe on the file (for example, "make SRT and VTT subtitles for ~/Videos/clip.mp4"). The server uploads it to Miragea speech recognition and writes clip.srt / clip.vtt.
Can an MCP server make a voiceover with matching captions for YouTube Shorts or TikTok?
Yes. miragea_script_to_voiceover returns the audio plus SRT/VTT captions timed to that audio, with cues capped at 42 characters by default for vertical video. Import both into CapCut, Premiere Pro or DaVinci Resolve.
Does it support voice cloning?
Yes. Pass reference_audio_url (a public http(s) link to a clean sample) and, ideally, reference_text with the exact words spoken in it. Supplying the exact text gives the most faithful clone; if you omit it, Miragea recognizes it automatically. Only clone voices you have the right to use.
Does it work with Cursor, Claude Code and OpenAI Codex?
Yes, with any MCP client that supports stdio servers. Run uvx tts-mcp-server --print-config cursor (or claude-code, codex, vscode, windsurf, claude-desktop) for a ready snippet.
Which audio formats can I export?
MP3 (default), WAV, FLAC, Opus, AAC and PCM. Subtitles: SRT, WebVTT, plain text, and JSON with timed segments.
Can I use it without an API key or with another TTS engine?
No. Miragea is the only voice engine; there is no hidden fallback. Without a key the server still starts and lists its tools, and every call explains how to add the key.
Is my API key safe?
The key stays in your local MCP config or environment. The server never prints or logs it, redacts it from errors, sends it only to the Miragea API root (redirects are refused), and never sends it to the audio download URL.
What happens if a long voiceover times out?
The job keeps running on Miragea. The tool returns the task_id; ask the agent to call miragea_get_task with wait=true to download the result. Don't resubmit, because that would create a duplicate job.
Can I use it in Python scripts or n8n instead of chat?
Any MCP-capable runtime works. For plain scripts, call the Miragea REST API directly (guide, OpenAPI schema).
Troubleshooting
Logs go to stderr, which your client keeps (Claude Desktop on macOS: ~/Library/Logs/Claude/mcp-server-tts.log).
Companion Agent Skill
skills/miragea-voiceover/SKILL.md is an Agent Skill that teaches Claude a script-to-voiceover workflow on top of these tools: tightening a script for speech, choosing a voice and tone, confirming long jobs first, and delivering audio and captions for each platform. Copy the folder into ~/.claude/skills/ (Claude Code) or upload it as a skill in Claude. It is also published on its own in RTY2345RR/miragea-agent-skills with install steps for Claude Code, Codex and Cursor.
Development
The server wraps only the documented Miragea endpoints: GET /capabilities, GET /actors, POST /audio/generations, POST /subtitles/recognitions, GET /tasks/{id}, GET /tasks (API guide). VTT and short-cue splitting are local formatting of Miragea's timed segments.
Links
- GitHub: https://github.com/RTY2345RR/miragea-voice-mcp
- Live demo (Hugging Face Space): https://huggingface.co/spaces/miragea/miragea-voice-mcp
- Agent Skills: https://github.com/RTY2345RR/miragea-agent-skills
- Miragea API keys: https://miragea.ai/workspace/api
- PyPI: https://pypi.org/project/tts-mcp-server/
- Docker Hub: https://hub.docker.com/r/miragea/tts-mcp-server
License
MIT. "Miragea" is the voice engine this server connects to (voiceover, voice cloning, speech recognition). Use cloned voices only with the speaker's consent.
來源:README.md,提交 685f478
工具
0版本歷史
1- v0.1.1最新Nov 8, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分