AI Agents (5am mcp)
Give Claude, Claude Code, Codex, Antigravity or any MCP client the 5AM CLI as tools: edit videos, retouch photos, make Motion films, manage your library and run clip outreach, with every paid step asked first.
5am mcp runs the CLI as a Model Context Protocol server, so an AI agent can use it directly. Your agent gets 89 tools (88 before CLI v1.8.4) in six toolsets: video editing, your media library, albums, photo edits, Motion films and clip outreach. Every tool runs the CLI's own code, so a frame the agent looks at is the frame the render draws, and a tool does exactly what its command does.
Requires CLI v1.7.0 or later. Parts marked with a version need that release or later: from CLI v1.8.0, free drafts and paid exports of video edits (edit_finalize included), edit_export (an edit opened in the web Video Editor; edit_web_editor_export from CLI v1.8.5), the payment link's reason and longer life, waiting on a link, and buying credits with a Link token or by asking the account owner; from CLI v1.8.4, edit_tighten (the pauses and filler words taken out of an edit); from CLI v1.8.6, the local and podcast presets (below), and every tool refusing an argument it does not take; from CLI v1.8.94, free Motion drafts (motion_render with options.draft, also in the local preset), options.strict and options.boxes on the Motion tools; from CLI v1.8.95, the Claude Desktop bundle (below) and an empty --tools serving local. 5am --version shows yours; 5am update updates it.
Try It Signed Out
Video edits need no account. The edit tools read and render files on your computer with your own ffmpeg, and a render while you are signed out is a free draft with the 5AM mark. Install the CLI, add the server (below) and, in a folder with a short video, ask your agent:
Write a .vedl edit of clip.mp4 that keeps the best 20 seconds with a title, check it, show me a contact sheet, and render a draft.
It writes the script (edit_write), checks it (edit_check: every error on its line, the timeline, and a contact sheet it can see), changes lines (edit_change) and renders (edit_render with draft: true). Nothing is uploaded and nothing is charged. Sign in (5am login) when you want your library, the AI tools (transcription, highlight reels, Motion films) or an unmarked export.
From CLI v1.8.6 you can start without a video of your own and with a smaller tool list:
5am doctor --pretty # what is ready on this computer, and the next step for what is not
5am media edit sample # 5am-sample/sample.vedl and an 8 s test video, made by your ffmpeg
claude mcp add 5am -- 5am mcp --tools local
--tools local serves only the 28 tools that work signed out (the video edit loop, photo recipes, Motion stills, contact sheets and drafts, and the local media tools), about a third of the full list; before CLI v1.8.94 it served 27, without motion_render. Signed out, every render is a free draft; once you sign in, ask for drafts (draft: true, or options.draft for a Motion film) while you work, since a render without it is a paid export. --tools podcast serves the 27 an episode-to-clips job uses. Presets and toolsets combine: --tools podcast,albums.
Add It to Your Agent
From CLI v1.8.5 the web project tool is named edit_web_editor_export (before
that, edit_export). After updating the CLI, change saved tool references and
reconnect MCP to refresh its tool list. The shell command remains
5am media edit export.
Install the CLI and sign in once (see the CLI reference), then add the server to your agent. Desktop apps do not read your shell profile, so give them the full path that which 5am prints (here /usr/local/bin/5am).
Claude Code
claude mcp add 5am -- 5am mcp
claude mcp list shows it, and /mcp inside Claude Code shows its tools.
Claude (Desktop App)
In one click (from CLI v1.8.95). 5AM is in the official MCP Registry as app.5am/cli, and every release carries a Claude Desktop bundle. Download the one for your computer from the latest release (5am-darwin-arm64.mcpb on an Apple silicon Mac, 5am-darwin-amd64.mcpb on an Intel Mac, 5am-windows-amd64.mcpb on Windows) and double-click it, or install it from Claude's Settings, Extensions. Restart Claude, and the 5AM tools appear in a new chat. The bundle runs its own copy of 5am mcp --tools <your setting>, and Claude shows its two settings when you install it (change them later from the extension in Settings, Extensions):
- Toolsets or preset: what the bundle serves. It starts on
local, the 28 tools that work without an account (Try It Signed Out). To get your library, albums and the AI tools as well, set it toall. It also takespodcast, or a comma list of toolsets fromedit,media,albums,image,motionandoutreach(Serve Only the Toolsets You Need). Left blank, it islocal. - 5AM personal access token (optional): a token from Settings, CLI Access Tokens, for your library, the AI tools and paid exports. Leave it blank to work signed out, or to use the CLI's own sign-in on this computer (install the CLI and run
5am loginonce).
Video editing still needs ffmpeg (What Else It Needs). The same page has Linux bundles (5am-linux-amd64.mcpb, 5am-linux-arm64.mcpb) for other clients that install MCP bundles.
By hand, with the CLI installed:
-
Open Claude's Settings, then Developer, and click Edit Config. It opens
claude_desktop_config.json(on macOS in~/Library/Application Support/Claude/, on Windows in%APPDATA%\Claude\). -
Add the server:
json{ "mcpServers": { "5am": { "command": "/usr/local/bin/5am", "args": ["mcp"] } } } -
Quit Claude completely and open it again. The 5AM tools appear in the tools menu of a new chat.
Codex
Add to ~/.codex/config.toml:
[mcp_servers.5am]
command = "5am"
args = ["mcp"]
Antigravity
Antigravity 2.0, the Antigravity IDE and the Antigravity CLI share one file: ~/.gemini/config/mcp_config.json (on Windows %USERPROFILE%\.gemini\config\mcp_config.json).
-
Open it. In the IDE: the agent panel's ... menu, MCP Servers, Manage MCP Servers, View raw config. Or open the file in any editor.
-
Add the server:
json{ "mcpServers": { "5am": { "command": "/usr/local/bin/5am", "args": ["mcp"] } } } -
Open Settings, then Customizations, and click Refresh under Installed MCP Servers. In the CLI,
/mcpshows it.
Other Clients
Any MCP client that starts a local server over stdio works: run /usr/local/bin/5am mcp, with the flags below when it needs them.
What Else It Needs
5am loginfor the library, the AI tools and the paid exports. The video edit tools work logged out, on files on your machine: every render is then a draft, free and with a small "Powered by 5AM" mark. From CLI v1.8.94 so doesmotion_render: signed out, it writes a free 360p draft of a Motion film with a DRAFT mark.- The optional runtime and Node.js 20+ for the photo-edit and Motion tools:
5am update --runtime-onlyinstalls it, and5am motion doctorchecks it. - ffmpeg for video editing and rendering.
Serve Only the Toolsets You Need
claude mcp add 5am -- 5am mcp --tools edit,media
--tools takes any of edit, media, albums, image, motion and outreach (default: all six), all, or a preset (local, podcast). From CLI v1.8.95, an empty --tools (--tools "", or only spaces) serves local; before, it was an error. Claude Code searches tools as it needs them, so all six are fine there. A client that loads every tool into its context up front works better with only the toolsets the job needs.
Pointing at Node, ffmpeg and Chrome
When your client starts the server without Node or ffmpeg on its PATH, point at them once:
| Flag | What it is for |
|---|---|
--node PATH | Node.js for every photo-edit and Motion tool |
--ffmpeg PATH | ffmpeg for the edit tools and every command that renders (FFMPEG works too) |
--runtime PATH | a runtime other than the one 5am update --runtime-only installed |
--browser PATH | Chrome, only when you render with --engine chrome (CHROME_PATH works too) |
claude mcp add 5am -- 5am mcp --node /opt/homebrew/bin/node --ffmpeg /opt/homebrew/bin/ffmpeg
To act as another account or against another server, start it with a token: 5am --token <personal access token> --base-url <url> mcp. Every tool then uses that account, never your saved login. In a client's env the same goes as 5AM_TOKEN and 5AM_BASE_URL. From CLI v1.8.0 every 5AM_ variable is also read as FIVEAM_ (FIVEAM_TOKEN, FIVEAM_BASE_URL, FIVEAM_CONFIG_DIR, FIVEAM_DISABLE_KEYRING), which is the spelling to use in a shell: a shell cannot export a name that starts with a digit.
Behind a Proxy or in an Agent's Sandbox
Most MCP clients start a server with only a few environment variables (HOME, PATH, USER and the like), so a proxy your terminal uses never reaches it. If the computer reaches the internet through a proxy, as an AI agent's sandbox usually does, pass its settings in the server's env. Run env | grep -i -E 'proxy|ssl_cert' in a terminal there and copy the values it prints:
{
"mcpServers": {
"5am": {
"command": "/usr/local/bin/5am",
"args": ["mcp"],
"env": {
"HTTPS_PROXY": "http://proxy.internal:3128",
"HTTP_PROXY": "http://proxy.internal:3128",
"NO_PROXY": "localhost,127.0.0.1",
"SSL_CERT_FILE": "/etc/ssl/certs/ca-certificates.crt"
}
}
}
}
In Claude Code, add -e NAME=value for each one: claude mcp add 5am -e HTTPS_PROXY=http://proxy.internal:3128 -- 5am mcp. In Codex, put them in an env = { ... } table under [mcp_servers.5am]. SSL_CERT_FILE matters when the proxy inspects traffic with its own certificate.
What Your Agent Can Do
| Toolset | What your agent can do | Some of its tools |
|---|---|---|
edit | Write and fix a video edit (a .vedl script), take the pauses and filler words out of a talk, look at its frames, render free drafts, measure the result and export the final cut, or open it in the web Video Editor to finish by hand. Or generate a highlight reel from a transcript in one call, or (from CLI v1.8.4, picks_only) only its chosen moments, which also works on a podcast's audio. | edit_check, edit_change, edit_tighten, edit_stills, edit_render, edit_finalize, edit_web_editor_export (edit_export before CLI v1.8.5), edit_measure, edit_transcript, edit_generate, media_highlight |
media | List, search by meaning, download, upload and delete your library; transcribe, convert, resize, smart-crop, join and mix files. | media_list, media_semantic_search, media_upload, media_transcribe, media_smartcrop |
albums | Create, update, share and download albums; turn public links on and off; write album summaries. | albums_list, albums_create, albums_share, albums_public_link_enable |
image | Edit photos with IEDL recipes: check one, preview it, render it, run it over a folder, or write one from a description. | image_edit_generate, image_edit_render, image_edit_batch |
motion | Make Motion films: generate from a brief, revise in plain language, narrate (or use a recording), lay a film on a soundtrack, make a narrated clip of a podcast episode, check, look at frames for free, and export. | motion_generate, motion_revise, motion_podcast, motion_stills, motion_render, motion_show |
outreach | Run clip outreach: prepare a batch, render the clips, stage the drafts for your review, send what you approved, and read the stats. | outreach_prepare, outreach_clips, outreach_draft, outreach_send, pipeline_outreach_list |
Every toolset also comes with credits (your balance), credits_buy and credits_wait (see Credits), files_list (what is in a folder, with durations and sizes) and cli_help (every flag of any tool).
What It Asks You First
The tools are built so an agent cannot spend your money, email anyone or delete things behind your back:
- Paid steps wait for your yes. A Motion export (20 AI credits; a podcast clip 100) and the outreach clips (20 credits each) start with a free dry run. The agent tells you the price and asks; without your yes the command refuses ("not confirmed; pass --yes").
- Video exports come once, at the end. From CLI v1.8.0, the agent iterates on drafts (
draft: true: free, with a small "Powered by 5AM" mark), prices the final cut with a dry run (dry_run: true, nothing charged), and exports it without the mark after you agree: 50 AI credits at the current price, which may change, never twice for the same file. If the fee is refused, the render is kept for 24 hours andedit_finalizepays for it and delivers it without rendering again. - Credits are bought only by a person. The agent makes a payment link or asks the account owner only when you want it to; nothing is charged until someone pays or approves, and an agent's token can never approve. See Credits.
- Email waits for your yes too.
outreach_sendsends only drafts you approved, from your own Gmail, and only after you confirm the send. - Deletes are marked destructive. Your client shows you a delete or unshare before it runs, and that approval is the confirmation. From CLI v1.8.6 every tool that changes something says whether it is destructive in so many words (
destructiveHint: trueorfalse); before, a destructive tool said nothing, which the protocol reads as destructive but a person reading the list may not. Deleting needs a token with theadminscope. - The review is yours. Approving an outreach draft is your step, in your AI character's chat. The agent never publishes a prospect's clip page.
- Some steps stay with you on purpose. Setting up your Gmail app password (
5am outreach mail setup) happens in your terminal, so the password never passes through an agent. The live preview and the review page wait for a person, so they are not tools. - Video editing stays on your machine. The edit tools read and render your files with your ffmpeg; your video never uploads. An export only tells 5AM the finished file's fingerprint to charge its fee.
Each tool's description says what it costs and what it touches, so your agent can tell you before it acts.
Examples
Ask in plain words. The agent picks the tools; here is what each request turns into.
Cut a Highlight From an Interview
Make a 60-second vertical highlight of interview.mp4 with bold captions. Check it before you render.
-
media_transcribetranscribes the talk (AI credits, or your Gemini key) and savesinterview.transcript.jsonbeside it. -
edit_transcriptreads the segments, and the agent drafts a script:vedlsource "interview.mp4" cut 01:00 01:20 text "Meet the founder" at 0 for 3 -
edit_checkreturns any errors, the timeline and a contact sheet of the key frames, which the agent looks at. -
edit_changefixes what it saw, line by line, and saves the script:json{ "path": "highlight.vedl", "save": true, "changes": [ { "action": "times", "line": 2, "start": "1:04", "end": "1:20" }, { "action": "add", "after": 3, "text": "captions style=bold accent=#ffee00" } ] } -
edit_renderwrites a draft and measures it in the same call (frame rate, loudness, true peak, text inside the safe area). The agent repeats steps 3 to 5 until it looks right:json{ "path": "highlight.vedl", "output": "highlight.mp4", "aspect": "9:16", "draft": true } -
For the final cut,
edit_renderwithdry_run: trueprices the export, the agent asks you, and the same call withoutdraftexports it (50 AI credits, from CLI v1.8.0).
To take the dead air out of a talk, the agent runs edit_tighten (from CLI v1.8.4) on the script, best before it places titles and cards: it removes the quiet pauses and filler words such as "um" using the transcript, joins the kept pieces with join=tight so no transition comes in, and moves the timed lines with what came out. See Take out pauses and filler words.
Long renders report progress, and cancelling the call stops the render. Before CLI v1.8.0 every render is free and carries the free-tier watermark when you are not signed in.
To adjust it yourself instead, ask the agent to open it in the web editor: edit_web_editor_export (from CLI v1.8.0; named edit_export before v1.8.5) uploads the media to an album, makes a Video Editor project of the edit and returns a url that opens it. The cuts, transitions, titles, overlays and the compatible grade are ordinary editor items there:
{ "path": "highlight.vedl", "new_album": "Interview reel" }
It is free; the media counts toward your storage. The web editor does not yet reproduce ducking, fades or some grading, so keep the agent's export when exact playback matters.
Retouch Product Photos
Make these 12 product shots in ./shots brighter, square and on white, then upload them to a new album called Spring catalog.
image_edit_generatewrites an IEDL recipe from your description.image_edit_renderrenders one photo and shows it to the agent, which adjusts the recipe until it looks right.image_edit_batchruns the recipe over the folder, on your machine.media_uploaduploads the results withnew_album: "Spring catalog".
Local recipes are free. Selecting, erasing and generative edits run on library photos and cost AI credits; the tool says so first.
Make a Motion Film
Make a 15-second 9:16 launch film for our app, using the photos in my Launch album.
motion_generatewrites the film from your brief.motion_lintchecks it, andmotion_stillsormotion_sheetshows frames, both free. From CLI v1.8.94,motion_lintlists misspelt fields underunknownandoptions.strictmakes them, warnings and layout fixes an error;options.boxesonmotion_stillsormotion_sheetoutlines every layer and returns where each one is, whether it shows, and its text's size.motion_revisechanges it in plain language ("slower opening, bigger headline").- To hear it while it changes,
motion_renderwithoptions.draftwrites a free 360p draft with the sound and a DRAFT mark (from CLI v1.8.94). For the final film,motion_renderruns a free dry run first, tells you it costs 20 AI credits, and exports once you say yes.
Or start from the motion_film prompt with your brief, format and duration.
Make a Clip of a Podcast Episode
From CLI v1.8.4.
Make a one-minute vertical clip of episode.mp3 for people who build with AI agents.
motion_podcastwithscript_onlywrites the script: the guest's clips (picked by transcript line, so every cut lands on what was said) and a few narrator lines, each with what the screen shows.- Your agent reads the script with you and fixes what is off: a clip that needs context, a line that oversells.
motion_podcastwithscriptspeaks the narrator lines (only the ones that changed, on a re-run), cuts the clips at word boundaries, brings every part to one loudness and lays the film on the result, with the episode's cover art as its photo.motion_sheetto look at it, thenmotion_render: a podcast clip is 100 AI credits, after the same free dry run.
With a soundtrack of your own instead (a voice-over, interview cuts), motion_generate takes a cue sheet (options.cues: when each scene starts and what it shows) and the recording (options.audio), and every scene starts on its cue.
Run an Outreach Batch
Use the outreach_batch prompt with your prospects CSV, a Motion template and a batch name. The agent:
- prepares one film per prospect (
outreach_prepare, free); - prices the clips with a dry run and waits for your yes (
outreach_clips, 20 credits each); - renders them and stages the drafts (
outreach_draft), which posts a review card in your AI character's chat; - stops.
You review and approve the drafts in the chat, on the web or in the apps. Then ask it to send: outreach_send does a dry run, asks you, and sends only what you approved, from your Gmail.
Find and Share Photos
Find my photos of the beach from last summer, put them in an album and share it with ana@example.com.
media_semantic_search finds them by meaning, albums_create and media_upload (or the library ids) build the album, and albums_share invites Ana. Every share call emails each person named again, so the agent shares once.
Guides and Prompts
Each toolset brings guides your agent reads before it works, so it writes valid scripts, recipes and films the first time:
| Resource | What it holds |
|---|---|
vedl://guide, vedl://ops | The video edit language for agents, and every command's options |
iedl://guide, iedl://reference | The photo-edit language, its operations and which ones are paid |
motion://guide, motion://reference, motion://format | How to make a film, the full MotionDoc format and the rules around paid renders; from CLI v1.8.94, motion://reference is the Motion Films guide itself |
outreach://guide, outreach://reference | The outreach flow and its rules |
cli://help/{name} | Every flag of a tool or command, as cli_help returns it |
Prompts start a task with the right steps: vedl_edit (goal, source), image_edit (goal, image), motion_film (brief, format, duration) and outreach_batch (csv, template, batch).
Tool Arguments
A tool's arguments are its command's flags with underscores (added_after for --added-after) and its positional arguments by name. The flags a first call needs are typed; the rest go in options:
{ "batch": "oct_week_1", "dry_run": true, "options": { "gif_seconds": 4, "no_gif": true } }
cli_help (or the cli://help/{name} resource) lists every flag a tool takes, where it goes and its default. An unknown name is refused, never silently dropped. (Before CLI v1.8.6 the edit tools that run inside the server, such as edit_check and edit_validate, dropped one instead.)
Credits
Tools that spend AI credits say so in their descriptions. When the balance runs out, the tool fails with a credits message (category credits), and the agent tells you. It buys nothing on its own: credits_buy runs only when you ask for credits.
creditsshows your balance and the packs on sale (5,000 credits for $6.99, 20,000 for $24.99, 50,000 for $59.99; purchased credits never expire).credits_buygets you a pack one of three ways:- A payment link (the default): returned at once with its
idandurl. The link pays on any device without signing in, and nothing is charged until someone pays. It lasts 30 minutes. From CLI v1.8.0,reasonshows on the page (what the credits are for and how many are needed), andoptions.valid_forkeeps the link up to 24 hours for a person who reads the message later. - A Link token (
options.spt, from CLI v1.8.0): when you use Link's wallet for agents, you approve a spend request in the Link app and the agent pays with the one-time token Link gives it.creditsprints the exact steps inagent_payments.how(that block appears only while 5AM accepts Link tokens). It takes noreason. - Asking the owner (
options.ask_owner, from CLI v1.8.0): for an agent nobody is watching. The request arrives as a card in the account owner's 5AM Comms chat, with a push to their phone, and they approve and pay, or decline, on the web or in the apps. Every plan can answer it. Asking again returns the same request.
- A payment link (the default): returned at once with its
credits_waitwaits until the purchase lands, so the agent can carry on. From CLI v1.8.0,linkfollows a payment link,options.paymenta Link token payment andoptions.requesta request to the owner; earlier versions wait for the balance to grow (options.since, thepurchased_total_microsthatcredits_buyprinted). It ends onadded(with the new balance),review(paid, and being checked; the credits follow), orrejected,refunded,disputed,declinedorexpired(no credits).not_receivedmeans the wait timed out first: call it again.
Troubleshooting
- "Skia isn't installed": run
5am update --runtime-only. Photo edits and Motion render with Skia;5am motion doctorchecks it. - The photo-edit or Motion tools cannot find Node, or the edit tools cannot find ffmpeg: your client did not read your shell profile. Add
--nodeor--ffmpegwith full paths (see Pointing at Node, ffmpeg and Chrome). - A library or AI tool says you are not signed in: run
5am loginin a terminal, then restart the server in your client. - Every library or AI tool fails with a TLS or certificate error, but the same command works in a terminal: the computer reaches the internet through a proxy and your client did not pass its settings to the server. Add them to the server's
env(see Behind a Proxy or in an Agent's Sandbox), then restart the server. - "not confirmed; pass --yes": expected. A paid step or a send is waiting for your yes; tell the agent to go ahead.
- An export rendered but its fee was refused (no credits left, or a network error): the file is kept for 24 hours. Buy credits, then ask the agent to run
edit_finalize; it delivers the kept render without rendering again. - Too many tools for your client: serve fewer with
--tools.
The server speaks MCP over stdio (protocol versions 2025-06-18, 2025-03-26 and 2024-11-05), with tools, resources, prompts, progress and cancellation.