capcut-mcp

capcut-mcp

An MCP server that lets Claude read and edit CapCut desktop draft projects, enabling manipulation of video clips, text, audio, and images with atomic saves and validation.

Category
访问服务器

README

capcut-mcp

An MCP server that lets Claude read and edit CapCut desktop draft projects — add/move/trim/split clips, text, audio, images; set transforms; validate; save. It works by cloning real segment/material templates out of an existing draft (the only reliable way to produce valid CapCut JSON), and it saves atomically with a backup and a validation pass.

Free & open source (MIT). Built by James Aldrin Boncales for editors who want Claude to drive CapCut for them.

Not affiliated with CapCut or ByteDance. CapCut's draft format is proprietary and undocumented; this tool reads/writes it defensively (clone-from-template, backups, validation), but a CapCut update can shift the schema. Keep the backups it makes.

Requirements

  • Node 18+
  • ffmpeg/ffprobe on PATH (used to read media duration/resolution)
  • CapCut desktop (Windows layout assumed; macOS path is auto-detected too)

Configure (env, optional)

  • CAPCUT_DRAFTS_DIR — your CapCut Drafts folder. Auto-detects the standard %LOCALAPPDATA%\CapCut\... (Windows) / ~/Movies/CapCut/... (macOS) locations; set this if your drafts live elsewhere (e.g. a different drive).
  • CAPCUT_TEMPLATE_DRAFT — name of a draft that contains video and text layers, used to harvest templates when the draft you're editing lacks one. Default 0723 is the author's own draft and won't exist on your machine — set this to one of your drafts that has a text layer, or the capcut_add_text tool won't work. (Everything else works without it.)

Install

git clone https://github.com/JmsLdrn/capcut-mcp
cd capcut-mcp
npm install

Then register it in Claude Code — use the absolute path to src/server.js on your machine:

claude mcp add capcut --scope user -- node "/ABSOLUTE/PATH/TO/capcut-mcp/src/server.js"

…or add a project-scoped .mcp.json at your repo root (copy mcp.json.example and edit the paths):

{
  "mcpServers": {
    "capcut": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/capcut-mcp/src/server.js"],
      "env": { "CAPCUT_DRAFTS_DIR": "", "CAPCUT_TEMPLATE_DRAFT": "" }
    }
  }
}

Leave the env values blank to auto-detect, or fill them in (see Configure above). Restart Claude Code; the tools then appear as mcp__capcut__*.

Workflow (important)

  1. Close CapCut on the draft you want to edit. CapCut autosaves on a timer; writing while it's open gets clobbered. capcut_save refuses if CapCut is running or the draft's .locked file is present (override with force: true only if you know it's safe).
  2. Edits are a session: capcut_add_* / capcut_move_* etc. accumulate in memory. Nothing hits disk until capcut_save.
  3. capcut_save writes draft_content.json (+ meta) atomically after making a .mcpbak backup, and runs capcut_validate.
  4. Reopen the draft in CapCut.

All times at the tool boundary are in seconds (converted to CapCut's microseconds internally).

Tools

Tool Purpose
capcut_list_drafts list drafts + duration + lock status
capcut_read_timeline full read: canvas, fps, tracks, every segment
capcut_clone_draft copy a draft (optionally emptied) for a fresh build
capcut_add_video / _image / _audio place media at a time on a track
capcut_add_text text overlay (needs a text template draft)
capcut_add_track new video/audio/text/sticker track
capcut_move_segment change start time / track
capcut_trim_segment change start / duration / source in-point
capcut_split_segment split at a time
capcut_delete_segment remove
capcut_set_props scale / position / rotation / opacity / volume / speed / visibility
capcut_raw_patch advanced deep-merge escape hatch for undocumented ops
capcut_validate overlaps, duplicate ids, missing media
capcut_save / capcut_discard persist / drop the session

Companion skill

A Claude skill ships in skills/capcut-reels/. It teaches Claude the full production pipeline these tools were built for — record → captions (WhisperFlow) → motion graphics (HyperFrames) → probe/render (ffprobe/ffmpeg) → assemble & caption the CapCut draft via this MCP. Copy the capcut-reels folder into your Claude skills directory to install it.

Guardrails

  • Won't save while CapCut is open (autosave clobber protection).
  • .mcpbak backup + atomic temp-then-rename write.
  • Post-edit validation (overlaps, duplicate material ids, layer-order clashes, missing media).
  • New drafts are cloned from a known-good base, never built from an empty object.

Limitations (be honest with these)

  • CapCut's draft format is proprietary and undocumented, and changes between CapCut versions. This server is defensive (clone-from-template, backup, validate) but a CapCut update can still shift the schema — keep the backups.
  • Effects, transitions, animations, and rich text styling are best-effort. The well-understood ops (place/move/trim/split media + basic text + transforms) are solid; anything exotic should go through capcut_raw_patch against a template you've inspected.
  • capcut_add_text needs a draft with a text layer to harvest from (CAPCUT_TEMPLATE_DRAFT).

Architecture

  • src/core.js — pure engine (CapCutDraft class + cloneDraft/listDrafts). Testable without MCP.
  • src/server.js — thin MCP stdio server; declares the tools and calls the core.

License & credits

MIT © 2026 James Aldrin Boncales. Contributions and issues welcome. If this saves you time, a link back to jmsldrn.com is appreciated — not required.

Always keep a copy of important drafts before batch-editing. This software is provided "as is", without warranty.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选