Skip to main content
Glama

shortvideo-toolkit-mcp


English

What It Does

shortvideo-toolkit-mcp packages three practical, standalone short-video production tools into a single Agent Skill + Stdio MCP Server + Unified CLI with zero external MCP SDK dependencies:

#

MCP Tool / CLI Command

Capability

Minimum Requirements

1

tiktok_download / download

Watermark-Free TikTok Batch Downloader & Validator — Login-free tikwm HD API primary + yt-dlp fallback + mandatory ffprobe validation (guarantees positive width, height, duration, and rejects audio-only stubs).

Python 3.9+ (ffprobe recommended, yt-dlp optional)

2

clip_wash / wash

Raw Clip Auto-Washer & Visual Bucketing — Concurrently probes a folder of messy footage, filters out corrupt/wrong-orientation/low-res/too-short clips into clean buckets, generates JSON/CSV reports & 4×4 review contact sheets. Optional Gemini Vision mode packs 16 clips per sheet for semantic subject & overlay filtering.

Python 3.9+ & ffprobe (Pillow optional; GEMINI_API_KEY only for AI sorting)

3

video_matting / matting

Single-Video AI Alpha Matting & Multi-Background Fission — AI foreground segmentation (rembg with CUDA / DirectML / CPU auto-detection) + 3-frame temporal edge smoothing + optional floor contact-shadow preservation. Exports transparent VP9 .webm / ProRes 4444 .mov and batch-composites onto 1..N replacement backgrounds while keeping original audio.

ffmpeg, rembg, opencv-python-headless, onnxruntime, pillow, numpy

0

check_environment / doctor

Runtime Doctor — Checks binaries, Python packages, and GPU providers in one call.

Python 3.9+ (zero dependencies)

One-Click Install for AI Agents

Works out of the box with Antigravity, Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible Agent:

git clone https://github.com/XuLi289/shortvideo-toolkit-mcp.git
cd shortvideo-toolkit-mcp

# Install Agent Skill + run MCP handshake smoke test + print ready-to-paste MCP config
python install.py

# Optional: also install Pillow / yt-dlp / full AI video matting dependencies
python install.py --with-pillow --with-ytdlp
python install.py --with-matting

# Optional: install Skill to another agent (e.g. Claude Code) & auto-register MCP JSON
python install.py --target ~/.claude/skills --mcp-config ~/.cursor/mcp.json

Zero-manual tip: Hand this repo URL or cloned folder directly to your AI Agent and ask it to follow INSTALL_AND_RUN_FOR_AI.md.

MCP Client Configuration Example

{
  "mcpServers": {
    "shortvideo-toolkit": {
      "command": "python",
      "args": ["/absolute/path/to/shortvideo-toolkit-mcp/mcp_server.py"]
    }
  }
}

Quick CLI Examples

# 1. Check local runtime & GPU readiness
python cli.py doctor

# 2. Download watermark-free TikTok clips & validate with ffprobe
python cli.py download \
  --url "https://www.tiktok.com/@creator/video/1234567890" \
  --out-dir "./downloads"

# 3. Wash a raw video folder into clean vertical buckets (zero API keys needed)
python cli.py wash \
  --src-dir "./raw_clips" \
  --out-dir "./washed_pool" \
  --orientation vertical --min-width 720 --min-duration 3 --action copy

# 4. Optional: AI visual washing with custom target & roles (set GEMINI_API_KEY)
python cli.py wash \
  --src-dir "./raw_clips" \
  --out-dir "./washed_ai" \
  --ai-target "Clean product hands-on demo without burned-in subtitles" \
  --ai-roles "closeup,demo,unboxing,lifestyle"

# 5. Cut out a foreground video & composite onto multiple replacement backgrounds
python cli.py matting \
  --src "./foreground_clip.mp4" \
  --bg-dir "./backgrounds" \
  --out-dir "./fission_out"

Environment Variables (All Optional)

  • HTTP_PROXY / HTTPS_PROXY / SVT_PROXY — Proxy URL for downloads or Gemini API calls.

  • GEMINI_API_KEY — Only required if using --ai-target visual classification in clip_wash.

  • SVT_FFMPEG_PATH / SVT_FFPROBE_PATH / SVT_YT_DLP_PATH — Override binary locations if not on PATH.


Related MCP server: CapCut MCP Server

简体中文

项目简介

shortvideo-toolkit-mcp 把短视频运营与素材处理中最常用的三个独立小工具,打包成一套零重型框架依赖的一体化 Agent Skill + 标准 Stdio MCP Server + 命令行工具,脱离任何私有生产环境,开箱即用:

序号

MCP 工具 / CLI 命令

核心功能

最低依赖

1

tiktok_download / download

TikTok 无水印高清批量下载与质检:免登录、免 Cookie,tikwm 高清 API 主通道 + yt-dlp 自动兜底,每条强制 ffprobe 校验分辨率与时长,杜绝只下出纯音频残片。

Python 3.9+(推荐装 ffprobe,yt-dlp 可选)

2

clip_wash / wash

杂乱视频素材自动清洗与分仓:并发 ffprobe 扫全目录,按横竖屏/分辨率/时长/音轨规则一键筛片并自动分仓,输出 JSON/CSV 台账与 4×4 抽帧审片拼图;可选开启 Gemini 视觉分类(16 条拼 1 图极省额度,支持自定义目标商品与分仓角色)。

Python 3.9+ 与 ffprobe(Pillow 可选;仅 AI 分类需 GEMINI_API_KEY)

3

video_matting / matting

单视频 AI 抠图透明导出与多背景换景裂变:rembg 前景抠像(自动优选 CUDA / DirectML / CPU)+ 3 帧时序边缘平滑去闪烁 + 可选地面接触阴影保留;支持输出透明通道 WebM / ProRes 4444 MOV,并批量合成到任意多张新背景图(自动保留原音轨)。

ffmpeg、rembg、opencv-python-headless、onnxruntime、pillow、numpy

0

check_environment / doctor

一键环境体检:秒查本机 ffmpeg/ffprobe/yt-dlp/Python 包和 GPU 加速就绪状态,缺什么给出一行安装命令。

Python 3.9+(零依赖)

让 AI Agent 一键安装使用

完美适配 Antigravity、Claude Code、Cursor、Windsurf、Cline 等所有支持 Skill 或 MCP 的主流 Agent:

git clone https://github.com/XuLi289/shortvideo-toolkit-mcp.git
cd shortvideo-toolkit-mcp

# 默认安装:装好 Agent Skill + 自动跑 MCP 协议握手自检 + 输出可直接粘贴的 MCP 配置
python install.py

# 按需安装可选依赖(拼图 / yt-dlp 兜底 / 完整 AI 视频抠图裂变)
python install.py --with-pillow --with-ytdlp
python install.py --with-matting

# 安装到指定 Agent 目录并自动注册进 MCP 配置文件
python install.py --target ~/.claude/skills --mcp-config ~/.cursor/mcp.json

偷懒用法:直接把本仓库链接或目录丢给你的 AI Agent,让它按 INSTALL_AND_RUN_FOR_AI.md 全自动安装并直接开工即可。

目录结构

shortvideo-toolkit-mcp/
├── README.md                  # 中英双语项目说明
├── LICENSE                    # MIT 开源协议
├── install.py                 # 一键安装器(装 Skill + 装可选依赖 + MCP 自检与注册)
├── INSTALL_AND_RUN_FOR_AI.md  # 给 AI Agent 的自动安装与执行指引
├── mcp_server.py              # 零第三方 SDK 依赖的 Stdio MCP Server
├── cli.py                     # 统一命令行入口
├── shortvideo-toolkit/
│   └── SKILL.md               # 标准 Agent Skill 说明书
└── toolkit/
    ├── common.py              # 跨平台环境探测与媒体信息读取
    ├── tiktok_downloader.py   # 工具 1:无水印下载与质检
    ├── clip_washer.py         # 工具 2:素材规则清洗与可选 AI 视觉分仓
    └── video_matting.py       # 工具 3:AI 视频透明抠图与多背景裂变

免责声明

本工具仅用于合法的个人素材整理、公开样本研究与自创内容后期处理,请遵守目标平台服务条款与版权法规。

Available Tools

4 tools
check_environmentA

Inspect local runtime readiness for ShortVideo Toolkit: detects ffmpeg, ffprobe, yt-dlp, Pillow, OpenCV, rembg, and ONNX GPU providers (CUDA/DirectML/CPU) and returns actionable installation hints for any missing optional component.

Inputs: no named parameters.

clip_washA

Concurrently inspect, filter, and organize a folder of raw video clips into clean buckets. Default mode requires zero API keys and filters by orientation, resolution, duration, size, and audio. Optional AI visual mode (when ai_target_desc and GEMINI_API_KEY are provided) packs 2-frame thumbnails into 4x4 sheets and classifies clips by target subject, text-overlay cleanliness, role, and quality score.

Inputs: out_dir (required), src_dir (required), proxy, action, +12 more.

tiktok_downloadA

Batch download watermark-free HD TikTok (and other short-video) MP4s without login or cookies. Uses tikwm HD API as primary with automatic yt-dlp fallback, and validates every downloaded file via ffprobe (positive width, height, duration, and file size) to guarantee no audio-only stubs.

Inputs: urls (required), out_dir (required), proxy, overwrite, +1 more.

video_mattingB

Extract a clean AI-matted alpha foreground from a single video clip with 3-frame temporal edge smoothing and optional contact-shadow preservation, then export transparent alpha video (VP9 WebM / ProRes 4444 MOV) and/or composite onto 1..N replacement background images while preserving original audio.

Inputs: out_dir (required), src_video (required), model, blur_sigma, +8 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    Four tools each target a clearly distinct phase: environment/dependency inspection, video acquisition (download), foreground matting, and local clip filtering/organizing. An agent can easily pick the right tool without overlap.

    Naming Consistency3/5

    All names use snake_case and are readable, but the verb/noun ordering is inconsistent: check_environment (verb_noun), tiktok_download and clip_wash (noun_verb), video_matting (noun_noun). The pattern is not a predictable single convention.

    Tool Count4/5

    Four tools map cleanly to four distinct toolkit capabilities (setup check, download, matting, clip washing), each substantial. It is on the lean side but well-scoped for a focused toolkit.

    Completeness4/5

    The acquisition→processing→organizing lifecycle is covered (download, matting, clip filtering) plus a readiness check. Minor gaps exist around general transcoding/trimming or merging clips, but core short-video workflows are addressed.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables downloading TikTok videos and photos without watermarks, extracting metadata and analytics, and performing bulk downloads of user profiles via CLI or as an MCP server for AI assistants.
      5
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI coding agents to programmatically assemble vertical videos and manage local CapCut Desktop drafts, including AI background removal, audio mastering to -14 LUFS or Demucs vocal isolation, music auto-ducking, punch zooms, karaoke captions, PiP proof overlays, hook badges, safe-zone linting, proxy previews, and EN→ES cloning/dubbing. It outputs real CapCut draft JSON ready for review and export.
      17
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables extracting video and post metadata, creator feeds, comments, direct media streams, and transcripts from YouTube, TikTok, Instagram, and Threads, with no API keys or logins required for most sources. Combines Faster-Whisper audio transcription with ffmpeg keyframe and carousel OCR so videos that have no captions or consist of screenshots and text slides still yield full text.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables retrieval and analysis of content from YouTube, TikTok, Instagram, and Threads, including metadata, captions, comments, feeds, search results, transcripts, and on-screen text from videos or slides. Supports local stdio and remote HTTP/SSE deployment with optional API keys, Whisper transcription, and Tesseract OCR.
      MIT