YouTube Dubbing MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FFMPEG_BINARY | No | Custom ffmpeg binary path (defaults to system or bundled ffmpeg). | |
| YTDLP_COOKIES | No | Path to a cookies.txt file used when YouTube asks to sign in. | |
| MIRAGEA_API_KEY | Yes | Miragea voice engine API key (required for voicing and transcription). | |
| DUBBING_OUTPUT_DIR | No | Where projects are saved. | ~/YouTubeDubbing |
| DUBBING_CONCURRENCY | No | Number of lines voiced in parallel. | 4 |
| MIRAGEA_WAIT_TIMEOUT | No | Seconds to wait per job before returning (re-run to resume). | 900 |
| YTDLP_COOKIES_FROM_BROWSER | No | Browser name (e.g., chrome, firefox, edge, safari) used when YouTube asks to sign in. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
YouTube dubbing tools: dub a YouTube video, a local video/audio file or an SRT into another language, with one cloned voice per speaker, synced captions and upload-ready YouTube audio tracks. Miragea is the voice engine. Workflow (each step saves to disk, so any step can be re-run):
dubbing_start_project(source=<YouTube URL | video/audio file | .srt/.vtt>) -> project_id, speakers, segments.
Check speakers: dubbing_get_segments (no language) shows who says what. Fix labels with dubbing_assign_speakers.
Voices: dubbing_extract_voice_samples(share=true) clones every speaker from the video itself, or dubbing_set_voice per speaker (saved actor_id from dubbing_list_voices, or a public reference_audio_url).
Translate: dubbing_get_segments(target_language=...) gives each line with target_chars/max_chars. YOU translate, then dubbing_set_translation(language, {id: text}, title, description). Shorten any too_long lines and set them again.
dubbing_render(language) -> dubbed audio track (length = video), SRT, preview MP4. Re-running resumes finished lines.
dubbing_export_youtube_package -> per-language folders for YouTube Studio > Languages (the YouTube API cannot upload audio tracks). Never resubmit after a timeout: just call the same tool again.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dubbing_check_setupA | Check that dubbing will work: API key set (value hidden), voice engine reachable, its voice models and limits, ffmpeg and yt-dlp available, and where projects are saved. Read-only; creates no job. Call first. |
| dubbing_list_voicesA | List the voices saved in the user's Miragea account (actor_id, name, language) to use with dubbing_set_voice. Read-only. |
| dubbing_start_projectA | Start a dubbing project from a YouTube URL, a local video/audio file, or an SRT/VTT caption file. Downloads the audio (and optionally the video for a preview), takes the transcript from YouTube captions when available or transcribes the speech, merges caption fragments into sentences and labels speakers from caption markers (Name:, [Name], >>) or, without markers, by voice pitch (set num_speakers if known). Returns project_id, duration, speakers and segment count. |
| dubbing_get_segmentsA | Read a project's transcript in pages: id, speaker, start, slot_seconds and text. With target_language, each line also gets target_chars and max_chars, the length that fits its time slot when spoken in that language, plus any translation already saved. Use it to review speakers and to translate. |
| dubbing_assign_speakersA | Set who speaks each segment. |
| dubbing_extract_voice_samplesA | Cut a clean 4-14 second voice sample for each speaker from the source audio, with its transcript. With share=true each sample is uploaded to a temporary public file host (uguu.se, deleted after a few hours) so the voice engine can clone it, and the speaker's voice is set automatically. Ask the user before sharing someone's voice. With share=false the samples stay local. |
| dubbing_set_voiceA | Choose the voice for one speaker: a saved voice (actor_id from dubbing_list_voices) or a voice to clone from a public reference_audio_url (6-15 s of clean speech) with its exact reference_text. Optional model ('expressive' or 'standard') and speed (0.25-4). |
| dubbing_set_translationB | Save translated lines for a target language as {segment_id: text} (all at once or in batches; later calls update only the ids given), plus an optional localized YouTube title and description. Returns a fit check: lines that are too long for their time slot, and ids still missing. |
| dubbing_renderA | Voice every translated line with its speaker's voice, then build the dubbed audio track at the exact video length (each line starts with the original; lines are sped up only when needed, max_speedup 1.0-1.5), the translated SRT, and a preview MP4 when the video was downloaded. Optional background: a music/effects file mixed under the voices. Re-running reuses finished lines and resumes pending ones. |
| dubbing_export_youtube_packageB | Write the YouTube upload package: one folder per language with audio.m4a (the dub track, video length), captions.srt, title.txt and description.txt, plus UPLOAD-TO-YOUTUBE.md with the YouTube Studio > Languages steps and a Studio link. The YouTube API cannot upload audio tracks, so the user uploads them. |
| dubbing_project_statusB | Show a project's state: speakers and their voices, languages translated and rendered, output paths. |
| dubbing_list_projectsA | List dubbing projects saved on this machine, newest first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
Each tool maps to a distinct pipeline stage (setup check, project start, transcript read, speaker assignment, voice selection, translation, render, export), so an agent can sequence them without guessing. The main overlap is that dubbing_extract_voice_samples with share=true also sets a speaker's voice, partially duplicating dubbing_set_voice, and dubbing_project_status vs dubbing_list_projects vs dubbing_get_segments require reading descriptions to separate.
Every tool is prefixed with `dubbing_` and uses a consistent snake_case verb_noun pattern (list_voices, start_project, get_segments, set_translation, export_youtube_package). No camelCase or stray verb styles, and the shared prefix makes the namespace obvious.
Twelve tools is right for a multi-stage dubbing pipeline: setup, ingest, speaker labeling, voice assignment, translation, render, and export each need their own operation. Nothing appears redundant or bolted on; removing any tool would break a step of the workflow.
The surface covers the full end-to-end lifecycle from dubbing_check_setup through dubbing_export_youtube_package, including re-running render for resumption. Gaps are minor: there is no way to delete or clean up a project (only list and status), and no explicit cancel/abort for a long-running job.