Skip to main content
Glama

caption-forge-mcp

CI License: MIT MCP

Subtitles that your AI assistant can actually fix.

caption-forge-mcp is a Model Context Protocol server for working with captions: convert SRT ⇄ VTT ⇄ ASS, fix sync drift, lint for readability, and turn long subtitle lines or raw speech-to-text word timings into the short, punchy captions you see on Reels, TikTok and Shorts.

Pure TypeScript. No ffmpeg, no API keys, no network. Works on any caption file you point it at — or on caption text pasted straight into the chat.

You:    My podcast SRT is 1.2 seconds late and the lines are huge. Make reel captions,
        all caps, and give me an ASS file I can burn into the vertical cut.
Claude: Shifted -1200 ms, then reflowed 214 cues → 611 three-word captions.
        Saved ep42_reels.ass (1080x1920, bold, above the UI zone). Burn in with:
        ffmpeg -i ep42_vertical.mp4 -vf "subtitles='ep42_reels.ass'" -c:a copy out.mp4

Tools

Tool

What it does

caption_info

Format, cue count, time span, words and speaking rate, reading speed (CPS), longest line, lines per cue, tags, parse warnings, preview.

convert_captions

SRT ⇄ WebVTT ⇄ ASS ⇄ JSON → plain text. Styled ASS output (presets or custom font/size/color/outline/box/position) plus an ffmpeg burn-in command.

shift_captions

Move all cues (or only cues after a point, e.g. after a cut) earlier or later.

retime_captions

Fix drift: frame-rate conversion (23.976 → 25 etc.), stretch factor, or two-point sync (tell it the right time for an early and a late line).

lint_captions

Readability check with cue numbers and timestamps: line length, line count, reading speed, min/max duration, overlaps, order, flicker gaps, empty cues.

clean_captions

Auto-fix: whitespace, empty cues, sorting, duplicate merging, overlaps, gaps, too-short cues. Optional removal of [MUSIC], (laughs), ♪, SPEAKER: labels.

reflow_captions

Re-chunk existing cues: reels (1–3 words, one short line, optional ALL CAPS) or standard (balanced ≤42-char lines, max 2). Breaks on sentence/phrase boundaries.

captions_from_words

Frame-accurate captions from word timestamps (Whisper, faster-whisper, WhisperX, Deepgram, or a plain [{word,start,end}] array).

clip_captions

Keep only a time range and re-zero it — for clips cut from a long video or podcast.

search_captions

Find where something is said, with timestamps and surrounding lines.

extract_transcript

Clean transcript: tags stripped, rolling duplicates from auto-captions removed, paragraphs on pauses, optional timestamps.

Every tool accepts either path (a local file) or content (the caption text). Results come back inline unless you pass output_path.

Formats

Format

Read

Write

Notes

SRT

✅

✅

BOM, CRLF, missing indexes and UTF-16 files handled.

WebVTT

✅

✅

Cue settings, identifiers, NOTE/STYLE blocks and YouTube karaoke tags handled.

ASS / SSA

✅

✅

Reads any Format: column order. Writes one styled Default style.

JSON

✅

✅

[{start, end, text}] in seconds, start_ms/end_ms, or timestamp strings.

Plain text

—

✅

Transcript.


Related MCP server: caption-checker

Requirements

  • Node.js 20+. That's it.

Install

Runs straight from GitHub with npx — nothing to publish or build.

Claude Desktop

Settings → Developer → Edit Config:

{
  "mcpServers": {
    "caption-forge": {
      "command": "npx",
      "args": ["-y", "github:anshumanofficial2002-cpu/caption-forge-mcp"]
    }
  }
}

Restart Claude Desktop.

Claude Code

claude mcp add caption-forge -- npx -y github:anshumanofficial2002-cpu/caption-forge-mcp

Cursor / Windsurf / VS Code / other clients

{
  "caption-forge": {
    "command": "npx",
    "args": ["-y", "github:anshumanofficial2002-cpu/caption-forge-mcp"]
  }
}

From source

git clone https://github.com/anshumanofficial2002-cpu/caption-forge-mcp.git
cd caption-forge-mcp && npm install && npm run build
# point your client at: node /absolute/path/to/caption-forge-mcp/dist/index.js

Example prompts

  • "What's wrong with ~/Downloads/interview.srt? Lint it with the standard streaming rules."

  • "These captions start in sync but are 3 seconds late by the end. Line 1 should be at 00:00:02,100 and the last line at 00:41:55,300."

  • "Convert episode.vtt to SRT and remove the [MUSIC] tags."

  • "Make TikTok-style captions from whisper_words.json, two words at a time, uppercase, as an ASS file for a vertical video."

  • "I clipped 12:03 to 12:58 from the podcast. Give me captions for just that clip."

  • "Find every time the guest says 'compounding' in ep12.srt."

  • "Turn this SRT into a clean transcript with timestamps every paragraph, I need show notes." (paste the SRT)


Tool reference

Common input params for every caption tool:

Param

Type

Notes

path

string

Local .srt, .vtt, .ass/.ssa or .json. ~ expanded. Max 20 MB.

content

string

Caption text instead of a file.

format

srt | vtt | ass | json

Force input format (auto-detected otherwise).

output_path

string

Write to this file. Format follows the extension unless set explicitly.

output_format

srt | vtt | ass | json | txt

Output format (defaults to input format). convert_captions uses to instead.

overwrite

boolean

Default false. Existing files are never replaced without it.

convert_captions

to (required), ass_style:

ass_style field

Meaning

preset

vertical_reel (1080x1920, 84 px bold, raised above the app UI), horizontal (1920x1080 bottom), lower_third

font, font_size

Font family and size in pixels of the play resolution

primary_color, outline_color

#RRGGBB

outline, shadow

Thickness in pixels

bold

boolean

alignment

Numpad position: 2 bottom-center, 5 middle, 8 top

margin_v

Distance from the aligned edge

box

Opaque box behind text instead of an outline

shift_captions

offset — ms number or "2.5s", "-1500ms", "-00:00:01,200". from — only shift cues at/after this time.

retime_captions

mode: fps (from_fps, to_fps), factor (factor), or sync_points (first_original, first_correct, second_original, second_correct).

lint_captions

Preset

Chars/line

Lines

Max CPS

Min/Max duration

Min gap

standard

42

2

17

0.833 s / 7 s

83 ms

reels

24

1

22

0.3 s / 3 s

0

accessible

37

2

13

1.5 s / 7 s

83 ms

Override any rule: max_chars_per_line, max_lines, max_cps, min_duration_ms, max_duration_ms, min_gap_ms. Limit output with max_issues.

clean_captions

min_gap_ms (83), min_duration_ms (833), merge_duplicates (true), remove_hearing_impaired (false).

reflow_captions / captions_from_words

Param

reels default

standard default

style

reels

standard (or custom)

max_words

3

40

max_chars_per_line

22

42

max_lines

1

2

uppercase

false

false

strip_punctuation

true

false

min_duration_ms

250

833

reflow_captions estimates word timing inside each original cue from word length. For exact timing, use captions_from_words with words_path or words_json. Accepted shapes:

[{ "word": "Hey", "start": 0.0, "end": 0.3 }]                 // seconds
[{ "text": "Hey", "start_ms": 0, "end_ms": 300 }]             // milliseconds
{ "segments": [{ "words": [{ "word": " Hey", "start": 0.0, "end": 0.3 }] }] }   // Whisper
{ "results": { "channels": [{ "alternatives": [{ "words": [...] }] }] } }        // Deepgram

clip_captions

start, end (source times), rezero (true).

search_captions

query, regex (false), whole_word (false), context (1), max_results (50).

extract_transcript

timestamps (false), paragraph_gap_ms (2000), strip_speaker_tags (false), output_path.


Notes

  • ASS input loses its original styles when written back out; text and timing are kept.

  • Reading speed (CPS) counts every visible character including spaces, the usual convention for subtitle guidelines.

  • Overwrites are refused unless overwrite: true, and writing over the input file needs it explicitly.

Development

npm install
npm run build
npm test          # parser/ops unit tests + end-to-end tests over stdio
npm run inspect   # MCP Inspector

dist/ is committed so npx github:… works without a build; CI verifies it matches src/.

License

MIT © 2026 Anshuman

Available Tools

11 tools
caption_infoCaption file infoA
Read-only

Summarize a caption file: detected format, cue count, time span, word count and speaking rate, average/max reading speed (characters per second), shortest/longest cue, longest line, lines per cue, formatting tags, and parse warnings. Shows the first few cues.

Inputs: path, format, content, preview.

captions_from_wordsCaptions from word timestampsA

Build frame-accurate captions from word-level timestamps produced by speech-to-text (Whisper / faster-whisper / WhisperX JSON with word_timestamps, Deepgram JSON, or a plain [{word, start, end}] array in seconds, or start_ms/end_ms). Same styles as reflow_captions; reels style is the classic word-by-word social caption.

Inputs: style, ass_style, max_lines, max_words, +9 more.

clean_captionsClean up captionsA

Automatic tidy-up: trims whitespace, drops empty and zero-length cues, sorts by time, merges back-to-back duplicates, fixes overlaps and flicker gaps, extends too-short cues where there is room, renumbers. Optionally removes sound descriptions like [MUSIC] or (laughs) and speaker labels.

Inputs: path, format, content, overwrite, +6 more.

clip_captionsCut captions for a clipA

Keep only the captions inside a time range and re-zero them to start at 00:00 — for when you cut a short clip out of a long video or podcast. Cues crossing the edges are trimmed to the range.

Inputs: end (required), start (required), path, format, +5 more.

convert_captionsConvert caption formatsB

Convert between SRT, WebVTT, ASS (styled, for burning in), JSON and plain-text transcript. ASS output can be styled with presets (vertical_reel, horizontal, lower_third) or custom font, size, colors, outline, box and position, and comes with an ffmpeg burn-in command.

Inputs: to (required), path, format, content, +3 more.

extract_transcriptExtract a clean transcriptB

Turn captions into a readable transcript: tags stripped, rolling duplicate lines from auto-generated captions removed, paragraphs split on pauses, optional [HH:MM:SS] timestamps per paragraph and speaker-label removal. Useful for show notes, blog posts, chapter markers or feeding the text to an LLM.

Inputs: path, format, content, overwrite, +4 more.

lint_captionsLint captions for readabilityA
Read-only

Check captions against readability rules and list every problem with its cue number and timestamp: lines too long, too many lines, reading speed too fast (CPS), on screen too briefly or too long, overlaps, out-of-order cues, flicker-prone gaps and empty cues. Presets: standard (42 chars × 2 lines, 17 cps — common streaming practice), reels (24 chars × 1 line), accessible (13 cps). Any rule can be overridden.

Inputs: path, format, preset, content, +7 more.

reflow_captionsRe-chunk captions (reel style or standard)A

Rebuild caption chunks from existing cues. reels: short 1–3 word punchy captions like on Instagram/TikTok/Shorts, timed by splitting each cue's duration across its words. standard: rewrap into balanced ≤42-character lines, max 2 per cue, splitting overlong cues. Breaks prefer sentence and phrase boundaries.

Inputs: path, style, format, content, +10 more.

retime_captionsRetime / resync captionsA

Fix captions that drift (in sync at the start, increasingly off later). Three modes: fps — convert between frame rates (e.g. 23.976 → 25 PAL speed-up); factor — stretch by a multiplier; sync_points — give the correct time for two cues and everything is mapped linearly between them (most accurate).

Inputs: mode (required), path, factor, format, +7 more.

search_captionsSearch captionsA
Read-only

Find where something is said: returns every matching cue with its timestamp, optionally with surrounding lines. Great for finding soundbites or a quote in a long interview, podcast or talk.

Inputs: query (required), path, regex, format, +4 more.

shift_captionsShift caption timingA

Move every cue earlier or later by a fixed offset — the fix for captions that are consistently ahead of or behind the audio. Optionally only shift cues from a given time onward (e.g. after an ad break or a cut).

Inputs: offset (required), from, path, format, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct caption-processing operation: building captions, converting formats, shifting, retiming, linting, cleaning, clipping, searching, summarizing, and extracting transcripts. Potentially close pairs like reflow_captions vs captions_from_words and lint_captions vs clean_captions are clearly differentiated by source and check-vs-fix behavior. An agent should have no trouble selecting the right tool.

    Naming Consistency4/5

    Most tools follow an action + _captions pattern (shift_captions, retime_captions, lint_captions, etc.), making the set mostly predictable. A few names deviate: captions_from_words is source-oriented, caption_info is noun_noun, and extract_transcript uses a different object noun. These are readable but prevent a perfect consistency score.

    Tool Count5/5

    Eleven tools is well-scoped for a caption-processing server, covering the main pipeline stages without obvious redundancy. Each tool has a clear, earned place in the workflow from caption generation through cleanup, validation, conversion, search, and transcript extraction.

    Completeness5/5

    The surface covers caption creation from word timestamps, reflowing, conversion, timing correction, cleanup, readability linting, clipping, search, metadata inspection, and transcript extraction. No obvious CRUD or lifecycle gaps appear for the caption-manipulation domain, and common dead ends like format conversion or drift repair are addressed.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI apps to transcribe local audio and video files on the user's own GPU, producing SRT/VTT subtitles and text without cloud uploads. It also helps find media files, list available devices, and list supported languages and models.
      8
      250 PyPI
      9
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients such as Claude, Cursor and VS Code to validate SRT and WebVTT caption files mid-task against Netflix, BBC or DCMP limits, flagging reading speed, line length, line count, on-screen duration, gaps, overlaps and broken timestamps. Runs locally as a dependency-free stdio server, accepting a file path or pasted caption text and exposing each standard's limits with their source pages.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to edit video locally through FFmpeg: probing media, validating and previewing JSON edit projects, rendering short-form clips with captions, reframing, transitions and ducked music. Also analyses existing videos and applies or saves reusable format templates, without cloud services or API keys.
      1
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables an AI agent to inspect, repair, retime, convert, merge/split, and search SRT, WebVTT, and ASS subtitle files entirely offline, with exact-fraction resync, dry-run fixes, and honest encoding detection. Translation is handled by the agent itself through a chunk/apply contract that preserves timing and flags lost tags.
      10
      MIT