Product10 min read•Published

Agentic Video Editing: Give Claude and Codex a Real Video Editor

The 5am CLI's MCP server lets Claude, Claude Code, Codex and other AI agents cut, caption, clean up and render video on your computer, check every frame before it renders, and pay for what they use without ever holding your card.

5

5AM Team

Product guides and release notes from 5AM Software Labs, the publisher of 5AM. Contact us with questions or corrections.

Agentic Video Editing: Give Claude and Codex a Real Video Editor

AI agents can already write code, fix bugs and run whole projects in a terminal. Ask one to edit a video, though, and it usually stalls. Video editors are built for a mouse and a timeline, and an agent can't see what it is cutting.

5am mcp closes that gap. It turns the 5am CLI into a Model Context Protocol server, so Claude, Claude Code, Codex, Antigravity or any MCP client gets a real video editor as tools. Your agent reads the recording's transcript, writes the edit, looks at the frames the render will draw, renders free drafts, measures the result, and exports the final cut when you say so. Everything renders on your computer, and your video never uploads unless you choose to finish the edit in our web editor.

This post covers how the editing works, what we saw when a headless agent edited a real recording, and how an agent pays for what it uses without ever holding your card.

Video edits as text

An agent works best with text it can write, read back and change line by line. So 5AM edits are text: VEDL, a small edit script. Here is a short one:

source "interview.mp4"
cut 01:04 01:20
cut 03:12 03:41
text "Meet the founder" at 0 for 3
captions style=bold accent=#ffee00
voice clean=auto
normalize

It keeps two moments of an interview, puts a title over the opening, burns in bold captions from the transcript, cleans up the speech (rumble, hum, room noise, harsh "s" sounds) and sets the loudness for social video. The same script also does photo scenes, transitions, B-roll, picture-in-picture, color grading, music with ducking and chapters. An agent learns it from a guide the server hands it (vedl://guide), and this example is a fuller one you can download.

Because the edit is a file, it is also checkable. The agent doesn't have to render a whole video to learn that a cut lands mid-word or a caption runs off the screen.

The loop: check, look, draft, export

The server gives the agent the steps a careful editor would take, as tools (the MCP guide lists all of them):

  1. Read the material. media_transcribe writes a transcript with word timings, and edit_transcript reads it in pages, on the source's timeline or the edit's.
  2. Check before rendering. edit_check returns every error on its line, the timeline the edit makes, and a contact sheet of the key frames, drawn exactly as the render will draw them. The agent looks at that sheet like an editor scrubbing a timeline.
  3. Change it line by line. edit_change moves a cut, adds a caption line or removes a shot, and checks the result against the media before saving.
  4. Render drafts while iterating. A draft (draft: true) is free and carries a small "Powered by 5AM" mark. Every render is measured in the same call: frame rate, loudness, true peak, and whether text stays inside the safe area.
  5. Export once, after you agree. The final file, without the mark, costs 50 AI credits. The agent prices it first with a dry run that charges nothing, tells you, and exports when you say yes. The fee is paid by the file's fingerprint, so the same export is never charged twice, and if the fee is refused the render is kept for a day: edit_finalize pays for it and delivers it without rendering again.

A reel in one call, and more

The guide walks through a highlight edit, call by call.

For a quick result there's also media_highlight, which transcribes a recording, picks the strongest moments toward your brief and length, and renders the reel in one call (an export, or a free draft). Agents can add animated infographics and end cards with Motion films (20 AI credits per export), and retouch photos with IEDL recipes.

Finish it by hand in the web editor

An agent gets you most of the way. For the last touches, a cut a beat earlier or a title in a different spot, you can take over yourself. Ask the agent to open the edit in the web editor, and it calls edit_export:

{ "path": "highlight.vedl", "new_album": "Interview reel" }

(From a shell it's 5am media edit export highlight.vedl --new-album "Interview reel", and media_highlight does the same in its one call with options.export_project.) It uploads the media to an album in your 5AM library, creates a project in the Video Editor on the web, and gives you a link that opens it. The cuts, transitions, titles, image overlays, framing, B-roll, cards and the compatible part of the grade become ordinary editor items you can trim, drag and retime, then export from the browser. The project is free on every plan; its media counts toward your library's storage.

The web editor doesn't reproduce everything the CLI renders yet: the ducked music mix, fades and some grading stay with the agent's render. When exact playback matters, keep the MP4 the agent exported.

What we saw in testing

We test this the way you'd use it: a headless agent, a real recording and one brief. In our video-edit eval, Codex gets a talking-head interview and is asked to:

  • cut it to its strongest 60 to 120 seconds;
  • clean the voice and set the loudness;
  • make two points visual with animated Motion infographics;
  • shrink the speaker into a circle in the corner while each infographic plays;
  • end on a Motion end card with its own music that says "Made with 5AM.app";
  • check the script before every render, iterate on free drafts, and export once.

The first run passed 12 of 14 checks, in 124 tool calls and about 25 minutes, and it showed us where the tools fell short: a false frame-rate error, loudness that landed under target, and previews that skipped the picture-in-picture. We fixed each one. On the latest run, with Codex's shell switched off so that it could only use the MCP server, it passed 15 of 15 checks in 50 tool calls and under 11 minutes, and the finished video measured -16.3 LUFS with its true peak inside the limit.

Paying for what it uses

Checking, looking at frames and rendering drafts are free. The steps that run on our compute, such as transcription, Motion films and the final export, use AI credits. Every plan includes AI credits (the free plan once, paid plans every month), and if your agent uses your own Gemini key, transcription and the other AI steps bill to that key instead. Exports cost credits on every account.

When the credits run out, the tool stops with a clear credits message and the agent tells you. It never buys on its own: an agent asks only when you tell it to, and nothing is charged until a person approves. There are three ways an agent can get you more credits, depending on whether you are there. The Credits section of the MCP guide has each tool's arguments.

1. A payment link, when you are there

The agent makes a payment link for a pack (credits_buy) and gives it to you. The link opens on any device, phone included, and pays without signing in, with a card (or Apple Pay or Google Pay where offered). It shows what the credits are for, in the agent's words ("To export your edit: 50 credits, you have 12"). It lasts 30 minutes, or up to a day if you'll read the message later. The agent waits for the purchase (credits_wait) and carries on the moment the credits land. Nobody is charged until someone pays on that page, and the credits always go to your account.

On your phone, get the 5AM app for iPhone or Android. You can buy the same packs there through the App Store or Google Play, and it's where an agent's requests reach you when you're away (the third way, below).

2. Your Link wallet, without a link

If your agent is connected to Link's wallet for agents, it can pay without sending you a link. The agent asks Link for a spend request for one pack, and you approve it in the Link app on your phone. Link then gives the agent a one-time token for that amount, made out to 5AM, and the agent pays with it. Your card details never reach the agent or us. credits prints the exact steps for each pack, so the agent doesn't have to guess.

3. Ask the owner, when nobody is watching

Some agents work while you are away: a workflow running in the cloud, an AI character, or an agent whose messages you'll read tomorrow. They can't wait for you to click a link, so they ask instead. The request arrives as a card in your 5AM Comms chat, with a notification on your phone: who is asking, for how many credits, and why. You approve and pay on the web or in the iPhone and Android apps, or you decline. The agent waits for your answer and carries on, or stops cleanly. This works on every plan, the free plan included.

What an agent can never do

  • Buy without a person's tap. Approving and paying are yours, on your own session. An agent's token is refused on those steps, even your own agent's.
  • Hold your card. A payment link is paid by you in your browser. A Link token covers one pack, for one seller, once.
  • Spend twice for one thing. An agent asking again gets its open request back, and an export is never charged twice.

The guide's What It Asks You First covers the rest: paid steps, email and deletes.

Packs

PackPrice
5,000 credits$6.99
20,000 credits$24.99
50,000 credits$59.99

Purchased credits never expire. A video export is 50 credits and a Motion film export is 20, at today's prices. Prices may change; the tools always quote the current price before anything is charged.

Set it up

Install the CLI and sign in once:

curl -fsSL https://cli.5am.app/cli/latest/install.sh | sh
5am login

Add the server to your agent. In Claude Code:

claude mcp add 5am -- 5am mcp --tools edit,media

In Codex, add to ~/.codex/config.toml:

[mcp_servers.5am]
command = "5am"
args = ["mcp", "--tools", "edit,media"]

The MCP guide covers Claude's desktop app, Antigravity, proxies and every toolset. Then ask in plain words:

Make a 60-second vertical highlight of interview.mp4 with bold captions and clean audio. Show me drafts, and ask me before you export.

Or, to finish it yourself:

Cut interview.mp4 down to its best minute, then open the edit in the 5AM video editor so I can adjust the titles.

Video editing needs ffmpeg; the Motion and photo tools also need Node.js (5am update --runtime-only installs the rest). Exports and the buying flows in this post need CLI v1.8.0 or later: 5am update gets it.

Tags

#mcp#ai-agents#video-editing#vedl#claude#codex#cli#ai-credits#payments

Related posts

Muse Has Its Own Computer. Give It the 5am CLI.
Product15 min read

Muse Has Its Own Computer. Give It the 5am CLI.

Meta's Muse agent works on its own cloud computer, with a terminal. Install the 5am CLI there and Muse can bring your Instagram posts into 5AM albums, share them, turn albums into reels, cut short clips, edit whole shoots, make motion films and run marketing campaigns for you.

5AM Team · Oct 4, 2026

Read more →

Creativity never sleeps.

Turn the 5 a.m. idea into shipped work. Store it, make it, sell it — in one place.

Start with 5 GB free

5 GB free · No card required