Skip to main content
Glama
README.md
# capcut-mcp

An MCP server that lets AI agents **read and edit CapCut desktop draft projects** — build viral minimal reels, talking-head jump cuts, auto-subtitles with keyword highlights, motion graphics, 65 virtual camera moves, keyframes with easing curves, masks, chroma key, shadows, procedural shapes/gradients/waves/letterbox, Twixtor speed ramps, beat-synced hits, auto-ducking music, and compound clips, then save atomically with a backup and validation pass.

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

## Requirements
- **Node 18+** (zero extra runtime deps beyond `@modelcontextprotocol/sdk` and `zod`)
- **ffmpeg/ffprobe** on `PATH` (used for media duration/resolution, freeze frames, silence detection, frame inspection, and clip enhancement)
- **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` — optional name of a draft to harvest templates from. Built-in fallback templates are included for video, audio, text, and effect tracks so tools work even on empty drafts.

## Install
```bash
git clone https://github.com/m07o/capcut-mcp
cd capcut-mcp
npm install
```
Register in your MCP client (`mcp.json.example` shows the format):
```json
{
  "mcpServers": {
    "capcut": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/capcut-mcp/src/server.js"],
      "env": { "CAPCUT_DRAFTS_DIR": "", "CAPCUT_TEMPLATE_DRAFT": "" }
    }
  }
}
```

## 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 `.locked` is present.
2. Edits are a **session** 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 to preview and export.

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

## Tools (51)

### Project & Discovery
| Tool | Purpose |
|---|---|
| `capcut_list_drafts` | List drafts + duration + lock status |
| `capcut_read_timeline` | Full read: canvas, fps, tracks, segments, keyframes |
| `capcut_clone_draft` | Copy a draft (optionally `empty:true`) for a fresh build |
| `capcut_set_canvas` | Set aspect ratio (`9:16`, `16:9`, `1:1`, `4:5`, etc.), width/height, fps |
| `capcut_list_presets` | Search built-in CapCut slugs (masks, effects, transitions, animations) |
| `capcut_view_frames` | Extract still JPEG frames via FFmpeg so AI can inspect framing before editing |

### Media, Procedural Shapes, Stickers & Text
| Tool | Purpose |
|---|---|
| `capcut_add_video / _image / _audio` | Place media at a time on a track (with optional `blendMode`) |
| `capcut_add_shape` | Generate crisp PNGs (`solid`, `gradient`, `circle`, `rectangle`, `rounded_rect`, `grid`, `shadow`, `letterbox`, `wave`, `curved_line`, `line`) |
| `capcut_add_text` | Text overlay with bold, italic, stroke, shadow, bg box, curve |
| `capcut_set_text_style` | Update rich text styling, alignment, spacing, curve, stroke, shadow |
| `capcut_add_subtitle` | Import `.srt`/`.vtt` subtitles with styling, keyword highlighting, and entrance animation |
| `capcut_restyle_captions` | Bulk-restyle all caption segments across a track or draft (supports `dryRun`) |
| `capcut_add_sticker` | Add a CapCut sticker by `resourceId`/`stickerId` onto a sticker track |

### Timeline, Talking-Head & Audio Automation
| Tool | Purpose |
|---|---|
| `capcut_add_track` | New `video`, `audio`, `text`, `sticker`, `effect`, or `filter` 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_duplicate_segment` | Duplicate segment with independent material (great for shadow layers) |
| `capcut_freeze_frame` | Extract & place a still freeze-frame from a video timestamp |
| `capcut_delete_segment` | Remove segment |
| `capcut_ripple_edit` | Delete or trim a segment and automatically shift subsequent segments (`rippleAll` optional) |
| `capcut_detect_pauses` | Detect silent pauses in speech using FFmpeg `silencedetect` |
| `capcut_add_video_without_pauses` | One-call talking-head jump cuts with optional alternating `punchInZoom` |
| `capcut_set_audio_fade` | Set `fadeInSec` and `fadeOutSec` on an audio/video segment |
| `capcut_add_background_music` | Loop music across the timeline with fades and automatic volume ducking under speech |

### Motion Graphics, Camera Moves, Effects & Compositing
| Tool | Purpose |
|---|---|
| `capcut_set_props` | Static scale / position / rotation / opacity / volume / speed / blendMode / visibility |
| `capcut_set_crop` | Set 8-point normalized crop margins or reset crop |
| `capcut_add_keyframes` | Keyframes (`position_x/y`, `scale`, `rotation`, `alpha`, `volume`, color) with easing (`linear`, `ease-in`, `ease-out`, `ease-in-out`, `cubic-in`, `cubic-out`, `cubic-ease`, `quad-ease`, `smooth`) |
| `capcut_list_camera_moves` | List all 65 procedural virtual camera move presets |
| `capcut_add_camera_move` | Apply any of the 65 camera moves aimed at a focus point (`focusX`, `focusY`) without black edges |
| `capcut_apply_beat_hits` | Apply beat-synced zoom/shake/flash hits across timestamps |
| `capcut_set_speed_curve` | Apply Twixtor-style velocity speed ramps |
| `capcut_enhance_clip` | Enhance clip sharpness/contrast/denoise via FFmpeg |
| `capcut_add_mask / _remove_mask` | Masks (`split`, `filmstrip`, `circle`, `rectangle`, `heart`, `stars`) with `feather`, `invert`, `roundCorner` |
| `capcut_set_chroma_key / _remove_chroma_key` | Green screen / chroma key with `color`, `intensity`, `shadow` |
| `capcut_set_matting` | Smart Remove Background (AI portrait matting) |
| `capcut_set_color_adjust` | `brightness`, `contrast`, `saturation`, `exposure`, `white`, `shadows`, `black`, `clarity`, `temperature`, `sharpness`, `clarity`, `shadowSilhouette` |
| `capcut_add_effect` | Scene/character effects & filters (`blur`, `chromatic-aberration`, `wide-angle`, etc.) |
| `capcut_add_animation` | Intro (`in`), outro (`out`), or combo (`combo`) animations for video/image/text |
| `capcut_add_transition` | Transitions (`dissolve`, `rgb-glitch`, `radial-blur`, etc.) |
| `capcut_set_bg_blur / _color` | Background blur (`1..4`) or solid background color |
| `capcut_create_compound_clip` | Group 2+ segments into a Compound Clip for unified animation/effects |

### Escape Hatch, Validation & Persistence
| Tool | Purpose |
|---|---|
| `capcut_raw_patch` | Advanced deep-merge JSON patch into `draft_content` |
| `capcut_validate` | Check overlaps, duplicate IDs, layer order, missing media |
| `capcut_save` / `capcut_discard` | Persist atomically (with `.mcpbak`) or drop session |

## Built-in AI Skills (`skills/` — 32 Playbooks)
- **Talking-Head & Subtitles**: `capcut-talking-head-jumpcut`, `capcut-auto-subtitles-and-highlights`, `capcut-pacing-and-captions`, `capcut-j-cuts-and-pacing`
- **Camera & Motion**: `capcut-virtual-camera-moves`, `capcut-smooth-keyframe-motion`, `capcut-bounce-and-physics-keyframes`, `capcut-twixtor-speed-ramps`, `capcut-spin-blur-hard-shake`, `capcut-blend-overlays-and-shake-cuts`
- **Typography & Effects**: `capcut-minimal-typography`, `capcut-7-viral-text-animations`, `capcut-liquid-text-and-glow-outline`, `capcut-glow-lyrics-and-beat-text`, `capcut-counter-and-digit-scroll`, `capcut-text-match-cut-and-spotlight`
- **Scenes & Compositing**: `capcut-reels`, `capcut-minimal-text-scene`, `capcut-minimal-object-scene`, `capcut-minimal-character-scene`, `capcut-ui-mockups-and-cards`, `capcut-popout-card-mask`, `capcut-pen-line-reveal`, `capcut-green-screen-and-shadow`, `capcut-soft-shadow-background`
- **Polish, Audio & Multi-Agent**: `capcut-cinematic-color-grade`, `capcut-cinematic-amv-and-letterbox`, `capcut-troll-phonk-freeze-edit`, `capcut-scene-polish-effects`, `capcut-transitions-and-flow`, `capcut-audio-mix-and-sfx`, `capcut-multi-agent-director`

## License
MIT © 2026 [Mohamed Menisy](https://github.com/m07o)

TDQS

B3/5.0

Scored across 51 tools

Disambiguation3/5

Most tools map to distinct editing operations, but several pairs overlap: add_video vs add_video_without_pauses, add_audio vs add_background_music, add_text vs set_text_style vs restyle_captions, and various segment-edit tools. Detailed descriptions help, yet the sheer size of the surface makes misselection likely.

Naming Consistency5/5

All tool names use a capcut_ prefix followed by snake_case verb_noun phrasing, with no mixed casing or inconsistent verb styles. A few are slightly noun-phrase-like, but the overall pattern is highly predictable.

Tool Count2/5

51 tools is far above the typical 3-15 range and heavy even for a complex video editor. Many are specialized conveniences, so the surface feels sprawling rather than tightly scoped.

Completeness4/5

The set covers draft lifecycle, tracks, segments, text, audio, masks, effects, keyframes, subtitles, validation, save/discard, and raw patching. Minor gaps exist for explicit render/export and some removal operations, but core editing workflows are well covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues