Driving Edits: what we learned
The Edits automation server, its rules, and the gotchas that cost us an hour each so they don't cost you one.
The server
Edits for Mac (tested on 455.0.0) serves MCP over HTTP at http://127.0.0.1:19501/mcp while it's
open and Settings → Automation → Enable Automation Server is on. Every request needs
Authorization: Bearer <access token>. It speaks JSON-RPC 2.0 (tools/list, tools/call); about
270 tools, and the list changes with the screen (home vs editor).
bae/edits_mcp.py is a 60-line client with no dependencies. No Claude restart or config is needed
for the scripts; Claude Code and Codex can also add it as an MCP server (tutorial 3).
Rules Edits enforces
| Rule | What we do |
|---|---|
| It only opens files inside its sandbox | copy all media into ~/Movies/<project>/ first |
| Stills arrive 3 s long | trim each by duration − cut length on the right side |
| Transform keyframes must sit strictly inside the clip | end the last keyframe at floor(dur·1000)/1000 − 0.001 |
move takes toSeconds | (not time, not seconds) |
seek takes seconds | (not time) |
| Export needs the full preset | resolution="1080x1920", resolutionType="HD", aspectRatio="nineBySixteen", quality="high", frameRate=30, dynamicRange="SDR" |
| Export writes HEVC only | make an H.264 copy with ffmpeg, then check_av.py |
openProject wants id and name | look the id up with projects first |
frameSheet saves inside Edits' container | read path from the result and copy it out |
Things that happen
- Edits quits now and then during long sessions (connection refused). Reopen it
(
open -a Edits), wait for port 19501,openProjectby name. Projects are saved. - An export sticks at the same progress:
cancelExport, then export again. - The fade reads back shorter (1.45 s instead of 2.6 s) after a reopen; the exported audio has the full fade. Measure the file, not the readback.
- The editor tool set appears only with a project open. On the home screen, only navigation
tools exist;
use_project()handles it.
Useful tools beyond the build
| Tool | For |
|---|---|
frameSheet | a labelled contact sheet of the rendered edit at any times |
captureFrame | one exact rendered frame (JPEG) |
addText, setTextFont, setEmphasis (backgroundPill) | text in Edits itself (e.g. a lyric pill at y 960) |
generateCaptions | Edits' own captions from the audio |
detectShots, describeClip, trackObject | on-device analysis of footage |
beatMarkers, addBeatMarker | Edits' beat markers on a music clip |