VidMachine

VidMachine

MCP · Codex CLI

Codex CLI

Keep the key in an environment variable, not in the config file.
Codex CLI reads MCP servers from ~/.codex/config.toml. The bearer_token_env_var field names the variable that holds the key, so the file itself never contains a secret.
What the agent gets
28 tools in 5 groups: find, build, render, post, brand.
The same API key and credit balance as the dashboard.
Anything it makes shows up in your projects.
Posts are scheduled with the same rules as the dashboard.

Connect

Create an API key under API & MCP, then add the server. The key comes from your environment, so the snippet below is safe to keep in a config file.
Let Codex CLI do itCopy the prompt and paste it into a new chat. The agent adds the server, asks for your API key, and verifies the connection.
Add to ~/.codex/config.toml
toml
[mcp_servers.vidmachine]
url = "https://vidmachine.ai/api/mcp"
bearer_token_env_var = "VIDMACHINE_MCP_KEY"
Export the key, then confirm
Export the key, then confirm
bash
export VIDMACHINE_MCP_KEY="vidm_..."   # raw key, no "Bearer " prefix
codex mcp list
  • The value is the raw key. Codex adds the Bearer prefix when it calls the server.
  • Open a new terminal after exporting so the variable is visible to Codex.

The loop: find, inspect, make, schedule

Four messages do the whole job. The tool names are the ones the agent calls for you.
1 · FindFind out what's already there
Ask for a project or a video in plain language. The read tools answer with real IDs, statuses, and the first missing stage — and cost nothing.
search_documentationget_documentationlist_projectslist_videos
2 · InspectInspect before spending credits
Read the script, scenes, and cover, then quote the credits the remaining stages will cost and check the balance. Every paid step is priced before it runs.
get_video_contentestimate_video_costget_credit_balance
3 · MakeMake your version
Rewrite a scene, regenerate just that scene's media, and resume the pipeline. Work that already exists is reused, so a one-scene change does not redo the video.
update_scenegenerate_scene_mediagenerate_videoexport_video
4 · ScheduleSchedule it and get the link
Set the post time and status, then have the final URL handed back to you. The scheduler publishes it with the same rules as the dashboard.
update_videoexport_video

A real session

Real tool names; the values are illustrative.
Codex CLIvidmachine
>Show me the Fast Brain project and what's left to render.
list_projectsFast Brain · 12 videos · TikTok + Shorts
get_video_contentvideo 42 · scene 3 of 6 · next_step: generate_scene_media
>Rewrite scene 3 with a tighter hook and regenerate it.
update_scenescene 3 prompt saved · 0 credits
generate_scene_mediaclip ready · 38s
>Move Thursday's post to Friday 9:00 and send me the final URL.
update_videopost_time → Friday 9:00 · scheduled
export_videohttps://vidmachine.ai/v/…

Three prompts to try

Paste one into a new chat once the server is connected.
>Search the docs for how narrator timing works, then summarize it in five lines.
>Create a 30-second video about espresso ratios and run the pipeline.
>Move this month's Thursday videos to 9:00 and list what changed.
Also works with
Every tool, protocol version, and header rule: MCP server docs. The REST API behind those tools: API overview.