short-form-video-editor-mcp

short-form-video-editor-mcp

Turns long-form videos into short-form clips (TikTok/Reels) by reasoning over word-timestamped transcripts, with silence-aware rendering, STT-based validation, and optional reframing/captions.

Category
访问服务器

README

short-form-editor-mcp

Local MCP server that turns a long-form video into short-form (TikTok/Reel) clips by reasoning over a word-timestamped transcript. The agent reads the transcript and designs the edit — including non-contiguous reordering (open on the hook, cut back to the start, build, land the hook again). The server provides accurate STT, a cheap text-space validation loop, a silence-aware renderer, and an STT-based QA gate.

v1 scope: dialog/audio cues only. No smart reframe, source aspect ratio preserved, no burned-in captions. (Those are explicit later phases.)

How it works (the loop)

  1. create_project(video_path) — probe + extract 16kHz mono audio.
  2. transcribe(project_id) — WhisperX (word timestamps + silence map). Writes transcript.txt / transcript.json.
  3. Read transcript.txt and design one or more EDLs (edit decision lists). An EDL is an ordered list of segments, each a word-index range; segments may be reordered/reused.
  4. validate_edl(project_id, edl_obj) — snaps cuts to silence, returns the reconstructed dialog in designed order + join warnings. No render. Iterate here cheaply.
  5. render(project_id, edl_obj) — ffmpeg cut + concat, one re-encode, frame-accurate.
  6. verify_clip(project_id, edl_id) — re-STT the render and diff vs the intended dialog.

EDL shape:

{ "edl_id": "hook-v1", "title": "Whoops it deleted everything",
  "segments": [
    {"from_word": 880, "to_word": 905, "label": "hook"},
    {"from_word": 0,   "to_word": 120, "label": "setup"}
  ] }

v2: reframe, captions & polish (render-layer, all optional on the EDL)

Styling is configured on the EDL and applied by render: cleanup -> cut -> reframe -> captions/title + loudnorm -> multi-aspect.

{ "edl_id":"clip","title":"...","segments":[...],
  "cleanup":   {"remove_fillers": true, "max_pause": 1.0},
  "reframe":   {"mode":"track","aspect":"9:16","zoom":{"hook_punch":true}},
  "captions":  {"enabled": true, "preset":"karaoke-bold"},
  "title_card":{"text":"AI gave itself all the water","hold_s":3},
  "loudnorm":  true,
  "export_aspects": ["9:16","1:1"] }
  • reframe mode: track (YOLO11n subject-follow + One-Euro smoothing; center fallback), center, pad (blurred bars), none. Needs a visible person for track.
  • captions presets: karaoke-bold (Anton, word-by-word pop), lower-third, minimal-top.
  • cleanup: drops filler words + splits at pauses > max_pause.
  • The clean cut is always at renders/<edl_id>.mp4 (stable audio for verify_clip); styled deliverables at renders/<edl_id>__<aspect>.mp4.
  • New tools: suggest_clips, extract_thumbnail, list_caption_presets, list_reframe_modes.
  • New deps: ultralytics, opencv-python. Bundled font: assets/fonts/Anton-Regular.ttf (OFL).

Learn resources (read these first)

The server exposes MCP learn:// resources that bake in the workflow and the lessons: learn://overview, learn://workflow, learn://hooks, learn://cutting, learn://gotchas. An agent should read learn://overview then learn://workflow before driving the tools.

Setup

Requires: ffmpeg/ffprobe on PATH, an NVIDIA GPU (for the default WhisperX large-v3).

# 1. venv (Python 3.11)
py -3.11 -m venv E:\FlowdotPlatform\short-form-editor-mcp\.venv
$py = "E:\FlowdotPlatform\short-form-editor-mcp\.venv\Scripts\python.exe"

# 2. install: this package, CUDA torch, whisperx, (optional) openai
& $py -m pip install --upgrade pip
& $py -m pip install -e E:\FlowdotPlatform\short-form-editor-mcp
& $py -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121
& $py -m pip install whisperx openai

First transcribe downloads the WhisperX model + the wav2vec2 alignment model. Gotcha: depending on the WhisperX/pyannote version, the VAD model may need a one-time Hugging Face token — set HF_TOKEN in the server env if the first run asks for it. We do not use diarization.

Register in .mcp.json

"short-form-editor": {
  "command": "E:\\FlowdotPlatform\\short-form-editor-mcp\\.venv\\Scripts\\python.exe",
  "args": ["-m", "short_form_editor_mcp"],
  "env": {
    "STT_BACKEND": "whisperx",
    "WHISPERX_MODEL": "large-v3",
    "DEVICE": "cuda",
    "WORKSPACE_ROOT": "E:\\FlowdotPlatform\\short-form-editor-mcp\\workspaces",
    "OPENAI_API_KEY": ""
  }
}

Config (env vars)

var default meaning
STT_BACKEND whisperx whisperx (free, local) or openai (whisper-1; 25 MB file cap)
WHISPERX_MODEL large-v3 model size
DEVICE cuda cuda or cpu
COMPUTE_TYPE float16/int8 CTranslate2 compute type
MIN_SILENCE 0.15 min gap (s) that counts as a clean cut boundary
SNAP_MARGIN 0.08 how far (s) into the silence to place the cut (capped at gap/2)
CROSSFADE_MS 15 per-join audio fade to kill clicks (0 = off)
WORKSPACE_ROOT ./workspaces where project data is stored
OPENAI_API_KEY required only for the openai backend
HF_TOKEN only if WhisperX VAD asks for it

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选