fcpxml-mcp
AI tools for Final Cut Pro. Drive Final Cut Pro from a conversation: read a timeline, run quality control, batch-edit, build rough cuts, manage markers, transcribe, and export to other NLEs. 15 grouped tools covering 102 operations over .fcpxml and .fcpxmld, with an operation journal and undo.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/daredev256--fcp-mcp-server)HTML
<a href="/listings/daredev256--fcp-mcp-server"><img src="/api/listings/daredev256--fcp-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Claude Code (fastest)
claude mcp add fcpxml -e FCP_PROJECTS_DIR=~/Movies -- uvx fcp-mcp-server
Or project-scoped — commit a `.mcp.json` so your whole team gets it:
{
"mcpServers": {
"fcpxml": {
"command": "uvx",
"args": ["fcp-mcp-server"],
"env": { "FCP_PROJECTS_DIR": "/Users/you/Movies" }
}
}
}With media intelligence (beat detection) and transcript editing (local Whisper):
claude mcp add fcpxml -e FCP_PROJECTS_DIR=~/Movies -- uvx --from "fcp-mcp-server[intelligence,transcribe]" fcp-mcp-server
Claude Desktop
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
{
"mcpServers": {
"fcpxml": {
"command": "uvx",
"args": ["fcp-mcp-server"],
"env": { "FCP_PROJECTS_DIR": "/Users/you/Movies" }
}
}
}Where the timeline draws
`view` returns a timeline an MCP Apps host draws inline (`ui://fcp/timeline`) from the result's structured payload. Every other client gets the text: a summary line and the clips in record order (since 0.34 the JSON, thumbnails and all, rides as `structuredContent` and stays out of the text: 609 characters for a five-clip cut, where 0.33 sent 36,701). `preview` returns images and an MP4 path everywhere. Checked 2026-11-12; a host listed by its vendor but not yet captured here says so.
| Host | What you get | Source | |---|---|---| | Claude Desktop | the timeline, inline | listed by the [MCP Apps overview](https://modelcontextprotocol.io/extensions/apps/overview); **not verified in Claude Desktop** for this release (the capture steps are in [`scripts/capture-claude-desktop.md`](scripts/capture-claude-desktop.md)) | | Claude on the web (claude.ai) | the timeline, inline | listed by the MCP Apps overview; not captured here | | VS Code GitHub Copilot, Microsoft 365 Copilot, Goose, Postman, MCPJam, Archestra.AI | the timeline, inline | listed by the MCP Apps overview; not captured here | | `ext-apps` basic host (the reference host) | the timeline, inline, with Inspect and Find calling back into the server | run here on 2026-11-12 against 0.30.0 | | Claude Code | text: the summary and the clip list; `preview` images | Claude's [MCP Apps quickstart](https://claude.com/docs/connectors/building/mcp-apps/quickstart): "Claude Code calls the tool as text and doesn't render the UI" | | ChatGPT | unconfirmed | not named on the MCP Apps overview | | any other MCP client | text | |
On `mcp` 1.x the tool carries `_meta.ui` and the resource is served, but the SDK cannot advertise the extension in the handshake; a host that insists on it needs `mcp` 2.x.
From source (contributors)
git clone https://github.com/DareDev256/fcp-mcp-server.git cd fcp-mcp-server pip install -e . # then point your MCP client at: python /path/to/fcp-mcp-server/server.py
Use It
Export XML from Final Cut Pro (`File → Export XML…`), open your MCP client, and ask it to work with your timeline.
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/plugin.json · Manifest · 21 lines
- {
- "name": "fcpxml-mcp",
- "displayName": "fcp-mcp-server",
- "version": "0.35.0",
- "description": "AI tools for Final Cut Pro. Drive Final Cut Pro from a conversation: read a timeline, run quality control, batch-edit, build rough cuts, manage markers, transcribe, and export to other NLEs. 15 grouped tools covering 102 operations over .fcpxml and .fcpxmld, with an operation journal and undo.",
- "author": {
- "name": "James Olusoga",
- "url": "https://github.com/DareDev256"
- },
- "license": "MIT",
- "homepage": "https://github.com/DareDev256/fcp-mcp-server",
- "repository": "https://github.com/DareDev256/fcp-mcp-server",
- "keywords": [
- "final-cut-pro",
- "fcpxml",
- "video-editing",
- "post-production",
- "nle",
- "macos"
- ]
- }
README.md · README · 1,312 lines
- <img src="docs/assets/logo-small-400.png" width="72" height="72" alt="">
- # AI tools for Final Cut Pro: fcp-mcp-server
- **Edit Final Cut Pro by talking to Claude, and watch the cut change.**
- Reads and writes FCPXML, no plugin, no patch
- [](https://pypi.org/project/fcp-mcp-server/)
- [](https://github.com/DareDev256/fcp-mcp-server/actions/workflows/test.yml)
- [](LICENSE)
- Python 3.10+ · Final Cut Pro for Mac 10.4 to 12.4 ([compatibility](#compatibility))
- ```bash
- claude mcp add fcpxml -e FCP_PROJECTS_DIR=~/Movies -- uvx fcp-mcp-server
- ```
- Then `File → Export XML…` in Final Cut Pro, and ask Claude to work on the file.
- [](docs/assets/hero-watch-claude-cut.mp4)
- Staged close-up of the real app's results · [unedited recording →](docs/assets/hero-unedited-recording.mp4)
- **You:** Cut the rest between sets, mark every lift, and put B-roll over the
- long set.
- **Claude**, on four clips already imported with `generate · import_edl_json`:
- <!-- hero-calls: the calls demo/hero/build.py records, in its order -->
- 1. `view · view_timeline` draws the timeline inline (`ui://fcp/timeline`)
- 2. `edit · remove_media_silence` cuts the rests out of the long squat set
- 3. `mark · batch_add_markers` puts a marker on each lift
- 4. `gen · gen_quote` prices the B-roll under the per-call cap; nothing runs
- until `confirm=true`
- 5. `gen · gen_broll` lays the clip on lane 1 over the long set
- 6. `organize · history` lists every journaled output, each one undoable
- <!-- /hero-calls -->
- *What is real: the timeline is the `ui://fcp/timeline` app as the server
- serves it, drawing the real `view_timeline` results of the real calls above,
- and every change is the app's own animation from one result to the next. What
- is composed: the stage (only the view's ruler and lanes, drawn large on
- black), the captions, the timing, the empty beat before the first call (the
- app is handed the imported cut with its clips taken out, so they leave) and
- the camera's push onto each edit. The
- footage is the author's own gym session (its audio is a test tone, so the
- rests are real silence), and the B-roll provider is mocked: the clip is named
- "B-roll (mocked)" and carries a MOCK badge. The
- [unedited recording](docs/assets/hero-unedited-recording.mp4) is the same
- run (the same results, notes and thumbnails, checked by a test) with the app
- inside a chat client. [MP4](docs/assets/hero-watch-claude-cut.mp4),
- [poster](docs/assets/hero-still.png), recorded with
- [`demo/hero/build.py`](demo/hero/build.py).*
- **See it.** `view` returns the timeline as exact rational-time JSON, and a
- host with MCP Apps draws it inline, like Final Cut's timeline: an overview of
- the whole cut, filmstrips with their waveforms, Final Cut's role colours, a glyph
- per marker kind, a playhead that snaps to cuts, buttons that call the other
- tools.
- **Cut it.** 15 grouped tools, 102 operations: trims, splits, silence removal,
- markers from transcripts and beats, rough cuts, keyframes and speed ramps,
- transcript edits, cross-NLE export, and a push into a running Final Cut Pro.
- **Trust it.** Every write is journaled with its sha256 and can be undone.
- `deliver` refuses an unreviewed cut, `expected_sha256` refuses a file that
- changed under the model, and generation is quote-then-confirm under a
- per-call cap. 182 adversarial-input security tests, `defusedxml` everywhere,
- sandboxed writes, no private APIs, and a [disclosure channel](SECURITY.md).
- ---
- ## Proof
- 
- *Real v0.25.0 output against a running copy of Final Cut Pro. A ten clip
- timeline is read back off the document, a marker is placed on every cut, and
- dialogue, music and effects roles are assigned across the clips. Final Cut is
- open on the left the whole time and is never touched by hand. Screen recorded
- from [`demo/session.sh`](demo/session.sh), which calls the same handlers an MCP
- client calls; each import is verified by polling Final Cut until the project
- appears, so a delivered Apple event is never reported as a landed import.
- The earlier terminal only demo is still at `docs/assets/demo.gif`.
- Re-record it with `vhs demo/demo.tape`; the media is synthesised by ffmpeg at
- run time, so there is no fixture to keep.*
- ## Keyframes and speed curves
- Contributed by [@travisoa](https://github.com/travisoa) in
- [#26](https://github.com/DareDev256/fcp-mcp-server/pull/26): the `inspect`
- and `edit` groups include five video/audio animation actions and three speed
- curve actions, imported into Final Cut Pro 12.4 without warnings. See
- [keyframe usage](docs/keyframes.md) for installation and animation, and
- [speed curves](docs/retiming.md) for holds, sampled ramps, ripple and reset.
- ## Quick Start
- ### Claude Code (fastest)
- ```bash
- claude mcp add fcpxml -e FCP_PROJECTS_DIR=~/Movies -- uvx fcp-mcp-server
- ```
- Or project-scoped — commit a `.mcp.json` so your whole team gets it:
- ```json
- {
- "mcpServers": {
- "fcpxml": {
- "command": "uvx",
- "args": ["fcp-mcp-server"],
- "env": { "FCP_PROJECTS_DIR": "/Users/you/Movies" }
- }
- }
- }
- ```
- With media intelligence (beat detection) and transcript editing (local Whisper):
- ```bash
- claude mcp add fcpxml -e FCP_PROJECTS_DIR=~/Movies -- uvx --from "fcp-mcp-server[intelligence,transcribe]" fcp-mcp-server
- ```
- ### Claude Desktop
- Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
- ```json
- {
- "mcpServers": {
- "fcpxml": {
- "command": "uvx",
- "args": ["fcp-mcp-server"],
- "env": { "FCP_PROJECTS_DIR": "/Users/you/Movies" }
- }
- }
- }
- ```
- ### Where the timeline draws
- `view` returns a timeline an MCP Apps host draws inline (`ui://fcp/timeline`)
- from the result's structured payload. Every other client gets the text: a
- summary line and the clips in record order (since 0.34 the JSON, thumbnails
- and all, rides as `structuredContent` and stays out of the text: 609
- characters for a five-clip cut, where 0.33 sent 36,701). `preview` returns
- images and an MP4 path everywhere. Checked 2026-11-12; a host listed by its
- vendor but not yet captured here says so.
- | Host | What you get | Source |
- |---|---|---|
- | Claude Desktop | the timeline, inline | listed by the [MCP Apps overview](https://modelcontextprotocol.io/extensions/apps/overview); **not verified in Claude Desktop** for this release (the capture steps are in [`scripts/capture-claude-desktop.md`](scripts/capture-claude-desktop.md)) |
- | Claude on the web (claude.ai) | the timeline, inline | listed by the MCP Apps overview; not captured here |
- | VS Code GitHub Copilot, Microsoft 365 Copilot, Goose, Postman, MCPJam, Archestra.AI | the timeline, inline | listed by the MCP Apps overview; not captured here |
- | `ext-apps` basic host (the reference host) | the timeline, inline, with Inspect and Find calling back into the server | run here on 2026-11-12 against 0.30.0 |
- | Claude Code | text: the summary and the clip list; `preview` images | Claude's [MCP Apps quickstart](https://claude.com/docs/connectors/building/mcp-apps/quickstart): "Claude Code calls the tool as text and doesn't render the UI" |
- | ChatGPT | unconfirmed | not named on the MCP Apps overview |
- | any other MCP client | text | |
- On `mcp` 1.x the tool carries `_meta.ui` and the resource is served, but the
- SDK cannot advertise the extension in the handshake; a host that insists on
- it needs `mcp` 2.x.
- ### From source (contributors)
- ```bash
- git clone https://github.com/DareDev256/fcp-mcp-server.git
- cd fcp-mcp-server
- pip install -e .
- # then point your MCP client at: python /path/to/fcp-mcp-server/server.py
- ```
- ### Use It
- Export XML from Final Cut Pro (`File → Export XML…`), open your MCP client, and ask it to work with your timeline.
- ---
- ## Why This Exists
- After a decade directing music videos (Chief Keef, Migos, Masicka), I noticed the same editing bottlenecks on every project: counting cuts manually, extracting chapter markers one by one, hunting flash frames by scrubbing, building rough cuts clip by clip.
- These are batch operations that don't need visual feedback. Export the XML, let Claude handle the tedium, import the result. That's the entire philosophy.
- ---
- ## See It In Action
- ```
- You: "Run a health check on my wedding edit"
- Claude: ✓ Analyzed WeddingFinal.fcpxml
- ├─ 247 clips · 42:18 total · 24fps · 1920×1080
- ├─ 3 flash frames detected (clips 44, 112, 198)
- ├─ 2 unintentional gaps at 12:04 and 31:47
- ├─ 14 duplicate source clips
- └─ Health score: 72/100
- You: "Fix the flash frames and gaps, then add chapter markers from
- this transcript"
- Claude: ✓ Extended adjacent clips to cover 3 flash frames
- ✓ Filled 2 gaps by extending previous clips
- ✓ Added 18 chapter markers from transcript
- → Saved: WeddingFinal_modified.fcpxml
- ```
- Import the modified XML back into Final Cut Pro. Every change is non-destructive — your original file is never touched.
- ---
- ## What Claude Actually Sees
- This is the magic trick. When you export XML from Final Cut Pro, your timeline becomes structured data that Claude can reason about:
- ```xml
- <!-- What FCP exports -->
- <asset-clip ref="r2" offset="342/24s" name="Interview_A"
- start="120s" duration="720/24s" format="r1">
- <marker start="48/24s" duration="1/24s" value="Key quote"/>
- <keyword start="0s" duration="720/24s" value="Interview"/>
- </asset-clip>
- ```
- ```python
- # What Claude works with (after parsing)
- Clip(
- name="Interview_A",
- offset=TimeValue(342, 24), # timeline position: 14.25s
- start=TimeValue(120, 1), # source in-point: 2:00
- duration=TimeValue(720, 24), # 30 seconds
- markers=[Marker(value="Key quote", start=TimeValue(48, 24))],
- keywords=["Interview"]
- )
- ```
- Every time value stays as a rational fraction — `720/24s`, not `30.0` — so trim, split, and speed operations have **zero rounding error** across any frame rate, including the NTSC-fractional ones. A broadcast rate is carried as the exact rational it is (23.976 is `24000/1001`, not a decimal), never as a truncated integer. Comparisons use cross-multiplication (`a/b < c/d` → `a*d < c*b`) to stay in integer-land end to end. Denominators are always normalized to positive values at construction, so sign lives on the numerator and cross-multiplication is always correct. Addition and subtraction share a single `_binop()` code path that handles same-denominator fast paths and LCM alignment in one place.
- ---
- ## How It Works
- ```
- ┌──────────┐ ┌──────────────────────────────┐ ┌──────────┐
- │ Final Cut│ │ parser.py → Python objects │ │ Final Cut│
- │ Pro │─XML─>│ writer.py → Modify & save │─XML─>│ Pro │
- │ │ │ rough_cut.py→ Generate new │ │ │
- └──────────┘ │ diff.py → Compare │ └──────────┘
- │ export.py → Resolve / FCP7 │
- └──────────────────────────────┘
- ▲
- Claude Desktop / MCP client
- ```
- 1. **Export from FCP** — `File → Export XML...`
- 2. **Ask Claude** — analyze, edit, generate, QC, export
- 3. **Import back** — `File → Import → XML`
- ### What This Is NOT
- - **Not a plugin** — it doesn't run inside Final Cut Pro
- - **Not for creative calls** — color, framing, motion still need your eyes
- > **New in v0.9 — Live Mode.** The server can now *push* an FCPXML straight
- > into the running Final Cut Pro with zero clicks, using Apple's official Open
- > Document event — no XML re-import step. See [Live Mode](#live-mode-macos) below.
- ---
- ## Live Mode (macOS)
- XML mode is offline and portable; **Live mode** drives a running Final Cut Pro
- through Apple's sanctioned surfaces — no patched binary, no private APIs, no
- accessibility scripting. Two tools, both verified end-to-end against FCP 12.2:
- | Tool | What it does |
- |------|--------------|
- | **`push_to_fcp`** | Sends an FCPXML file into FCP with zero clicks (Open Document Apple event). Injects `<import-options>` (library location, copy/link assets, suppress warnings), launches FCP if needed, and never mutates your original — flat files get an options-injected copy. |
- | **`list_fcp_libraries`** | Enumerates FCP's open libraries → events → projects via the read-only AppleScript dictionary. |
- ```
- You: "Build a rough cut from my Interview clips and push it into Final Cut"
- Claude: ✓ Generated RoughCut.fcpxml (8 clips, 0:54)
- ✓ Pushed into Final Cut Pro → library "ProjectX", event 2026-06-11
- → Open Final Cut Pro to keep editing
- ```
- **The asymmetry you must know:** Apple makes *import* scriptable but offers **no
- programmatic export** — to pull your current timeline back out for further AI
- work, you still run `File > Export XML` yourself. Live mode pushes; round-trips
- come back through the XML tools.
- Notes (all live-verified): pass a `library_location` ending in `.fcpbundle` for
- a true zero-click import (a new path is auto-created); omitting it makes FCP
- show a modal library picker that blocks until you answer. First use triggers a
- one-time macOS Automation permission prompt for your terminal/MCP host. Since
- v0.35.0 that prompt no longer blocks a push: if Final Cut does not answer
- Apple Events within 10 seconds, the reply quotes the waiting prompt and the
- push goes through Launch Services' `open` instead (no grant needed, no
- picker), then proves the import from the library on disk. Each media file
- keeps one asset uid, so revised versions of a cut can be pushed into the same
- library one after another (Final Cut refuses a file it already holds under a
- different uid). The
- [capability audit](docs/CAPABILITY-AUDIT-2026-06.md) maps the full surface and
- the optional SpliceKit/CommandPost bridges planned for v1.0.
- ---
- ## The Round Trip
- Final Cut Pro has a fully scriptable **import** and **no programmatic export** —
- verified unchanged across FCP 11.0 → 12.2. So the loop closes on exactly one
- keystroke, and everything either side of it is automated:
- ```
- watch_start ← once per session (or set FCP_WATCH_DIR)
- ↓
- edit / generate / mark ← the change
- ↓
- preview_check ← SEE it. Reads the media, not the XML
- ↓
- deliver.push_to_fcp ← zero-click import (or FCP_MCP_AUTOPUSH=1)
- ↓
- Cmd-E in Final Cut Pro ← the one manual step Apple leaves you
- ↓
- watch_pull ← detected and diffed against the last export
- ```
- **`preview_check` is the part that matters.** The `preview://` resource and
- `preview_timeline` both draw from the XML — they show what was *written*, so a
- fixed flash frame and a broken one read identically through them. `preview_check`
- samples the source media into a filmstrip over an audio waveform. It is the
- difference between a tool reporting success and you knowing the cut is right.
- If you have SpliceKit or CommandPost installed, `watch_start` says so. This
- server **does not call either one** — their RPC signatures have not been verified
- against a live install, and it never patches or injects anything. That is why it
- runs on a managed Mac and survives an FCP update.
- ---
- ## When To Use This
- | Good For | Not Ideal For |
- |----------|---------------|
- | Batch marker insertion (100 chapters from a transcript) | Fine-tuning cuts (faster directly in FCP) |
- | QC before delivery (flash frames, gaps, duplicates) | Colour, framing and motion (nothing here grades) |
- | Data extraction (EDL, CSV, chapter markers) | Sound mixing beyond stems and role splits |
- | Template generation (rough cuts from tagged clips) | Anything needing a scrub through the actual cut |
- | Automated assembly (montages from keywords + pacing) | |
- | Timeline health checks (validation, stats, scoring) | |
- | Logging and search before the edit (scenes, transcript, shot search) | |
- **Client notes or Frame.io comments to place?** [frameio-to-final-cut-pro](https://github.com/DareDev256/frameio-to-final-cut-pro) (Cut Review, built on this server's parser) writes them into the cut as Final Cut to-do markers on the right clips, then shows which notes the recut touched.
- **Generating b-roll, inserts or title plates with AI?** The [Ultimate Image & Video Prompt Generator](https://prompts.tdotssolutionsz.com) builds the prompt for Veo, Kling, Seedance or Nano Banana, and its [face blur](https://prompts.tdotssolutionsz.com/blur-face-in-photo) cleans a still on your device before it goes in the cut.
- ---
- ## How It Compares
- Three projects have connected AI agents to Final Cut Pro. They make different trade-offs:
- | | **fcp-mcp-server** (this) | [SpliceKit](https://github.com/elliotttate/SpliceKit) | [CommandPost](https://commandpost.fcp.cafe/) |
- |---|---|---|---|
- | Approach | Parses/writes FCPXML + official Apple events only | Patches FCP's binary to expose internal APIs | Accessibility scripting + Lua |
- | Raw live control | Push-to-FCP, library inspection | Deepest (full internal API) | Deep (UI-level) |
- | Survives FCP updates | **Yes — no patching** | Re-patch per FCP version | Mostly |
- | Works on managed/corporate Macs | **Yes** | No (requires binary patching) | Varies (Accessibility perms) |
- | Works without FCP installed | **Yes** (pure XML mode) | No | No |
- | MCP server | **Yes, active** (this repo) | Yes (last release v3.3.9, 2026-08-29) | Planned, [PR unmerged](https://github.com/CommandPost/CommandPost/pull/3514) |
- | Requires | Python 3.10+ | Patched FCP binary | CommandPost app |
- The editing apps' own makers, checked 2026-11-12: DaVinci Resolve 21.1 ships
- a native MCP server ([Blackmagic's 21.1 notes](https://www.blackmagicdesign.com/support/content/readme/baf7c071c0524fbf8ccc961925c9f443),
- updated 2026-09-08; reported as Studio only by secondary sources). Adobe says
- MCP integrations come to Creative Cloud customers in early 2027
- ([Adobe, 2026-11-10](https://blog.adobe.com/en/publish/2026/11/10/explore-new-ways-create-across-creative-cloud-adobe-firefly-while-advancing-craft-precision-choice-control)).
- Apple ships no MCP and no new automation surface for Final Cut Pro through
- 12.4 ([release notes](https://support.apple.com/en-us/102825)), so FCPXML and
- Apple events remain the sanctioned way in.
- SpliceKit's runtime depth is genuinely impressive — if you're on your own Mac and comfortable patching FCP, it can do things XML never will. This project stays on the no-patch side so it runs anywhere, survives every FCP update, and can be trusted with client libraries. Full ecosystem analysis: [capability audit](docs/CAPABILITY-AUDIT-2026-06.md).
- ---
- ## Prompt Cookbook
- Copy-paste these into Claude Desktop. Each one maps to a real tool chain under the hood.
- **Analysis**
- ```
- "Give me a full breakdown of ProjectX.fcpxml — clips, duration, frame rate, markers, everything"
- "Show me pacing analysis for my timeline — where are the slow sections?"
- "Export an EDL and CSV of all clips with timecodes"
- ```
- **QC & Fixes**
- ```
- "Run a health check on my timeline and fix anything under 2 frames"
- "Find all gaps and flash frames, then auto-fix them"
- "Are there any duplicate source clips I can consolidate?"
- ```
- **Markers & Chapters**
- ```
- "Add chapter markers from this transcript: [paste transcript]"
- "Import markers from my-subtitles.srt onto the timeline"
- "List all markers and export them as YouTube chapter timestamps"
- ```
- **Generation**
- ```
- "Build a 60-second rough cut from clips tagged 'Interview' — medium pacing"
- "Generate a montage from all B-roll clips with accelerating pacing"
- "Create an A/B roll: Interview_A as primary, B-roll cuts every 8 seconds"
- ```
- **Cross-NLE & Reformat**
- ```
- "Export this timeline for DaVinci Resolve"
- "Convert to FCP7 XML so I can open it in Premiere"
- "Reformat my 16:9 timeline to 9:16 for Instagram Reels"
- ```
- ### Under the Hood
- When you say *"Run a health check on my wedding edit"*, Claude chains these tools:
- ```
- analyze_timeline → stats, frame rate, resolution
- detect_flash_frames → clips under threshold duration
- detect_gaps → unintentional silence/black
- detect_duplicates → repeated source media
- validate_timeline → structural health score (0-100)
- ```
- Each tool returns structured text that Claude synthesizes into the summary you see. No magic — just batch XML queries that would take 20 minutes by hand.
- ### Music videos and connected clips
- A music video is usually built by laying an audio bed and hanging every visual
- off it as a connected clip, so the spine holds one `<gap>` and the entire edit
- lives on lanes. `snap_to_beats` and `detect_flash_frames` work on that shape:
- snapping runs lane by lane, does not ripple the clips after the one it moves,
- skips (and names) any move that would collide with a neighbour in the same
- lane, and leaves the audio bed alone unless you pass `include_audio_lanes`.
- It reports cuts considered, moved, already on a beat, out of reach, and
- skipped — so "nothing moved" is something you are told rather than something
- you discover in Final Cut.
- `reorder_clips`, `rapid_trim`, `fix_flash_frames` and `fill_gaps` are still
- primary-storyline only.
- ---
- ## Pre-Built Prompts
- Select these from Claude's prompt menu (⌘/) — they chain multiple tools automatically.
- | Prompt | What It Does | Grouped calls it drives |
- |--------|-------------|-------------------------|
- | **qc-check** | Full quality control — flash frames, gaps, duplicates, health score | `diagnose` → `validate_timeline`, `detect_flash_frames`, `detect_gaps`, `detect_duplicates`; then `edit` → `fix_flash_frames`, `fill_gaps` |
- | **youtube-chapters** | Extract chapter markers formatted for YouTube descriptions | `inspect` → `list_markers`, `analyze_pacing` |
- | **rough-cut** | Guided rough cut — shows clips, suggests structure, generates | `inspect` → `list_library_clips`, `list_keywords`; then `generate` → `auto_rough_cut` |
- | **timeline-summary** | Quick overview — stats, pacing, keywords, markers, assessment | `inspect` → `analyze_timeline`, `analyze_pacing`, `list_keywords`, `list_markers` |
- | **cleanup** | Find and auto-fix flash frames and gaps | `diagnose` → `validate_timeline`; then `edit` → `fix_flash_frames`, `fill_gaps` |
- Every call takes the grouped form — the tool name is the group, and the
- operation goes in `action`:
- ```json
- { "action": "validate_timeline", "args": { "filepath": "/path/to/project.fcpxml" } }
- ```
- ---
- ## Tools
- As of v0.19.0, the MCP tool list Claude sees by default is **15 grouped
- verbs**, not 102 flat tool names:
- | Group | Covers |
- |-------|--------|
- | `inspect` | Read-only understanding — stats, clips, markers, keywords, EDL/CSV, pacing, keyframes |
- | `diagnose` | Finding problems — flash frames, gaps, duplicates, health score |
- | `edit` | Changing clips — markers, trim, reorder, transitions, speed, split, silence removal, keyframes |
- | `mark` | Markers and chapters — batch add, SRT/VTT import, beat import |
- | `generate` | Building new structure — rough cuts, montages, A/B roll, templates |
- | `transcript` | Local Whisper transcription and transcript-driven cuts; `transcript_pack` puts the whole shoot on one page; `backend: elevenlabs` opts into speaker labels and audio events (audio leaves the machine) |
- | `deliver` | Getting the timeline out — NLE export, reformat, relink, push-to-FCP |
- | `preview` | **Seeing** the edit — a 720p proxy (timecode and names burned in on request), a labelled contact sheet of every clip, and a filmstrip+waveform check read from the SOURCE MEDIA; every picture comes back inline |
- | `watch` | Closing the round-trip — notice the operator's Cmd-E export and diff it against the last one |
- | `index` | The analysis cache — status with its age, warm every source in a timeline, clear. Nothing depends on it; `FCP_MCP_INDEX=off` and every tool still answers, only slower |
- | `scenes` | Shot boundaries from the pixels — list cuts per clip in source and timeline time, drop a marker on each, or split the clips there. PySceneDetect when installed, ffmpeg otherwise |
- | `organize` | Library housekeeping — bulk keywords, ratings and roles over a clip selection; `organize_auto` proposes keywords from captions and transcripts; `history` reads the operation ledger and `undo` moves the last outputs aside (never deletes) |
- | `find` | "Find the shot where…" — a router over transcript words, metadata and offline vision captions that names the tier on every hit; `find_index` warms every source; `find_to_timeline` assembles the hits into a selects reel |
- | `view` | **See the cut inline** — `view_timeline` returns the timeline as an exact rational-time payload that MCP Apps hosts render as an interactive timeline (`ui://fcp/timeline`); `view_clip` is the inspect button. Read-only |
- | `gen` | **Generative fill behind a money gate** — `gen_quote` prices a job (fal Kling/Wan, Gemini Omni Flash; Runway/Luma honest stubs); `gen_fill_gap` / `gen_broll` / `gen_extend_clip` refuse without `quote_id` + `confirm=true`, a key, and a price under `FCP_MCP_GEN_MAX_USD`; the result is ffprobed, attached as a `generated` lane clip with a marker, DTD-checked and journaled |
- Each call has the same shape: `{"action": "trim_clip", "args": {...}}`. The
- `action` is one of the 102 operation names below; `args` is whatever that
- tool always took. The group dispatches straight into the same handler — the
- behavior is identical, only the schema Claude sees up front is smaller. An
- unknown or cross-group action returns an error listing the valid actions for
- that group, so a wrong guess is recoverable in one turn.
- **Grouping is what's advertised, not what's callable.** `call_tool` resolves
- every one of the 102 operation names from a handler registry that doesn't care
- what `list_tools` chose to show — an existing MCP config that calls `trim_clip`
- directly keeps working with no changes. If you'd rather also see the flat tool
- schemas (e.g. for debugging, or a client that doesn't like the grouped shape),
- set:
- ```bash
- FCP_MCP_LEGACY_TOOLS=1
- ```
- This advertises the 71 flat schemas alongside the 15 groups — 86 tools in
- total. The 31 operations that were born as group actions (`preview`, `watch`,
- `index`, `scenes`, `organize`, `find`, plus `import_edl_json`) have no flat
- schema and are reached through their group.
- The flat tools will not be removed before a 1.0 release.
- ### See the timeline before you touch it
- Reading the `preview://<path>` MCP resource (any FCPXML path the server can
- already reach) returns the `view` app below with the timeline inlined, served
- as `text/html`: the same lanes, ruler, markers and timecodes, drawn at once in
- any browser or resource viewer with no host and no fetch. Outside an MCP Apps
- host it is read only; the edit buttons wait for one. (Until 0.32 this was a
- separate static render; there is now one timeline picture.)
- 
- *A 30-second gym-session cut (`demo/fixtures/gym_session.py`: the author's own
- footage, with synthesised tones for sound), drawn from its FCPXML and its
- media at 1440 px, dark: the whole cut in the track, every clip named inside,
- the filmstrip over each clip's waveform band (one -60..0 dBFS scale), the
- 1-frame flash before Press in red, the 0.5 s cross dissolve over the cut into
- Finish. `scripts/readme_timeline.py` refuses to save it when a clip has no
- filmstrip or waveform or a marker is missing.*
- ### Proof you can read (v0.32.0)
- Every picture the preview tools make carries the edit's names, timecodes and
- cuts, drawn by the server (one bundled bitmap font, no Pillow, no ffmpeg
- `drawtext`), and comes back as an MCP image block beside its path, so the
- model reads the cut instead of being told about it. Each one is sized for
- Claude's vision input: long edge at most 1,568 px and at most 1,568 patches of
- 28 px ([vision docs](https://platform.claude.com/docs/en/build-with-claude/vision),
- "Resolution and token cost", read 2026-11-13), capitals at least 14 px tall
- where they are seen, at most 12 frames a page. Lengths are whole frames
- everywhere they add up (`121f`): a start plus a length is the next start.
- Ranges are in-out with the out-point exclusive, as Final Cut's are, and the
- length after them (`00:00:05:01–00:00:06:11 · 34f`). One colour rule on
- every picture: cyan text is a record time and cyan marks are the cut;
- source times are white or grey; red is a failure.
- Below, the same calls on the author's own gym session, 0.31.0 above each
- picture and 0.32.0 under it.
- **`preview_sheet`**: every video clip, connected ones badged with their lane
- (`#5 L1`) and saying what they play over (`over #4`), each with its length,
- record timecode and source in-point (the three takes of one lift told
- apart), the dissolve as a bowtie in the gutter on its cut and a `dissolve
- 12f in` line; one red badge per flash, as diagnose counts it, on the card
- whose picture flashes (`flash 1f 00:00:20:03 · src 00:00:17:23`), the clip
- that ends early saying so (`ends 1f before #6`) and two cards that show the
- same frames saying that too (`dup 66f with #5`); and a header with the
- duration, frame rate, clip count and the file's `sha256` prefix. `layout: "phone"` draws two columns for a
- 390 px screen (shown here); a page that does not hold every clip says where
- the rest are.
- 
- **`preview_check`**: the source media in two bands, each its frames over its
- own ruler and its own waveform on that band's time axis, as Final Cut stacks
- a filmstrip over a waveform; ruler labels hang from their ticks. With
- `filepath`, what the edit removed is dimmed and drawn as a grey bar on the
- ruler, the cut's out-point is marked on its band and its in-point on its
- own, and under a rule, off the band grid, the join as played: the last and
- first kept frames side by side, each captioned with where it plays and what
- it is in the file (`rec 00:00:10:00` over `src 00:00:05:00`), the removed
- range with its length and how much of the silence the edit kept each side,
- read from the edit. The waveform is rectified, RMS over peak in dB, with 0,
- -20 and -40 dB labelled at the band's edge, each label centred on its tick,
- and the dashed line labelled with the threshold the silence detector used
- (`-40 silence`); silences are named with their length (and, in the next
- band, where they end), and no label sits on a line.
- 
- **`preview_render`**: 1280x720 by default, a poster frame inline and a link
- to the MP4. `burn_in: true` writes a second file with one opaque chip on
- every frame, inside 5% action safe: the record time and frame (`REC
- 00:00:18:00 · f432`), what is on screen, top layer first, its source file and
- timecode, and the source of the clip it covers (`over Squat.mov
- 00:00:15:20`), added after the lane check has read the clean render. 0.31.0's frame is from a render that
- had fallen back: a dissolve after hard cuts failed the full graph, so the
- dissolve was dropped and the sound with it (fixed in 0.32.0).
- 
- **`detect_scenes`**: the frame before and the frame after each cut it finds,
- each with its own timecode, the detector's score against its threshold, and
- the scenes with their lengths. **`preview_frame`** with `burn: true` names the
- file, the source timecode and the frame number.
- 
- **`preview_timeline`** prints the file's `sha256` prefix, a ruler, a legend,
- the markers, lanes above and below the spine, then an EDL whose every value
- sits under its own header: every clip in record order (`AV` for picture and
- sound, record in and out, length in frames, the transition into it as CMX
- writes it, `D 12f`, source file, source in and out), with the markers
- (`^`, name and kind in the note), the dissolve's span (`D`) and any flash in
- the picture (`!`) as rows at their place. **`validate_timeline`** leads
- with its verdict (`FAIL · 1 FAIL, 2 WARN, 1 INFO`), then reads by a ✓ PASS
- / ⚠︎ WARN / ✗ FAIL / · INFO column, what each check found, and where;
- checks flash frames in the composited PICTURE as well as clip lengths (a
- connected clip ending one frame before the next cut leaves a frame of the
- spine showing) and offers the fix the media allows first, with its cost;
- splits duplicate frames (WARN, with the record ranges where the shared
- frames play) from a reused source (INFO); checks transition handles against
- the real media, offline media, each source's frame rate and size
- against the sequence (a 3x upscale is a WARN), and each asset's clock against
- its file's timecode track (an asset Final Cut would put on another clock is a
- FAIL: its clips import empty, #45); names what it does not check
- (loudness, true peak, black or frozen frames, audio sync); counts only the
- checks that ran; and prints a fix only for what failed, as the grouped call
- that runs it. **`analyze_timeline`** gives edits and cuts per minute apart,
- the shortest picture actually on screen, the audio (channels and rate per
- file, measured), and every count diagnose prints.
- ### See the cut inline — the MCP Apps timeline (v0.26.0)
- The `view` tool turns the same timeline into something a host renders
- **inside the conversation**. Call `view` with `view_timeline` and a
- filepath; a host that speaks MCP Apps opens the `ui://fcp/timeline`
- resource in a sandboxed iframe and posts the result into it. Which hosts do
- that, and which get text, is in [Where the timeline draws](#where-the-timeline-draws).
- 
- *The app in headless Chromium, 1440 px, on `demo/fixtures/interview.py` (two
- synthetic cameras, 44 cuts, lower thirds, markers of all four kinds; ffmpeg
- test patterns and sine tones, no person). Light theme:
- `docs/screenshots/2026-11-15_034-interview-1440-light.png`. Phone width:
- `docs/screenshots/2026-11-15_034-interview-390.png`. The gym cut and the
- music video at 1440, 430 and 390 are beside them.*
- What it shows (one look since 0.34, open like Final Cut's timeline): the
- cut's fit region at open (the whole cut, or a music video's picture; at
- phone width a long cut zooms in to a 64 px median clip and scrolls), and an
- overview minimap of the whole cut (lanes in role colours, a tick per
- marker, the flash, a window round the part in view); every lane (the
- storyline, connected lanes above, sound lanes below, each connected clip
- with its stem and anchor dot on the storyline), with grey lane tags on a
- desktop; clips 88 px tall (titles and sound 72 px, every clip 56 px on a
- phone) with a filmstrip over the waveform's own band (one -60..0 dBFS
- scale, a column per peak), and a 3 px stripe in Final Cut 12.4's own role
- colour (read from the installed app by `scripts/fcp_role_colours.m`, the
- same in both themes); titles in the Titles colour; transitions as an
- overlay filled with the transition's colour, named in the ruler; a glyph per
- marker kind (standard, chapter, an open square for a to-do, a filled one
- with a check for a completed to-do), always with its name, or in a bracketed run where the names
- cannot all fit; gaps; a flash frame in red, the only red; a timecode ruler
- with frame ticks and a playhead on top that snaps to cuts; no mark drawn
- over another (the playhead, once moved, is a cursor over them). A clip's name is inside it, whole, or not drawn, and
- the hint strip counts the names shown ("4 of 58 names shown · tap or zoom"
- on the interview at 390); a tap shows a clip's name, start and length in a strip above the
- ruler, the record times in cyan. Click a clip for its details; drag on the ruler for a range. It
- follows the host's theme, then the OS's. The buttons call back into the
- server through the host: **Inspect** (`view_clip`) and **Find similar
- shots** (`find_shots`) are reads; **Add marker at playhead** (`mark`) and
- **Delete clip** (`edit`) are the ordinary edit actions, so the journal, the
- project guard and the review gate apply exactly as they do from chat, and
- the app re-renders from the new output file when the edit returns.
- The payload is exact: every position and duration is a
- `numerator/denominator` string straight from the model's Fractions, and
- the tests round-trip both fixtures through it. It travels as the result's
- `structuredContent`, which the MCP Apps spec hands to the app and keeps out
- of the model's context; a host without MCP Apps gets the summary and the
- clips in record order as text.
- The shell loads nothing from the network. Two honest limits: the in-iframe
- protocol (`ui/initialize`, `ui/notifications/tool-result`, `tools/call`)
- follows the spec text and the `@modelcontextprotocol/ext-apps` client and
- has been driven by the official `ext-apps` reference host and a stub host,
- and is not yet captured in Claude Desktop; and on `mcp` 1.x
- the tool carries `_meta.ui` and the resource is served, but the SDK has no
- slot to advertise the extension capability, so a host that insists on the
- handshake needs `mcp` 2.x.
- ### Generative fill — quote, then confirm, then insert (v0.26.0)
- The `gen` tool fills a gap, adds B-roll over a clip, or extends a clip past
- its out point with generated video. **It spends money, so the order is
- fixed and the gate is not optional:**
- ```json
- gen {"action": "gen_quote", "args": {"provider": "fal", "seconds": 7, "prompt": "a street at dusk, handheld"}}
- → Quote 61585b429a17 — fal/kling-2.5, 10s billable for 7.00s requested
- Estimated: $0.70 (prices as of 2026-11-12, 0 days ago; read on the vendor's own page; third-party figures, NOT verified against an invoice)
- Cap: $5 per call (FCP_MCP_GEN_MAX_USD)
- gen {"action": "gen_fill_gap", "args": {"filepath": "…/cut.fcpxml", "prompt": "a street at dusk, handheld",
- "seconds": 7, "quote_id": "61585b429a17", "confirm": true}}
- ```
- Generation refuses — naming the fix each time — without `confirm=true`,
- without a quote id, with a quote whose job changed (the quote is recomputed
- from provider, model, billable seconds and prompt; a stale id cannot buy a
- different job), without the provider's key in the environment, and above
- the per-call cap `FCP_MCP_GEN_MAX_USD` (default `5`). Kling and Wan bill 5
- or 10 seconds, so a 7-second gap is a 10-second job and the quote says 10;
- Gemini Omni 1.2 Flash makes 3 to 15 second clips and is quoted as at least
- one 10-second call (11 to 15 s quoted as 15). Prices are the upper end of
- what each provider's own page said on `prices_as_of` (2026-11-12): every
- quote names its source page, says how many days old the table is, and prints
- UNVERIFIED for a figure no vendor page states. None is checked against an
- invoice, and a test fails the daily CI run when the table is over 45 days
- old.
- Providers: `fal` (`kling-2.5` default, `wan-2.5`) and `gemini` (`omni-1.2-flash`)
- generate; `runway` (Aleph 2.0) and `luma` (Ray Modify) are video-to-video and
- quote but refuse as not implemented rather than pretend. Keys come from
- `FAL_KEY`, `GEMINI_API_KEY`, `RUNWAY_API_KEY`, `LUMA_API_KEY` only, travel in
- one auth header, are never written or logged, and every reply is redacted;
- the transport refuses to send a key in a URL or body. What comes back is
- ffprobed for its **real** duration and frame rate (the model never invents
- an fps), saved under `generated/` beside the project through the sandboxed
- output path so the journal records it, attached as a connected clip with
- `videoRole="generated"` and a marker naming prompt and provider, snapped to
- the sequence's frame grid, DTD-validated, and reported with the output
- file's sha256. `gen_broll` and `gen_extend_clip` condition the generation on
- a frame of the source clip when the media is present and say so when it is
- not.
- ### Claude Code skill
- A `final-cut-pro` skill ships in `skill/`, wrapping this server with the
- workflow order (`inspect` → `diagnose` → read `preview://` → `edit`) and the
- FCPXML gotchas that don't fit in a tool description. Install it alongside the
- MCP server:
- ```bash
- git clone https://github.com/DareDev256/fcp-mcp-server
- ln -s "$PWD/fcp-mcp-server/skill" ~/.claude/skills/final-cut-pro
- ```
- ---
- ## All 102 Operations
- The 102 operations below are what the 15 groups in [Tools](#tools) dispatch
- to — every `action` value the groups accept. The 71 flat-schema operations are
- still callable directly with `FCP_MCP_LEGACY_TOOLS=1`.
- | Category | Tools | What It Does |
- |----------|------:|--------------|
- | **Analysis** | 11 | Stats, clips, markers, keywords, EDL/CSV, pacing |
- | **Multi-Track** | 3 | Connected clips, compound clips, secondary lanes |
- | **Roles** | 4 | List, assign, filter, export stems |
- | **QC & Validation** | 4 | Flash frames, duplicates, gaps, health score |
- | **Keyframes** | 5 | Read, set, delete and batch-edit intrinsic keys; author adaptive Bezier paths and easing; [usage and limits](docs/keyframes.md) |
- | **Speed Curves** | 3 | Inspect, set and reset variable speed; [usage and limits](docs/retiming.md) |
- | **Editing** | 9 | Markers, trim, reorder, transitions, speed, split |
- | **Batch Fixes** | 3 | Auto-fix flash frames, rapid trim, fill gaps |
- | **Comparison** | 1 | Diff two timelines — added/removed/moved/trimmed |
- | **Reformat** | 1 | Aspect ratio conversion (9:16, 1:1, 4:5, custom) |
- | **Silence** | 2 | Detect and remove silence candidates (XML heuristics) |
- | **Media Intelligence** | 3 | Real silence detection + auto-removal (ffmpeg), musical beat detection (librosa) |
- | **NLE Export** | 2 | DaVinci Resolve v1.9, FCP7 XMEML v5 |
- | **Generation** | 3 | Rough cuts, montages, A/B roll |
- | **Beat Sync** | 2 | Import beat markers, snap cuts to beats |
- | **Import** | 3 | SRT/VTT subtitles, YouTube chapters → markers; video-use `edl.json` → FCPXML |
- | **Audio** | 1 | Add audio clips, music beds at any lane |
- | **Compound** | 2 | Create/flatten compound clips |
- | **Templates** | 2 | Pre-built timeline structures (intro/outro, lower thirds, music video) |
- | **Effects** | 1 | List FCP transition effects with UUIDs |
- | **Media** | 1 | Bulk relink moved/renamed media (rewrite `media-rep` src paths) |
- | **Transcript Intelligence** | 4 | Local Whisper transcription, transcript-driven cuts, filler-word removal, the one-page transcript pack |
- | **Live (macOS)** | 2 | Push FCPXML into the running FCP (zero-click Apple-event import); list open libraries |
- | **Preview** | 5 | Proxy render (burn-in, poster), labelled contact sheet, single frame, filmstrip+waveform check from the source media, text timeline; pictures inline as image blocks |
- | **Watch** | 4 | Start/status/stop an export watch folder; pull the latest export and diff it |
- | **Index** | 3 | Analysis cache status (with age), build, clear |
- | **Scenes** | 3 | Detect shot boundaries, mark them, split on them |
- | **Organize** | 6 | Bulk keywords/ratings/roles, auto-proposed keywords, operation history, hash-checked undo |
- | **Find** | 3 | Shot search across transcript, metadata and vision tiers; warm the index; assemble a selects reel |
- | **View** | 2 | The MCP Apps timeline payload (`view_timeline`) and the clip inspector (`view_clip`) |
- | **Generative fill** | 4 | Quote a job, then fill a gap, add B-roll or extend a clip against a confirmed quote |
- | | **102** | |
- <details>
- <summary><strong>Full tool reference (click to expand)</strong></summary>
- #### Analysis — 11 tools
- `list_projects` · `analyze_timeline` · `list_clips` · `list_library_clips` · `list_markers` · `find_short_cuts` · `find_long_clips` · `list_keywords` · `export_edl` · `export_csv` · `analyze_pacing`
- #### Multi-Track — 3 tools
- `list_connected_clips` · `add_connected_clip` · `list_compound_clips`
- #### Roles — 4 tools
- `list_roles` · `assign_role` · `filter_by_role` · `export_role_stems`
- #### QC & Validation — 4 tools
- `detect_flash_frames` · `detect_duplicates` · `detect_gaps` · `validate_timeline`
- #### Editing — 9 tools
- `add_marker` · `batch_add_markers` · `insert_clip` · `trim_clip` · `reorder_clips` · `add_transition` · `change_speed` · `delete_clips` · `split_clip`
- #### Batch Fixes — 3 tools
- `fix_flash_frames` · `rapid_trim` · `fill_gaps`
- #### Comparison · Reformat · Silence
- `diff_timelines` · `reformat_timeline` · `detect_silence_candidates` · `remove_silence_candidates`
- #### NLE Export — 2 tools
- `export_resolve_xml` (DaVinci Resolve FCPXML v1.9) · `export_fcp7_xml` (Premiere Pro / Resolve / Avid XMEML v5)
- #### Generation — 3 tools
- `auto_rough_cut` · `generate_montage` · `generate_ab_roll`
- #### Beat Sync — 2 tools
- `import_beat_markers` · `snap_to_beats`
- #### Import — 3 tools
- `import_srt_markers` · `import_transcript_markers` (supports SMPTE `HH:MM:SS:FF` with frame-accurate placement) · `import_edl_json` (video-use `{sources, ranges, grade?}` → FCPXML; `ranges[].source` is a key into `sources`, not a path — *v0.17.0*; each source on its file's timecode clock — *v0.33.0*)
- #### v0.6.0 — Audio, Compound, Templates, Effects — 6 tools
- `list_effects` · `add_audio` · `create_compound_clip` · `flatten_compound_clip` · `list_templates` · `apply_template`
- #### v0.8.0 — Media — 1 tool
- `relink_media` (bulk-rewrite `asset`/`media-rep` src paths with `dry_run` preview — relink a moved drive without opening FCP)
- #### v0.10–0.12 — Media Intelligence — 3 tools
- `detect_media_silence` (analyzes each clip's real source audio with ffmpeg silencedetect and maps silence spans into timeline time) · `remove_media_silence` (cuts detected silence out of the timeline with ripple — clips split around silence, padding keeps edits breathing, non-destructive output) — both require ffmpeg, degrade gracefully without it · `detect_beats` (musical beat + tempo detection via librosa, writes a beats JSON that chains into `import_beat_markers` + `snap_to_beats`; needs the optional `[intelligence]` extra)
- #### v0.13.0 / v0.18.0 — Transcript Intelligence — 4 tools
- `transcribe_media` · `edit_by_transcript` · `remove_filler_words` · `transcript_pack` (v0.18.0 — one page of everything said; every one of the four takes `backend: "elevenlabs"` for speakers and audio events)
- #### v0.9.0 — Live Mode (macOS + Final Cut Pro) — 2 tools
- `push_to_fcp` (zero-click FCPXML import into the running FCP via Apple event) · `list_fcp_libraries` (enumerate open libraries/events/projects)
- #### v0.17.0 — Preview — 5 group actions
- `preview_render` · `preview_sheet` · `preview_frame` · `preview_check` · `preview_timeline`
- Since v0.28.0 the proxy is exactly as long as the timeline, and every instant
- of it is the timeline's own picture or a black substitute the report names.
- A transition becomes an ffmpeg `xfade` (dissolve, dip to colour, wipe, slide)
- drawn on the clips' handles the way Final Cut draws it, so it moves nothing;
- gaps keep their time; stills loop; timecoded media is read on its own clock;
- connected clips are placed by their resolved timeline position and drawn at
- their conform, scale and position on a canvas of the sequence's shape. A clip
- whose file has no picture where the timeline needs one is shown black or left
- off its lane, by name, instead of failing the render. After rendering, the
- artifact's own duration is read back against the timeline and each lane clip
- is looked for in the frame (`Seen in the render` / `NOT drawn`), so "drawn"
- is a measurement. Since v0.30.0 the proxy has sound too: every clip's audio is placed at its
- timeline instant over a silent bed the timeline's length, crossfaded at
- transitions, with `adjust-volume` applied, and the file's audio track is
- checked like its picture. What the proxy cannot render is printed with it:
- crop, corner pin, blend modes, effects, rotation, keyframed transforms,
- titles, pan, EQ and audio effects. Since v0.32.0 the proxy is 1280x720 by
- default and every preview picture is labelled and returned inline (see
- "Proof you can read" above).
- #### v0.17.0 — Watch — 4 group actions
- `watch_start` · `watch_status` · `watch_stop` · `watch_pull`
- #### v0.18.0 — Index — 3 group actions
- `index_status` · `index_build` · `index_clear`
- #### v0.18.0 — Scenes — 3 group actions
- `detect_scenes` · `scenes_to_markers` · `scenes_split`
- #### v0.19.0 — Organize — 6 group actions
- `organize_keywords` (add / remove / replace over a selection by glob name, keyword or role) · `organize_rate` (favorite / rejected / clear) · `organize_roles` · `organize_auto` (proposes keywords from cached captions and transcripts; never transcribes; `apply=true` writes) · `history` (the operation ledger as a table with ages) · `undo` (moves the last N recorded outputs to `<journal>/undone/` — never deletes, refuses on hash mismatch)
- #### v0.19.0 — Find — 3 group actions
- `find_shots` (tiered router — transcript, metadata, vision — with the tier and a `why` on every hit; at most 20 live captions per call) · `find_index` (warm transcripts, scenes and opt-in captions for every source, reporting each as done / skipped / unavailable) · `find_to_timeline` (assemble the hits into a `_found` selects reel under the diversity constraint)
- </details>
- ---
- ## Environment Variables
- | Variable | Required | Default | Description |
- |----------|----------|---------|-------------|
- | `FCP_PROJECTS_DIR` | No | `~/Movies` | Root directory for FCPXML discovery via `list_projects`. Confines **listing only** — it does not restrict which files you can open |
- | `FCP_PROJECTS_DIRS` | No | unset | Sandbox roots, separated like `PATH` (`:` on macOS/Linux) — e.g. `~/Movies:/Volumes/Scratch/Projects`. This is the **only** variable that confines reads, and it is fully opt-in. Symlinked library media (Final Cut's default "leave files in place" import) stays readable |
- | `FCP_MAX_DISCOVERY_FILES` | No | `10000` | Cap on files collected by one `list_projects` directory walk. The walk stops at the cap and the result says it is incomplete |
- | `FCP_MAX_BATCH_MARKERS` | No | `10000` | Cap on markers written by one batch or import operation. Excess markers are reported as dropped, never silently skipped |
- | `FCP_MAX_TRANSCRIPT_CHARS` | No | `1048576` | Cap on inline transcript text passed to `import_transcript_markers` |
- | `FCPXML_DTD_DIR` | No | FCP app bundle | Directory of Apple `FCPXMLv*_*.dtd` files for DTD validation (auto-detected from the installed Final Cut Pro) |
- | `FCP_MCP_LEGACY_TOOLS` | No | unset | Set to `1` to advertise the 71 flat tool schemas alongside the 15 grouped tools |
- | `FCP_WATCH_DIR` | No | unset | Default folder `watch_start` observes for Final Cut Pro XML exports |
- | `FCP_MCP_AUTOPUSH` | No | unset | Set to `1` so every write also imports into the running Final Cut Pro. Off by default — repeated imports accumulate library churn, which is your call to make |
- | `FCP_MCP_INDEX` | No | `~/.fcp-mcp/index.db` | Where the analysis cache lives. `off` disables it entirely; every tool still works, it just recomputes. Any other value is a path |
- | `ELEVENLABS_API_KEY` | No | unset | Enables `backend: "elevenlabs"` on the transcript tools. Sent as the `xi-api-key` header and nowhere else; never read unless that backend is requested |
- | `FCP_MCP_JOURNAL` | No | `~/.fcp-mcp/journal/` | Where the operation ledger lives (paths and hashes, never content). `off` disables it — `history`/`undo` then say so and the `deliver` review gate refuses to certify anything |
- | `FCP_MCP_VLM_MODEL` | No | `mlx-community/Qwen2-VL-2B-Instruct-4bit` | Hub id of the MLX vision model `find` captions shots with. Loaded offline only; a missing model is reported with its `hf download` command, never fetched |
- | `FCP_MCP_GEN_MAX_USD` | No | `5` | Per-call ceiling on the estimated cost of a `gen` generation. A quote over it says so; generation refuses. A malformed value raises rather than defaulting |
- | `FAL_KEY` | No | unset | Enables `gen` provider `fal` (Kling 2.5, Wan 2.5). Sent as `Authorization: Key …` to queue.fal.run only; never read unless a `gen` action runs |
- | `GEMINI_API_KEY` | No | unset | Enables `gen` provider `gemini` (Gemini Omni 1.2 Flash; Omni 1.1 routes to it from 2026-12-03 and Veo 3.1 preview left the Gemini API on 2026-10-22). Sent as `x-goog-api-key` to generativelanguage.googleapis.com only |
- | `RUNWAY_API_KEY`, `LUMA_API_KEY` | No | unset | Reserved for the video-to-video providers, which quote but are not implemented in this release |
- ---
- ## Compatibility
- | Component | Supported Versions |
- |-----------|--------------------|
- | FCPXML format | reads v1.8 – v1.14 · writes v1.13 (modified files keep their source version) |
- | Final Cut Pro | **for Mac** 10.4+ through 12.4 (the newest release, 2026-09-29, per Apple's notes, checked 2026-11-12) · flat `.fcpxml` and `.fcpxmld` bundles (sidecars preserved). Final Cut Pro for iPad has no documented FCPXML import or export, so it is not supported |
- | Python | 3.10, 3.11, 3.12 |
- | MCP protocol | Spec versions are dates; the installed `mcp` SDK negotiates one. `mcp` 1.28.1 speaks up to 2025-11-25 and `mcp` 2.3.0 up to 2026-07-28, the current spec (checked 2026-11-12) |
- | `mcp` SDK | 1.21.1 through 2.x — both the decorator API and the `add_request_handler` API that replaced it. CI tests the declared floor and 2.x on every push |
- | **Export targets** | |
- | → DaVinci Resolve | FCPXML v1.9 |
- | → Premiere Pro / Avid | FCP7 XMEML v5 |
- ---
- ## Architecture
- ```
- fcp-mcp-server/ ~15.7k lines Python
- ├── server.py MCP entry point — 15 grouped tools advertised by default
- │ (TOOL_GROUPS), dispatching into 102 handlers
- │ (TOOL_HANDLERS); 5 prompts, resource discovery.
- │ FCP_MCP_LEGACY_TOOLS=1 re-advertises the flat tools.
- │ Binds itself to tools/ via bind_server() — group modules
- │ must never `import server` (it runs as __main__).
- ├── tools/ New tool groups, registered without growing server.py
- │ ├── __init__.py EXTRA_GROUPS/EXTRA_HANDLERS registry + bind_server()
- │ ├── _common.py text_result / parse_project through the bound module
- │ ├── preview.py preview group — render, sheet, frame, check, timeline
- │ ├── watch.py watch group — start, status, stop, pull
- │ ├── index.py index group — status (with age), build, clear
- │ ├── scenes.py scenes group — detect, to_markers, split
- │ ├── organize.py organize group — keywords, rate, roles, auto, history, undo
- │ ├── find.py find group — shots (tiered router), index, to_timeline
- │ └── nle.py NLE export, effects, audio, compound clips, templates,
- │ relink — moved out of server.py, re-exported by it
- │ _resolve_io_paths() / _setup_modifier() / _setup_generator()
- │ _format_clip_table() / _markdown_table() / _format_batch_result()
- │ _raw_markers_to_batch()
- │ _detect_flash_frames() / _detect_gaps() / _detect_duplicate_groups()
- │ consolidate path validation, QC detection, rendering, handler boilerplate
- ├── fcpxml/
- │ ├── journal.py Append-only operation ledger — paths + hashes, never content;
- │ │ undo is a pointer move into undone/, refused on hash mismatch
- │ ├── find.py Pure ranking over transcript words and metadata ranges, tier named
- │ ├── vlm.py Offline MLX shot captions — HF offline flags set BEFORE import.
- │ │ Captions a 1080p frame: vision tokens scale with pixel area
- │ ├── diversity.py Source-separation constraint + diversity score for assemblies
- │ ├── index.py SQLite analysis cache — keyed (path, mtime, size), num/den time,
- │ │ rebuilt on corruption; NEVER a source of truth (CI runs it off)
- │ ├── progress.py Per-clip MCP progress notifications on either SDK
- │ ├── scenes.py Shot boundaries — PySceneDetect or ffmpeg's coarser scene filter
- │ ├── transcript_pack.py Every transcript on one page; byte-measured 60KB cap
- │ ├── transcribe.py Local faster-whisper, or ElevenLabs Scribe opt-in (speakers, events)
- │ ├── filtergraph.py Timeline → ffmpeg graph. PURE — Fraction end to end,
- │ │ so compilation is asserted without ffmpeg installed.
- │ │ Output time IS timeline time: handle-drawn xfades,
- │ │ gaps, stills, asset clocks, conform + transform; what
- │ │ it cannot honour is reported, never silently dropped
- │ ├── render.py Probes every source, executes the graph with fallbacks,
- │ │ reads the artifact's OWN duration back and looks for
- │ │ every lane clip in the frame
- │ ├── proofs.py The labelled pictures: contact sheet, filmstrip + waveform
- │ │ check from SOURCE MEDIA, scenes strip, burn-in, text timeline
- │ ├── raster.py Pure-Python raster + the bundled bitmap font; text read back
- │ │ off pixels for the gates; the vision budget
- │ ├── fonts/ Spleen 12x24 and 16x32 (BSD-2-Clause, licence beside them)
- │ ├── watchfolder.py Export detection. Digests CONTENT, not (mtime, size)
- │ ├── bridges.py SpliceKit :9876 / CommandPost :27480 — DETECTION ONLY
- │ ├── edl.py video-use edl.json → FCPXML
- │ ├── models.py TimeValue, Timecode, Clip, ConnectedClip, MarkerType, Timeline
- │ ├── parser.py FCPXML → Python (spine, connected clips, roles, markers)
- │ ├── writer.py Modify & write (markers, trim, gaps, transitions, silence)
- │ │ FCPXMLModifier: index-based editing (clips/resources/formats dicts)
- │ │ FCPXMLWriter: generate new FCPXML from Python objects
- │ │ Helpers: _resolve_asset, _absorb_into_neighbor, _ripple_from_index
- │ ├── rough_cut.py Generate timelines (rough cuts, montages, A/B roll)
- │ ├── diff.py Timeline comparison engine (identity matching, threshold docs)
- │ ├── export.py DaVinci Resolve v1.9 + FCP7 XMEML v5 export
- │ ├── media_intel.py Real media analysis — audio silence detection via bounded ffmpeg subprocess
- │ ├── safe_xml.py Centralized defusedxml wrappers (XXE/entity-bomb protection) + serialize_xml()
- │ ├── dtd.py Validate output against Apple's official DTDs (located in the FCP app bundle)
- │ └── templates.py Template system (intro/outro, lower thirds, music video)
- ├── skill/ final-cut-pro Claude Code skill wrapping this server
- ├── tests/ 2708 tests across 97 suites (collected 2026-11-13) — see Testing below
- │ ├── test_models.py TimeValue math, Timecode formatting, MarkerType contracts
- │ ├── test_parser.py FCPXML parsing, connected clips, edge cases
- │ ├── test_writer.py Clip editing, marker writing, speed changes
- │ ├── test_fcpxml_writer.py FCPXMLWriter generation from Python objects
- │ ├── test_server.py MCP tool handlers, dispatch, path validation
- │ ├── test_rough_cut.py Rough cut generation, montage, A/B roll
- │ ├── test_diff.py Moved clips, transitions, markers, clip identity
- │ ├── test_export.py Attribute stripping, compound flattening, audio tracks
- │ ├── test_features_v05.py Multi-track, roles, diff, reformat, export
- │ ├── test_features_v06.py Audio, compound clips, templates, effects, validation
- │ ├── test_marker_pipeline.py Marker builder, batch modes, output format
- │ ├── test_speed_cutting.py Speed cutting, montage config, pacing curves
- │ ├── test_security.py Input validation, XML sanitization, XXE protection
- │ ├── test_edge_cases.py Boundary arithmetic, clip collisions, split/diff edges
- │ ├── test_diversity.py Boundary conditions across diff, models, validation
- │ ├── test_refactored_helpers.py _index_elements, _iter_spine_clips, serialize_xml edges
- │ ├── test_targeted_gaps.py Targeted branch coverage for diff, export, models
- │ ├── test_bundles.py .fcpxmld bundles, sidecar preservation, FCPXML 1.13/1.14 tolerance
- │ ├── test_relink.py Bulk media relink (URL + plain paths, dry run, segment matching)
- │ ├── test_media_intel.py silencedetect parsing, timeline mapping, real-WAV integration, handler
- │ ├── test_transcribe.py Phrase/filler span matching, range merge/invert algebra, Whisper handlers
- │ ├── test_validation.py Pydantic input validation models
- │ ├── test_live.py push_to_fcp / list_fcp_libraries (Apple events, mocked + live-gated)
- │ ├── test_tool_groups.py TOOL_GROUPS dispatch to the TOOL_HANDLERS, legacy flag, schema size
- │ ├── test_index*.py The cache: invalidation, rebuild, wiring, and the index group
- │ ├── test_scenes*.py Shot boundaries on synthesised colour bars; the scenes group
- │ ├── test_transcript_pack*.py The one-page pack and its handler
- │ ├── test_transcribe_scribe.py Scribe backend with urlopen patched; key-leak mutation check
- │ ├── test_preview.py preview:// serves the app with the timeline inlined
- │ ├── test_proofs.py The 0.32 gates: timecodes read back off the PNGs and every
- │ │ burned frame, ticks to a pixel, legibility, image blocks
- │ ├── test_skill.py final-cut-pro skill structure
- │ └── test_dtd_validation.py Output validated against Apple's shipped DTDs (skips without FCP)
- ├── docs/
- │ ├── WORKFLOWS.md 8 production workflow recipes
- │ └── CAPABILITY-AUDIT-2026-06.md Ecosystem audit + dual-mode (XML + Live) roadmap
- └── examples/
- └── sample.fcpxml 9 clips, 24fps — test fixture
- ```
- ---
- ## Security
- Every tool handler is hardened against adversarial input — critical for MCP servers where prompts may be LLM-generated, not human-typed.
- Found a vulnerability? Report it privately via the repo's **Security → Report a vulnerability** tab — see [SECURITY.md](SECURITY.md).
- | Layer | Protection |
- |-------|------------|
- | **File I/O** | Path traversal blocked, null bytes rejected, symlinks resolved, 100 MB size limit |
- | **Output sandbox** | All generation, write, export, beat sync, subtitle, and reformat handlers enforce `_validate_output_path(anchor_dir=...)` — restricts writes to descendants of the source file's directory, blocking LLM-generated path escapes |
- | **Subprocess bounds** | `_ensure_video_asset()` bounds-checks duration (0 < d ≤ 3600s), fps (1–240), width/height (even, ≤ 7680×4320) before `subprocess.run()` — blocks `inf`/`NaN`, negative values, odd dimensions, string injection, and oversized resolutions that could hang or exhaust ffmpeg |
- | **Speed validation** | `handle_change_speed` validates speed is positive and ≤100 before any math — prevents ZeroDivisionError crash and nonsensical results |
- | **Sandbox roots** | Opt-in and **off by default** — an editor's projects live wherever the user keeps them. `FCP_PROJECTS_DIRS` (several roots, `PATH`-separated) turns on **read** confinement: `_validate_filepath` rejects any path that is neither inside a root as given nor resolves into one. `FCP_PROJECTS_DIR` is unchanged from 0.15.0 — it confines **listing only** and never restricts reads, so an existing install is unaffected by upgrading. Traversal still normalises before the check (`root/../etc` is judged as `/etc`), and the extension whitelist still runs on the *resolved* suffix, so `innocent.fcpxml → /etc/passwd` is rejected either way |
- | **Directory listing** | Confined to `FCP_PROJECTS_DIR` when set, plus any `FCP_PROJECTS_DIRS` roots — unchanged behaviour. `find_fcpxml_files` globs `*.fcpxml` / `*.fcpxmld` under the requested directory and every path that is subsequently opened goes back through `_validate_filepath`; with neither variable set, the caller may name any directory to list |
- | **Resource caps** | The `list_projects` walk **stops** at `FCP_MAX_DISCOVERY_FILES` (10,000) rather than collecting and slicing, so pointing it at `/` cannot walk the filesystem; marker batches and imports stop at `FCP_MAX_BATCH_MARKERS` (10,000); inline transcript text stops at `FCP_MAX_TRANSCRIPT_CHARS` (1 MB), cut on a line boundary so a timestamp is never split. Every cap returns an explicit `⚠️ TRUNCATED` notice naming what was dropped — a partial result is never presented as a complete one |
- | **XML parsing** | `defusedxml` with explicit `forbid_entities/external=True` blocks XXE, billion laughs, entity expansion, remote DTD attacks at all 4 entry points (parser, writer, exporter, rough cut) — minidom pretty-print path also hardened via `defusedxml.minidom`. Ruff `S314`/`S320` rules enforce safe parsing in CI |
- | **JSON depth limit** | Iterative BFS depth checker rejects payloads nested beyond 50 levels — immune to RecursionError even at ~1000 nesting |
- | **Symlink resolution** | `_validate_filepath` calls `Path.resolve()` *before* the extension whitelist runs, so a symlink named `innocent.fcpxml` that points at `/etc/passwd` is rejected on its resolved suffix — a symlink cannot smuggle a disallowed target past the file gate |
- | **Marker strings** | Sanitized via `_sanitize_xml_value()` — null bytes, control chars stripped before write |
- | **Role values** | Stripped of control characters before XML attribute assignment |
- | **Resource URI parsing** | `file://` and `preview://` URIs have their scheme removed with `str.removeprefix()` (leading match only, so a path containing the scheme string is not mangled) and are then `urllib.parse.unquote()`d before validation — so percent-encoded traversal, percent-encoded null bytes, and ordinary spaces in filenames are all decoded first and then run through the same `_validate_filepath` gate as every other path |
- | **Output suffixes** | Path separators and special characters stripped — no traversal via suffix injection |
- | **Marker types** | `completed` attribute strict-matched (`'0'`/`'1'` only) — rejects `"true"`, `"1 OR 1=1"`, whitespace-padded values |
- 182 security-specific tests across `test_security.py` (`pytest tests/test_security.py --collect-only -q`) covering XXE, path traversal, sandbox root confinement (single and multi-root), resource caps (discovery walk, marker batch, inline transcript), output path anchoring, input validation, subprocess bounds, minidom hardening, JSON depth limits, role sanitization, ffmpeg parameter bounds, symlink resolution, resource-URI decoding, `preview://` rejection paths, symlinked Final Cut library media, and write-handler sandbox enforcement. Ruff `S` (bandit) rules enforced in CI — `S314`/`S320` block unsafe XML parsing, `S105` catches hardcoded passwords, `S108` flags insecure temp paths. Security events (null bytes, sandbox escapes, unhandled exceptions) are logged via Python `logging` for audit trails.
- ---
- ## Timestamp Parsing — How Import Tools Place Markers
- All subtitle and transcript import tools (`import_srt_markers`, `import_transcript_markers`) funnel through a single internal function: **`_parse_timestamp_parts()`** in `server.py`. Understanding it matters when timestamps don't land where you expect.
- ### Supported Formats
- | Format | Example | Parts | Result |
- |--------|---------|-------|--------|
- | **Minutes:Seconds** | `1:30` | 2 | 90.0s |
- | **H:MM:SS** | `1:05:30` | 3 | 3930.0s |
- | **HH:MM:SS.ms** | `00:02:15.500` | 3 | 135.5s |
- | **SMPTE** (HH:MM:SS:FF) | `01:00:10:12` | 4 | 3610.5s @ 24fps |
- The SMPTE 4-part format converts the frame component to fractional seconds: `frames / frame_rate`. The default rate is **24fps** — pass `frame_rate=` to override for 25fps (PAL) or 30fps (NTSC) projects.
- ### The Import Pipeline
- ```
- SRT / VTT / YouTube chapters / plain transcript
- │
- ▼
- parse_srt() / parse_vtt() / parse_transcript_timestamps()
- │ │ │
- └────────────────┴──────────────────────┘
- │
- split on ':'
- │
- ▼
- _parse_timestamp_parts(parts, frame_rate=24.0)
- │
- ▼
- total seconds (float)
- │
- ▼
- marker placed on timeline
- ```
- ### Edge Cases
- - **Unrecognized part counts** (1 part, 5+ parts) return `None` — the marker is silently skipped, not placed incorrectly
- - **Zero frame rate** — falls back to base seconds (frames ignored) rather than dividing by zero
- - **Milliseconds** — only carried in 3-part format via `float()` on the seconds component (`"15.500"` → `15.5`)
- - **Frame rounding** — SMPTE frames are divided exactly (`12/24 = 0.5`), not rounded to the nearest frame boundary. The resulting float is converted to FCPXML's rational `TimeValue` downstream, preserving precision
- ### Why This Matters
- Before v0.6.20, the 4-part SMPTE parser silently dropped frames — `01:00:10:12` became `3610.0s` instead of `3610.5s`. At 24fps, that's up to **~0.96 seconds** of drift per marker. If you imported a subtitle file with SMPTE timecodes, every marker was slightly off. This was subtle enough to pass QC but visible when scrubbing.
- ---
- ## Design Principles
- | Principle | Implementation |
- |-----------|---------------|
- | **Rational time, never floats** | All durations are fractions (`600/2400s`) matching FCPXML's native format — zero rounding errors across trim, split, speed |
- | **Non-destructive by default** | Modified files get `_modified`, `_chapters` suffixes. Originals are never overwritten |
- | **Single source of truth** | `MarkerType` enum owns serialization: `from_string()` for input, `from_xml_element()` for parsing, `xml_attrs` for writing. `INCOMPLETE` is canonical; `TODO` is a backward-compat alias (same object) |
- | **Security-first** | 13-layer defense-in-depth on the tool handlers — see [Security](#security) for the full matrix |
- | **Dispatch, not conditionals** | `TOOL_HANDLERS` dict maps names → async handlers. No 1000-line if/elif |
- ---
- ## Documentation
- | Guide | What's Inside |
- |-------|---------------|
- | **[WORKFLOWS.md](docs/WORKFLOWS.md)** | 8 production recipes — QC pipelines, beat-synced assembly, cross-NLE handoffs, documentary A/B roll |
- | **[MCP_ECOSYSTEM.md](docs/MCP_ECOSYSTEM.md)** | How this server composes with GitNexus, filesystem, and memory MCP servers |
- | **[CHANGELOG.md](CHANGELOG.md)** | Full version history from v0.1.0 to present |
- ---
- ## Testing
- ```bash
- uv run --extra dev pytest tests/ -v # or: python3 -m pytest tests/ -v
- ruff check . --exclude docs/ # lint — must pass before committing
- ```
- 2708 tests across 97 suites, measured 2026-11-13 on v0.32.0: 2703 pass and 5 skip locally (`mcp` 1.28.1, ffmpeg 9.0.1, Pillow, Playwright's Chromium); 2636 pass and 3 skip on `mcp` 2.3.0 with the `intelligence` and `scenes` extras, and 2630 pass and 9 skip on ffmpeg 6.1 via `scripts/test-ffmpeg6.sh` (no browser or Pillow in either, so the rendered-label, motion and hero-asset suites skip as modules; CI runs them in their own job); 2679 pass and 29 skip with `FCP_MCP_INDEX=off` (the extra skips there are the tests OF the cache). The other skips are the cases that need ffmpeg, PySceneDetect or Final Cut Pro present. Coverage spans models, parser, writer, FCPXMLWriter generation, server handlers, rough cut generation, speed cutting & pacing curves, marker pipeline, refactored helper functions, regression fixes, security hardening (XXE, entity expansion, path traversal, sandbox boundaries, minidom defense-in-depth, JSON depth limits, input validation, ffmpeg bounds, write-handler sandboxing), connected clips, roles, diff, export, compound clip flattening, audio track generation, templates, effects, `.fcpxmld` bundles with sidecar preservation, bulk media relink, gap-based multicam storylines (mc-clip angle resolution, caption text, connected-clip timeline positions, the media-tools view), real media silence detection, transcript-driven editing, filtergraph compilation, proxy rendering with artifact duration read-back, source-media visual checks, export watch detection, loopback bridge probing, EDL import, autopush, the operation journal and hash-checked undo, the deliver review gate, bulk organize edits, tiered shot search with its never-transcribes / never-downloads guards, the diversity constraint, the grouped tools dispatching to the flat handlers, the labelled proof pictures (timecodes read back off every sheet and every burned frame), the `preview://` page and its traversal/extension/null-byte/symlink rejection paths, the `final-cut-pro` skill, and DTD validation against Apple's official DTDs.
- Several of those are **mutation checks** — they exist to prove an instrument can see the failure it is meant to catch, because a check that reads identically on a good and a bad result certifies nothing:
- - `test_the_instrument_can_see_a_wrong_duration` renders a one-second timeline and asserts the probe reads something other than two seconds.
- - `test_the_waveform_is_actually_drawn` renders the same video against loud and near-silent audio, so the filmstrips are identical by construction and any byte difference must come from the waveform. This one caught a real shipped defect: `showwavespic` draws on a transparent background that flattens to white, so a white trace was invisible while every ordinary check still passed.
- - `test_the_edit_still_reports_success_when_the_push_fails` proves an autopush failure never costs you a file that is already on disk.
- - `test_a_touched_source_drops_its_rows` re-exports a source and asserts the cache forgets it; with the (mtime, size) check removed the stale rows survive and the test goes red.
- - `test_key_goes_in_the_header_and_nowhere_else` — moving the ElevenLabs key into the URL makes it fail.
- - `test_version.py` asserts `server.__version__` matches `pyproject.toml`; the two had disagreed since v0.17.0 without anything noticing.
- - `test_proofs.py` (v0.32.0) reads every timecode back off the pictures it guards (each sheet cell against the parsed timeline, both lines of each of the 724 burned frames against the clips on screen at that frame, each thumbnail against the ruler drawn under it, each ruler tick to a pixel, the picture-flash at 00:00:20:03, no label within 8 px of a line, every range in-out with its length, each dB label's ink on its tick, cyan only on record time, one red badge per FAIL) and was broken 158 ways in the real code and seen red.
- - `test_palette.py`, `test_schema_budget.py`, `test_front_door.py` and `test_pypi_readme.py` (v0.31.0) each plant the failure they guard against: amber back in a surface, one more character in a tool description, the old card's version in the README, a relative image in the built PyPI description.
- ---
- ## Requirements
- - **Python 3.10+** · **Final Cut Pro for Mac 10.4+** (FCPXML 1.8+; the iPad app has no FCPXML path) · **Claude Desktop** or any MCP client
- - **Dependencies** (auto-installed): `mcp` (1.21.1+, including 2.x), `defusedxml`
- - **ffmpeg** (optional) — needed for silence analysis (`detect_media_silence`, `remove_media_silence`)
- - **`[scenes]` extra** (optional) — adds PySceneDetect for `scenes` detection that can see a cut between similar colours; without it the group falls back to ffmpeg's coarser scene filter and says so.
- - **`[find]` extra** (optional, Apple Silicon) — adds `mlx-vlm` + `numpy` so `find` can caption shots offline; without it `find` answers from transcript and metadata and says vision is unavailable.
- - **`[intelligence]` extra** (optional) — adds librosa for `detect_beats`; everything else works without it. Install via `uvx --from "fcp-mcp-server[intelligence]" fcp-mcp-server` or `pip install "fcp-mcp-server[intelligence]"` (from source: `pip install -e '.[intelligence]'`).
- - See [Compatibility](#compatibility) for full version matrix
- ---
- ## Ecosystem — XML Mode Today, Live Mode Next
- This server is the **safe, offline layer** of FCP automation: no patched binaries, no
- private APIs, runs on managed Macs, works without Final Cut Pro installed. It composes
- with the live-control side of the ecosystem rather than competing with it:
- - **[SpliceKit](https://github.com/elliotttate/SpliceKit)** by [@elliotttate](https://github.com/elliotttate)
- with [@latenitefilms](https://github.com/latenitefilms) — live in-process control of a
- patched FCP copy with its own ~200-tool MCP server. The deep edit engine here and the
- live hands there are complementary by design; an optional bridge to SpliceKit's local
- JSON-RPC endpoint is on this project's roadmap (see below).
- - **[CommandPost](https://commandpost.fcp.cafe)** by [@latenitefilms](https://github.com/latenitefilms) —
- nine years of accessibility-layer FCP automation with a built-in WebSocket control
- surface; another candidate live backend.
- The full ecosystem analysis and the dual-mode architecture plan live in
- [docs/CAPABILITY-AUDIT-2026-06.md](docs/CAPABILITY-AUDIT-2026-06.md).
- ---
- ## Roadmap
- - [x] Core FCPXML parsing (reads v1.8–1.14, writes v1.13) — *v0.8.0*
- - [x] `.fcpxmld` bundle support with object-tracking/Cinematic sidecar preservation — *v0.8.0*
- - [x] Bulk media relink (`relink_media`) — *v0.8.0*
- - [x] DTD validation against Apple's official DTDs — *v0.8.0*
- - [x] Timeline analysis, markers, EDL/CSV export
- - [x] Clip editing (trim, reorder, split, speed, transitions)
- - [x] QC tools (flash frames, gaps, duplicates, health scoring)
- - [x] Generation (rough cuts, montages, A/B roll, beat sync)
- - [x] MCP Prompts + Resources (auto-discovery)
- - [x] Subtitle & transcript import as markers
- - [x] Multi-track (connected clips, compound clips, roles)
- - [x] Timeline diff + social media reformat
- - [x] Silence detection & cleanup
- - [x] Cross-NLE export (DaVinci Resolve, Premiere Pro, Avid)
- - [x] **Live mode v1** — zero-click push-to-FCP via Apple events, AppleScript library inspection — *v0.9.0*
- - [ ] Backend Protocol refactor (one operation layer shared by XML and Live)
- - [x] **Media intelligence v1** — real silence detection from source audio (`detect_media_silence`) — *v0.10.0*
- - [x] **Silence auto-removal** — `remove_media_silence` cuts real silence with ripple — *v0.11.0*
- - [x] **Beat detection** — `detect_beats` (librosa) chains into beat markers + snap-to-beats — *v0.12.0*
- - [x] **Transcript-based editing** — local Whisper transcription, edit_by_transcript (remove/keep_only), filler-word removal — *v0.13.0*
- - [x] **7 grouped tools** — `inspect`/`diagnose`/`edit`/`mark`/`generate`/`transcript`/`deliver` replace the 62 flat tools as the advertised default, cutting the schema footprint 84.7%; `FCP_MCP_LEGACY_TOOLS=1` keeps the 62 available — *v0.14.0*
- - [x] **`preview://` HTML timeline render** — see a cut without opening Final Cut Pro — *v0.14.0*
- - [x] **`final-cut-pro` Claude Code skill** — workflow order + FCPXML gotchas — *v0.14.0*
- - [x] **Daily scheduled CI** — catches upstream dependency breaks within 24h — *v0.14.0*
- - [x] **The Loop** — `preview` (see the edit from the source media), `watch` (notice the Cmd-E export), `import_edl_json`, bridge detection, autopush — *v0.17.0*
- - [x] **Speed and sight** — SQLite analysis index with per-clip progress, `scenes` shot-boundary detection, `transcript_pack`, opt-in ElevenLabs Scribe diarization — *v0.18.0*
- - [x] **The moat and the ledger** — operation journal + `history`/`undo`, review gate on `deliver`, `organize` bulk edits + `organize_auto`, `find` tiered shot search with offline MLX captions, diversity constraint — *v0.19.0*
- - [x] **Crossfades and lanes in preview** — transitions compile to ffmpeg `xfade`, connected video lanes composite over the spine — *v0.20.0*
- - [x] **Captions look at a 1080p frame** — `find` vision tier caps the frame it sends the VLM, so a 4K library no longer pays 4× the tokens (#21, @jardelapp) — *v0.21.0*
- - [x] **A wheel that starts** — the publish workflow installs the built wheel into a clean venv and runs `initialize` + `tools/list` before a release ships; the MCP registry check reads `isLatest` and is compiled in CI — *v0.21.1–0.22.1*
- - [x] **Gap-based storylines are visible** — `mc-clip` and `caption` connected to a gap spine parse, the multicam angle resolves to its media, and every media tool walks connected clips too (#23, @tomartmedia) — *v0.23.0*
- - [x] **Every tool reads the whole edit** — the reporting tools (EDL, CSV, markers, keywords, pacing, roles) and the preview follow connected clips too, so a gap-based project no longer exports empty — *v0.24.0*
- - [x] **See the cut** — the `view` MCP Apps timeline rendered inline by the host, `gen` generative fill behind a quote-then-confirm money gate, and the `expected_sha256` project guard; the rest of the October idea set is in [`docs/ROADMAP-2026-10.md`](docs/ROADMAP-2026-10.md) — *v0.26.0*
- - [x] **Files Final Cut actually opens** — transition uids checked against Final Cut's own plugin list (`FxPlug:` prefix, seven wipes that matched no plugin, a "fade" that was a colour look), transitions refused when the clips lack handles, DTD-valid rough-cut transitions, assets copied whole, connected clips on the parent's clock and in DTD order (#30-#34, @brannonwinn) — *v0.27.0*
- - [x] **Pushes Final Cut accepts** — `push_to_fcp` sends a copy carrying its library location, bundles included, so Final Cut 12.3 no longer raises a picker that swallows the import (John Palchak) — *v0.27.1*
- - [x] **Gemini Omni replaces Veo 3.1** before Google retired the preview models from the Gemini API — *v0.27.2*
- - [x] **The proxy is exactly as long as the timeline** — every instant of `preview_render` is the timeline's own picture or a named black substitute, transitions drawn on handles like Final Cut (John Palchak) — *v0.28.0*
- - [x] **Every media tool reads the asset clock** — silence, scenes, transcripts and `find` no longer report "nothing found" on timecoded clips — *v0.29.0*
- - [x] **The proxy has sound** — `preview_render` mixes the timeline's audio on the same clock as the picture — *v0.30.0*
- - [x] **Front door** — one palette (true black, one cyan, red only for failure), the GitHub card and PyPI page rebuilt from scripts, current prices with their sources, a schema budget held by a test — *v0.31.0*
- - [x] **Proof you can read** — every preview picture labelled by the server and returned inline: a contact sheet with cut numbers and timecodes, a check with a ruler and named silences, a 720p proxy with burn-in, a before/after strip per cut; `preview://` is the app — *v0.32.0*
- - [x] **Media clock** — every authored asset and clip on its file's own timecode clock (`tmcd`), so an iPhone ProRes or camera clip no longer imports empty; `validate_timeline` checks it; `insert_clip` / `add_connected_clip` bring any file in by `src` (#45) — *v0.33.0*
- - [x] **MXF and broadcast WAV on their own clock, pushes that do not wait on a permission prompt** — checked in Final Cut 12.4: an MXF timecode and a BWF time reference are the file's clock (written at 0s they import empty); `push_to_fcp` falls back to `open` and verifies on disk; one uid per media file so a cut can be pushed again and again into one library — *v0.35.0*
- - [ ] **Read the open timeline back** — an Accessibility-driven `File > Export XML` so the round trip needs no click from you
- - [ ] **Shot embeddings** — tier-3 ranking is lexical over captions until embeddings land
- - [ ] **Live bridges** — SpliceKit / CommandPost are detected since v0.17.0; the adapters that would drive them are not written
- - [ ] Audio sync detection
- - [ ] Premiere Pro native XML support
- ---
- ## Known Issues
- | Issue | Impact | Workaround |
- |-------|--------|------------|
- | **Still images crash FCP** | PNG/JPEG assets referenced directly in FCPXML crash Final Cut Pro on import (`addAssetClip` null pointer). Confirmed across multiple format configurations, dimension matching, and element types. | Convert stills to short MOVs before referencing: `ffmpeg -loop 1 -i image.png -c:v libx264 -t 2 -pix_fmt yuv420p -r 24 output.mov`. This is an FCP limitation, not an FCPXML spec issue. |
- | **An authored timeline imports empty on timecoded media (0.32.0 and earlier)** | `import_edl_json`, `apply_template` and `add_audio` with a `src` wrote every new asset at `start="0s"`, and `insert_clip` / `add_connected_clip` / `add_audio_clip` started a new clip at `0s` whatever its asset's clock. Final Cut puts an asset on its file's timecode track (an iPhone ProRes or camera `.mov`), so the clips asked for media before the file began and Final Cut showed them empty, with no warning (#45). | Fixed in v0.33.0 — upgrade. On an old install, author from media without a timecode track, or set `<asset start>` to the file's timecode and add it to each clip's `start`; 0.33's `validate_timeline` names the value per file. |
- | **A multicam edit reads as an empty project (0.22.1 and earlier)** | FCP exports connected-clip multicam edits as a spine of gaps with `mc-clip`/`caption` in lanes; the parser dropped both, so `list_clips` was empty, `validate_timeline` scored 100 % and the media tools opened nothing. | Fixed in v0.23.0 — upgrade. On an old install, `list_connected_clips` still shows nothing for these; there is no in-version workaround. |
- | **"Connection closed" on a PyPI install of 0.19.2–0.21.0** | `tools/` was missing from the published package, so the server raised `ModuleNotFoundError` at import, before it could answer `initialize`. The MCP client reports only "Connection closed". A git checkout never showed it. | Fixed in v0.21.1 — upgrade (`uvx` picks it up on the next run; `pip install -U fcp-mcp-server` otherwise). The publish workflow now installs the built wheel into a clean venv and runs `initialize` + `tools/list` before anything ships. |
- <details>
- <summary><strong>Fixed in earlier releases</strong> — kept because the symptom still turns up on old installs</summary>
- | Issue | Impact | Workaround |
- |-------|--------|------------|
- | **Non-standard timebases** | FCP rejects time values with denominators outside its standard set (e.g. `100800/57600s`). Cross-denominator arithmetic previously produced these. | Fixed in v0.5.29 — TimeValue arithmetic now uses LCM, and speed changes snap to frame boundaries in 2400-tick timebase. |
- | **Malformed frameDuration crash** | A `frameDuration` with zero or negative denominator (e.g. `"0/0s"`) in the writer's `_detect_fps` would silently produce 0.0 fps, causing downstream ZeroDivisionError in speed/trim operations. The parser already validated this correctly. | Fixed in v0.6.23 — writer now validates both numerator and denominator, falling back to 30.0 fps. |
- | **Duplicate clip names corrupt edits** | When multiple spine clips share the same name (e.g. `Interview_A` ×4), operations using the name-indexed dict silently target the wrong clip (last-indexed instead of first). Affected: `delete_clip`, `add_marker_at_timeline`, `trim_clip`, `change_speed`, `split_clip`, `add_transition`, `reorder_clips`. | Fixed in v0.6.37–0.6.39 — all methods now resolve clips via `_resolve_clip()` which walks the spine directly, returning the first match. |
- </details>
- ---
- ## Reporting a Problem
- You do not need a GitHub account, and you do not need to be a programmer.
- - **GitHub:** [open an issue](https://github.com/DareDev256/fcp-mcp-server/issues) — best for anything with a traceback or a sample FCPXML.
- - **Email:** [dev@jamesdare.com](mailto:dev@jamesdare.com) — read directly, answered directly. If Claude did the diagnosis for you, paste its findings as-is; that is exactly how the v0.21.1 packaging bug was reported and it was correct in every particular.
- **If the client only says "Connection closed"**, the server died before it could answer. Run it by hand to see the real error:
- ```bash
- uvx fcp-mcp-server # or: python server.py from a checkout
- ```
- A Python traceback here (import error, missing dependency) is the whole story; send that.
- Want to try builds before they ship? Say so in the email — pre-release wheels go out to a small list of working editors.
- ## Status & Contributing
- **Actively maintained** — live-verified against FCP 12.2, with external contributions already merged and credited: [@mikegrant25](https://github.com/mikegrant25) (sandbox security fix, #6), [@jardelapp](https://github.com/jardelapp) (audio duration probing, #7), and Marty Hou, documentary editor, who reported the v0.19.2–0.21.0 packaging failure by email. The diagnosis he forwarded was produced with Claude on his own machine, checked against the published artifacts rather than from memory, and held on every point — his words, recorded here the way he asked for them.
- PRs welcome. If you're a video editor who codes (or a coder who edits), let's build this together.
- ## Credits
- Built by [@DareDev256](https://github.com/DareDev256) — former music video director, now building AI tools for creators.
- ## More from the same author
- - **[frameio-to-final-cut-pro](https://github.com/DareDev256/frameio-to-final-cut-pro) (Cut Review):** Frame.io comments and client notes go into Final Cut Pro as to-do markers on the right clips, then one page shows which notes the recut touched. Built on this server's parser, free, no upload: `uvx cutreview`.
- - **[Ultimate Image & Video Prompt Generator](https://github.com/DareDev256/Ultimate-Image-Video-Prompt-Generator):** a prompt workbench for nine image and video engines, every suggestion credited to the creator it came from. [Live](https://prompts.tdotssolutionsz.com).
- - **[clickfix-protection-macos](https://github.com/DareDev256/clickfix-protection-macos):** defensive tools for macOS against paste-this-command (ClickFix) attacks, written after one came at me.
- - **[jackpoint](https://github.com/DareDev256/jackpoint):** one command installs Claude Code, Gemini CLI, Codex CLI and other AI coding tools on a Mac, for people who have never used a terminal.
- Everything else is on [my GitHub profile](https://github.com/DareDev256).
- ## License
- MIT — see [LICENSE](LICENSE).
- <!-- MCP registry ownership marker -->
- `mcp-name: io.github.DareDev256/fcpxml-mcp-server`
Version history
v0.35.011/17/2026
v0.34.111/16/2026
v0.33.011/15/2026
v0.32.011/14/2026
v0.30.011/5/2026
v0.27.210/23/2026
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.