Skip to main content
Glama

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)

Related MCP server: capcut-mcp

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.

Available Tools

17 tools
capcut_add_audioC

Add an audio clip at a time on a track.

Inputs: file (required), atSec (required), draft (required), posX, +10 more.

capcut_add_imageC

Add an image at a time on a track.

Inputs: file (required), atSec (required), draft (required), posX, +10 more.

capcut_add_textB

Add a text overlay. Requires a text template (a draft with a text layer; see CAPCUT_TEMPLATE_DRAFT).

Inputs: text (required), atSec (required), draft (required), posX, +5 more.

capcut_add_trackC

Add a new track (video | audio | text | sticker).

Inputs: draft (required), name, type.

capcut_add_videoA

Add a video clip at a time on a track. Session edit; call capcut_save to persist.

Inputs: file (required), atSec (required), draft (required), posX, +10 more.

capcut_clone_draftA

Copy a draft folder to a new name (valid scaffolding). empty:true clears all clips/tracks for a fresh build.

Inputs: base (required), newName (required), empty.

capcut_delete_segmentC

Remove a segment.

Inputs: draft (required), segmentId (required).

capcut_discardA

Drop unsaved session edits and reload the draft from disk.

Inputs: draft (required).

capcut_list_draftsA

List CapCut drafts in /root/Movies/CapCut/User Data/Projects/com.lveditor.draft with duration and lock status.

Inputs: no named parameters.

capcut_move_segmentB

Move a segment to a new start time and optionally another track.

Inputs: atSec (required), draft (required), segmentId (required), trackIndex.

capcut_raw_patchA

Advanced escape hatch: deep-merge a JSON patch into draft_content (undocumented ops). Use with care.

Inputs: draft (required), patch (required).

capcut_read_timelineA

Read a draft: canvas, fps, tracks and every segment (id, media, times, layer). Read-only.

Inputs: draft (required).

capcut_saveA

Write session edits to disk (backs up .mcpbak, validates). Refuses if CapCut is open unless force:true.

Inputs: draft (required), force.

capcut_set_propsC

Set transform / opacity / volume / speed / visibility on a segment.

Inputs: draft (required), segmentId (required), posX, posY, +8 more.

capcut_split_segmentB

Split a segment into two at a timeline time.

Inputs: atSec (required), draft (required), segmentId (required).

capcut_trim_segmentB

Change a segment start / duration / source in-point (seconds).

Inputs: draft (required), segmentId (required), atSec, durSec, +1 more.

capcut_validateB

Check the (in-session) draft for overlaps, duplicate ids/render_index, missing media.

Inputs: draft (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool has a clearly distinct function: listing, reading, cloning, adding different media types, manipulating segments (trim/move/split/delete), setting properties, validating, saving, and discarding. The add_* tools are distinguished by media type, and raw_patch is explicitly an advanced escape hatch.

    Naming Consistency4/5

    Most tools follow a 'capcut_verb_noun' pattern (e.g., list_drafts, add_video, delete_segment), but a few deviate: validate, save, and discard are bare verbs, and raw_patch is adjective_noun. The prefix is consistent, so the inconsistency is minor.

    Tool Count5/5

    17 tools is well-scoped for a video editing server, covering asset insertion, timeline manipulation, session management, and validation without feeling bloated. Each tool serves a necessary role in the editing workflow.

    Completeness4/5

    The surface covers the core lifecycle: reading, cloning, adding assets, editing segments, and saving/validating. Minor gaps exist (e.g., no direct draft deletion, no text content editing, no effect/transition tools), but raw_patch fills advanced needs, so agents can work around these.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers