subcraft-mcp
Exports merged bilingual subtitle cues as rational-frame FCPXML 1.9 title lanes compatible with Apple Final Cut Pro.
Exports merged bilingual subtitle cues as rational-frame FCPXML 1.9 title lanes compatible with DaVinci Resolve.
Provides a GitHub Action that scans repository .srt and .vtt caption files in pull requests, emits inline error annotations for overlapping cues, CPS violations, and line-width overflows, and can fail the workflow.
Generates YouTube-compliant 00:00 timestamp chapters and speaker-grouped Markdown show-notes from captions while stripping spoken filler words.
subcraft-mcp — Subtitle Reflow, Timecode Healing & FCPXML 1.9 MCP Server + GitHub Action
Zero-dependency, local-only Model Context Protocol (MCP) Server, CLI, and GitHub Action enabling Claude Desktop, Cursor, Windsurf, Antigravity, and CI pipelines to reflow .srt / .vtt / OpenAI Whisper .json captions for 9:16 vertical and 16:9 cinema screens, repair NLE framerate drift and overlapping timecodes, merge dual-language tracks into FCPXML 1.9, extract YouTube 00:00 chapters, and block broken captions in pull requests.
MCP Tools Exposed (stdio)
Tool | Purpose | Annotations |
| Reflows |
|
| Repairs NLE framerate drift ( |
|
| Aligns primary and secondary subtitle tracks by midpoint and temporal overlap into dual-line |
|
| Generates YouTube-compliant |
|
Related MCP server: whisper-mcp
Quick Start (MCP Client & Local CLI)
# Start MCP server over stdio (zero npm install / zero external dependencies)
npx -y github:z121245017-ai/subcraft-mcp
# List MCP tool schemas from terminal
npx -y github:z121245017-ai/subcraft-mcp --list
# Reflow a long caption cue for 9:16 vertical shorts directly from terminal
npx -y github:z121245017-ai/subcraft-mcp --cli reflow_vertical_subtitles '{"input":"1\n00:00:00,000 --> 00:00:04,800\nToday we benchmark 1,250.50 requests per second at https://example.org/spec without cloud uploads.\n","preset":"vertical_9_16"}'Claude Desktop / Cursor / Windsurf / Antigravity Config
{
"mcpServers": {
"subcraft": {
"command": "npx",
"args": ["-y", "github:z121245017-ai/subcraft-mcp"]
}
}
}Docker (node:22-alpine, non-root USER node)
docker build -t subcraft-mcp .
docker run -i --rm subcraft-mcpGitHub Action (z121245017-ai/subcraft-mcp@v1)
Add subcraft-mcp@v1 to .github/workflows/ to automatically lint repository .srt and .vtt caption files in pull requests for overlapping cues, >18 CPS reading-speed bursts, and line-width overflows with inline ::error file=...,line=...:: PR annotations:
name: Caption & Timecode Quality Gate
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
subtitle-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check .srt & .vtt captions for overlaps, >18 CPS & width overflows
uses: z121245017-ai/subcraft-mcp@v1
with:
paths: '.'
preset: 'cinema_16_9'
max-en-cps: '18'
max-zh-cps: '9'
fail-on-overlap: 'true'
fail-on-cps: 'true'
fail-on-line-width: 'true'Action Inputs & Outputs
Name | Kind | Default | Description |
| Input |
| Newline-, comma-, or space-separated files or directories to scan for |
| Input |
| Line-width preset: |
| Input |
| Maximum allowed English reading speed in characters per second ( |
| Input |
| Maximum allowed Chinese reading speed in CJK units per second ( |
| Input |
| Optional explicit ASCII character ceiling per line overriding |
| Input |
| Optional explicit CJK unit ceiling per line overriding |
| Input |
| Exit |
| Input |
| Exit |
| Input |
| Exit |
| Input |
| Comma-separated directory names skipped during recursive workspace scan. |
| Output | — | Number of |
| Output | — | Total count of overlapping or inverted cue timecodes detected. |
| Output | — | Total count of reading-speed ( |
| Output | — | Total count of line-width overflow violations detected. |
| Output | — | Structured JSON summary of all caption lint findings. |
Verification
npm testLicense
MIT License — 0 external npm dependencies, 0 network calls, 100% local execution.
Available Tools
4 toolsextract_video_chapters_and_shownotesARead-onlyIdempotent
Extract YouTube-compliant 00:00 timestamp chapters and generate a speaker-grouped, paragraphized Markdown show-notes transcript from .srt, .vtt, or Whisper .json while surgically stripping Chinese and English spoken filler words.
Inputs: input (required), title, enFillers, zhFillers, +4 more.
heal_subtitle_timecodesARead-onlyIdempotent
Repair NLE framerate drift (23.976 <-> 24 <-> 25 <-> 29.97 <-> 30 fps), apply global millisecond offset shifts, enforce minimum cue duration floors, clamp overlapping cues for Premiere / Final Cut Pro / DaVinci Resolve, and audit reading-speed CPS violations.
Inputs: input (required), gapMs, offsetMs, sourceFps, +5 more.
merge_bilingual_subtitlesARead-onlyIdempotent
Align and merge primary and secondary subtitle tracks (.srt, .vtt, or Whisper .json) by midpoint and temporal overlap into dual-line .srt, .vtt, or rational-frame Apple Final Cut Pro / DaVinci Resolve FCPXML 1.9 title lanes.
Inputs: primaryInput (required), secondaryInput (required), fps, order, +4 more.
reflow_vertical_subtitlesARead-onlyIdempotent
Reflow .srt, .vtt, or OpenAI Whisper verbose .json captions into balanced 9:16 vertical (<=13 CJK / <=26 ASCII) or 16:9 cinema (<=22 CJK / <=42 ASCII) .srt or .vtt cues using dynamic programming without splitting English words, numbers, currencies, ratios, or URLs.
Inputs: input (required), preset, maxCjkUnits, outputFormat, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a clearly distinct subtitle-processing operation: reflowing layout, repairing timing, merging bilingual tracks, and extracting chapters/show notes. There is no meaningful overlap in purpose, so an agent can select the right tool from the task alone.
All four tools follow a verb-first snake_case convention (reflow_, heal_, merge_, extract_) with descriptive noun phrases. The pattern is predictable and consistent throughout.
Four tools are well-scoped for a focused subtitle-processing server, and each covers a distinct stage of subtitle cleanup and delivery. Nothing feels redundant or missing from a count perspective.
The surface covers core subtitle workflows: reflow, timing repair, bilingual merging, and chapter/show-notes extraction across common caption formats. Minor gaps exist around general format conversion or subtitle trimming, but these are not central to the stated purpose.
Maintenance
Related MCP Connectors
MCP server for Speech-to-Text
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for the FFmpeg Micro video transcoding API — create, monitor, download transcodes.
Hong Kong Cantonese & Konglish AI voiceover + frame-synced SRT/VTT subtitle MCP server.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for whisper-based transcription and translation, supporting local stdio and remote HTTP transports with file workflow safety.-
- FlicenseNot gradedqualityDmaintenanceLocal speech transcription MCP server using faster-whisper. Supports transcription, translation to English, and output in JSON, text, SRT, and VTT formats.-
- AlicenseBqualityCmaintenanceThis MCP server enables local-first video subtitle processing on Windows, offering tools for transcription, subtitle formatting, SRT/ASS export, FFmpeg rendering, and Kdenlive project creation without cloud APIs.9MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to open, read, edit, verify, and save Aegisub/ASS subtitle documents, covering event lines, styles, timing and QC, karaoke, override tags, vector drawings, clipping, and font metrics. Includes a libass-backed verification layer and byte-faithful round-trips, served over stdio or streamable HTTP.1211MIT