capcut-mcp

capcut-mcp

An MCP server that reads and builds CapCut projects locally, enabling natural language queries about project contents, missing media, and creation of new edits including beat-synced cuts.

Category
访问服务器

README

capcut-mcp

An MCP server that reads — and builds — CapCut projects on your own machine.

Point Claude at it and ask in plain language: what's in my CapCut projects, is any media missing, make me a 15 second vertical edit of this video cut on the beat. It works on the local draft library CapCut already keeps on disk.

[!WARNING] This is extremely experimental and is not guaranteed to work.

CapCut's draft format is undocumented, changes with the app, and differs between platforms and versions. Everything here was worked out by reading drafts CapCut wrote on one Windows install. A project this generates may fail to open, may open with pieces missing, or may look fine and behave oddly.

Open anything it creates in CapCut and check it before you build on it. Nothing here has been tested against CapCut itself — only against the file format. Treat generated projects as drafts to inspect, not as finished work.

It will not touch projects you already have (see Safety), so the realistic worst case is a project that does not open. But back up work you care about anyway.


What it does

Tool Purpose
capcut_list_projects Every project, newest first — duration, resolution, fps, track count
capcut_read_project One timeline: each track, each segment, its start, length, speed and material
capcut_project_media Source files a project needs, their size, and whether they still exist
capcut_create_project Build a new project from clips laid end to end, each optionally trimmed
capcut_detect_beats Tempo and beat times of any file with audio
capcut_create_beat_edit Build a new project whose cuts land on the beat

Times are in seconds throughout. CapCut stores microseconds internally; the conversion happens in one place so nothing downstream has to think about it.

Install

Requires Node 18+, CapCut installed, and ffmpeg/ffprobe on PATH (used to measure media and to decode audio for beat detection).

git clone https://github.com/<you>/capcut-mcp
cd capcut-mcp
npm install

Register it with Claude Code:

claude mcp add capcut --scope user -- node /absolute/path/to/capcut-mcp/src/index.js

--scope user makes it available in every session. Check it came up:

claude mcp list        # capcut: ... - ✔ Connected

Any MCP client works; the server speaks stdio and nothing else.

Examples

what CapCut projects do I have?

0625      158.8s   1920x1080   2 tracks
0624 (1)  115.3s   1920x1372   1 track
0720        3.4s   1920x1098   1 track

is any of my footage missing?

0720 -> imsobored.mp4   MISSING

A draft stores absolute paths, so moving or deleting a source leaves the edit pointing at nothing and CapCut says so only when you open the project.

make a 16 second vertical edit of that music video, cut on the beat

project   lil-tecca-beat
duration  15.836s across 11 cuts
bpm       166.7  (cut every 4 beats = 1.44s)
canvas    1080x1920

How beat matching works

Decode to mono PCM with ffmpeg, measure how much energy rises between short windows, and treat peaks in that rise as onsets. Then find the tempo by autocorrelation — which beat spacing do the onsets agree with most — and lay a regular grid at that spacing, slid to whichever phase collects the most onset energy.

The grid matters more than the raw onsets. Onsets are uneven: they fire on a vocal, miss a soft kick, double up on a fill. Cutting straight to them looks jittery. A grid locked to the tempo lands musically.

Cut lengths come from the grid; cut contents are sampled evenly across the source, so a short edit surveys the whole video instead of its opening.

Tempo estimation is octave-ambiguous — a 83 BPM track often reads as 166 BPM. It rarely matters for editing, since both give cuts on real beats, but it is why everyNthBeat is the dial to reach for if cuts feel twice as fast as expected.

How creating works

A segment does not merely point at its clip. It also carries extra_material_refs — seven linked materials (speed, canvas, sound channel mapping, vocal separation, animation, placeholder, colour) that must each exist in the pool with matching ids. Synthesising all of that from nothing is how you get a draft that opens to an error instead of a timeline.

So the server clones one of your existing projects as a structural template and rewrites only what describes the media and the timing. Every undocumented field is carried across verbatim from a draft CapCut itself wrote. Each segment gets its own copies of the seven linked materials, so two clips never share a speed object and move together when one is changed.

This is also why you need at least one real project before creating anything — there has to be something to copy the shape from.

Vertical crops

canvas takes a preset (tiktok, reels, shorts, square, youtube) or {width, height}. Clips are scaled to cover the frame rather than fit inside it — left alone, 16:9 footage in a 9:16 canvas sits as a small strip between black bars. 1920x1080 into 1080x1920 lands at scale ≈3.16, keeping the middle third of the width.

The crop is centre-locked. If your subject sits off to one side, that shot loses them; clip.transform in the draft is the lever, and it is not exposed yet.

Safety

  • Only ever creates new project folders. Nothing modifies an existing project. Tests assert the template project is byte-identical afterwards.
  • Refuses to overwrite. A name that already exists is an error, not a merge.
  • Refuses while CapCut is running, because the app holds its open draft in memory and writes it back on exit, which would silently discard new work.
  • Project names are validated before touching disk — anything containing /, \ or .. is rejected, so a bad argument cannot read outside the draft root.
  • Trims that would leave nothing are rejected with the clip's real length.

Where the drafts live

%LOCALAPPDATA%\CapCut\User Data\Projects\com.lveditor.draft\<project>\
  draft_content.json    the timeline: tracks -> segments -> material ids
  draft_meta_info.json  display name and imported media paths
  draft_cover.jpg       thumbnail

Override with CAPCUT_DRAFT_ROOT if CapCut lives somewhere else. Only Windows paths are wired up by default; macOS keeps drafts under ~/Movies/CapCut/User Data/Projects/com.lveditor.draft, which should work by setting that variable, though it is untested.

Known limits

  • Never verified against CapCut itself. The structure is checked thoroughly — every material reference resolves, ids are unique across segments, timings are contiguous, the timeline duration equals the sum of its segments — but "well-formed" and "the app accepts it" are different claims and only the first is tested.
  • One video track. No audio tracks, text, transitions, effects or keyframes.
  • No transitions between cuts, so a beat edit is hard cuts only.
  • Centre crop only.
  • Reads and writes video materials; other material types are passed through from the template untouched.

Licence

MIT.

推荐服务器

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

官方
精选