Skip to main content
Glama

subcraft-mcp — Subtitle Reflow, Timecode Healing & FCPXML 1.9 MCP Server + GitHub Action

z121245017-ai/subcraft-mcp MCP server

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

reflow_vertical_subtitles

Reflows .srt, .vtt, or Whisper verbose .json into balanced 9:16 vertical (<=13 CJK / <=26 ASCII) or 16:9 cinema (<=22 CJK / <=42 ASCII) .srt or .vtt cues via dynamic programming without splitting English words, numbers, currencies, ratios, or URLs.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

heal_subtitle_timecodes

Repairs NLE framerate drift (23.976 <-> 24 <-> 25 <-> 29.97 <-> 30 fps), shifts global millisecond offsets, enforces minimum duration floors (600ms), clamps cue overlaps (40ms gap), and flags >18 CPS EN / >9 CPS ZH reading-speed bursts.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

merge_bilingual_subtitles

Aligns primary and secondary subtitle tracks by midpoint and temporal overlap into dual-line .srt, .vtt, or rational-frame Apple Final Cut Pro / DaVinci Resolve FCPXML 1.9 title lanes.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

extract_video_chapters_and_shownotes

Generates YouTube-compliant 00:00 timestamp chapters and a speaker-grouped, paragraphized Markdown show-notes transcript while surgically stripping spoken Chinese and English filler words.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

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-mcp

GitHub 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

paths

Input

.

Newline-, comma-, or space-separated files or directories to scan for .srt and .vtt files.

preset

Input

cinema_16_9

Line-width preset: cinema_16_9 (42 ASCII / 22 CJK) or vertical_9_16 (26 ASCII / 13 CJK).

max-en-cps

Input

18

Maximum allowed English reading speed in characters per second (CPS).

max-zh-cps

Input

9

Maximum allowed Chinese reading speed in CJK units per second (CPS).

max-ascii-chars

Input

''

Optional explicit ASCII character ceiling per line overriding preset.

max-cjk-units

Input

''

Optional explicit CJK unit ceiling per line overriding preset.

fail-on-overlap

Input

true

Exit 1 when subtitle cues overlap in time or have non-positive duration.

fail-on-cps

Input

true

Exit 1 when any subtitle cue exceeds the configured reading-speed CPS limit.

fail-on-line-width

Input

true

Exit 1 when any subtitle line exceeds the configured CJK or ASCII width ceiling.

ignore

Input

node_modules,.git,dist,build,coverage,vendor

Comma-separated directory names skipped during recursive workspace scan.

scanned-files

Output

—

Number of .srt and .vtt caption files inspected.

overlaps-found

Output

—

Total count of overlapping or inverted cue timecodes detected.

cps-violations-found

Output

—

Total count of reading-speed (CPS) violations detected.

width-violations-found

Output

—

Total count of line-width overflow violations detected.

report-json

Output

—

Structured JSON summary of all caption lint findings.

Verification

npm test

License

MIT License — 0 external npm dependencies, 0 network calls, 100% local execution.

Available Tools

4 tools
extract_video_chapters_and_shownotesA
Read-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_timecodesA
Read-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_subtitlesA
Read-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_subtitlesA
Read-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

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for whisper-based transcription and translation, supporting local stdio and remote HTTP transports with file workflow safety.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Local speech transcription MCP server using faster-whisper. Supports transcription, translation to English, and output in JSON, text, SRT, and VTT formats.
      -
    • A
      license
      B
      quality
      C
      maintenance
      This 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.
      9
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables 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.
      121
      1
      MIT