Generate videos in Codex CLI
One TOML table, and Codex can render video. Renderly runs a hosted MCP server, so Codex CLI renders from the templates you already built - and previews cost nothing.
5 free credits · no card · hosted MCP, nothing to install
You
scores/2026-08-18.json has last night's four fixtures. Render the match recap for each.
renderly_list_projectsFinds Match Recap in your library
1 match · 37s · 9 dynamic variables
renderly_get_variablesReads what the recap actually accepts
9 variables · scorers is one text field, not a list
Your JSON keeps scorers as an array, so I will join them onto separate lines. Previewing the derby first.
renderly_preview_render0 creditsChecks fixture one for free
resolved 8/9 · warning UNKNOWN_REPLACEMENT: referee
The template has no referee variable, so I dropped that field. Re-checking the same preview.
renderly_preview_render0 creditsUpdates the same preview in place
revision 2 · resolved 9/9 · no warnings · grid shows 4-1 on scene 3
Frames look right. renderly_create_render is not read-only, so Codex will ask you to approve: four fixtures, 1 credit each.
renderly_create_render4 creditsRenders all four, once you approve
4 jobs queued · 37s each · 1 credit each
renderly_get_render_statusPolls the queue
4/4 complete · four 1080p MP4s ready to download
Codex CLI runs in a terminal inside your repository. It reads your files, runs commands in a sandbox, and asks before it does anything with a side effect. What it cannot do on its own is turn the data already sitting in that repository into a finished video. Renderly's hosted MCP server closes that gap from a single TOML table in ~/.codex/config.toml: no local process to supervise, no rendering stack to install. Codex can then list the templates and projects you have already designed, read which variables each one exposes, fill those variables from a JSON or CSV file in the working tree, and check the result before any credit is spent. Codex is built around approval, and that suits rendering. It puts a prompt in front of tools a server has not marked read-only, and renderly_create_render is annotated that way, so Codex stops and asks you first. A free preview turns that pause into a decision you can actually make: look at the frames, then approve. Type /mcp in the TUI to see the server and its ten tools listed.
Renderly is the rendering engine, not the publisher. It hands back a finished MP4 at a URL - where that file goes next is up to you or one of our no-code integrations. The same engine and the same credits drive the REST API, so nothing about a render differs because Codex CLI asked for it.
The free preview loop
Codex CLI can check its work before you pay for it
An agent filling in a template will get something wrong - a mistyped variable name, a headline too long for its line. Renderly gives it a way to find out for nothing. A preview takes the same arguments as a real render and resolves them exactly the same way, but produces no video and costs no credits.
- Preview0 credits
- Fix, preview again0 credits
- Once more0 credits
- Rendercredits charged
It can look at the frames
Append ?mode=grid and the preview page draws a labelled contact sheet spanning the whole video, as ordinary images. Any agent that can open a page and screenshot it can then see a collided caption or a wrong colour - the failures no validator catches.
?mode=gridOr one exact moment
Append ?frame=N to check a specific instant, where N is the second you care about multiplied by the frame rate. The page publishes its own rate, so the agent works it out rather than guessing from the nearest tile on the grid.
?frame=NAnd fix it in place
Pass the previewId back with corrected values and the same preview updates. The link never changes, so the agent reloads and looks again. A revision counter goes up each time, which is how it knows it is seeing its own latest attempt and not a cached earlier one.
previewIdThe warning that saves the most credits. If a variable name does not match, Renderly ignores it silently and renders the authored default instead - so the video comes back looking fine and carrying the wrong text. A preview returns a resolved map of what actually applied plus an UNKNOWN_REPLACEMENT warning, which is how Codex CLI catches that before it becomes a charge.
Setup
Connect Renderly to Codex CLI
Codex takes a remote MCP server either from one command or from a TOML table you write yourself. Both end up in the same file, so pick whichever you prefer.
codex mcp add renderly --url https://renderly.video/api/mcp[mcp_servers.renderly]
url = "https://renderly.video/api/mcp"
tool_timeout_sec = 900
default_tools_approval_mode = "writes"[mcp_servers.renderly]
url = "https://renderly.video/api/mcp"
bearer_token_env_var = "RENDERLY_API_KEY"
tool_timeout_sec = 900codex mcp listRun the add command, or paste the [mcp_servers.renderly] table into ~/.codex/config.toml yourself. If CODEX_HOME is set, that directory replaces ~/.codex.
Complete the browser sign-in. The add command starts it for you; if you edited the file by hand, run codex mcp login renderly.
Add tool_timeout_sec = 900 to the table. The default is 60 seconds, which a render will exceed.
Run codex mcp list, or type /mcp in the TUI, and check that renderly is connected with its ten tools listed.
Ask it something small first, such as: list my Renderly projects and show me the variables on the match recap one.
Either a browser sign-in or an API key
Both work here. codex mcp add ... --url probes the endpoint first, sees Renderly's 401 and its www-authenticate header, prints "Detected OAuth support. Starting OAuth flow" and opens the browser sign-in there and then, so OAuth costs you nothing extra. On a headless box use bearer_token_env_var = "RENDERLY_API_KEY" instead: Codex sends your rnd_ key as a bearer token and reads it from the environment, so the secret never lands in the file. Codex tries bearer tokens and explicit headers before falling back to OAuth.
How this was checked. Server verified live on 2026-08-19: an unauthenticated POST returns 401 with an RFC 9728 challenge, WorkOS AuthKit advertises Dynamic Client Registration, and all ten tools are registered. The setup below was confirmed against OpenAI's current MCP documentation and survived an independent adversarial recheck on the same date. Nobody here drove Codex CLI end to end. OpenAI’s documentation
The surface
Ten tools Codex CLI gets
You never call these by hand. Codex CLI picks the right one from what you asked for. They are listed because it is worth knowing which of them can cost you money - and that seven of the ten cannot.
They are thin wrappers over the same service layer the public REST API uses, so the two surfaces cannot drift apart.
| Tool | What it does | Cost |
|---|---|---|
renderly_whoamiConnect | Confirms the connection and reports your credit balance | free |
renderly_list_projectsFind | Lists your own projects that have something to personalise | free |
renderly_list_templatesFind | Lists the public system templates | free |
renderly_get_variablesFind | Reads which fields a template or project accepts, and their current values | free |
renderly_preview_renderCheck | Resolves your values exactly as a render would, without producing a video - returns a public preview link, what actually applied, a credit quote and any warnings | free |
renderly_create_renderRender | Renders the video. Annotated as not read-only, so clients ask before calling it | credits |
renderly_get_render_statusTrack | Polls the job and returns the finished video URL | free |
renderly_generate_captionsAdd AI | Transcribes audio into word-synced captions you can drop straight onto a layer | credits |
renderly_generate_voiceoverAdd AI | Turns a script into narration saved to your media library | credits |
renderly_get_ai_jobAdd AI | Polls a captions or voiceover job for its result | free |
Why Codex CLI
What this client is good at
Codex gives each MCP server its own approval setting. Inside the [mcp_servers.renderly] table you can set default_tools_approval_mode, whose "writes" value prompts only for tools the server has not marked read-only, so which calls interrupt you follows the server's own annotations rather than one blanket rule for every tool. Renderly annotates renderly_create_render as not read-only, and that is the call which spends credits, so it always stops for a human. Codex also keeps one ~/.codex/config.toml for the CLI, the IDE extension and the ChatGPT desktop app, so the wiring follows you from a terminal in the repo to the desktop window with no second setup. One thing to fix up front: tool_timeout_sec defaults to 60 seconds, which is short for a render.
Questions people actually hit
Why is there no JSON snippet for Codex, and what goes in the [mcp_servers.renderly] table?
Do I have to edit config.toml by hand, and where does codex mcp add write to?
Can I keep the Renderly server in the repo rather than my home directory?
I added Renderly in the terminal. Why has it appeared in the ChatGPT desktop app too?
A render call times out in Codex but the video turns up anyway. What is going on?
The same server, in every other client
One endpoint, one account, one credit balance. Only the wrapper changes.
Using something not listed? Any client that speaks remote MCP over Streamable HTTP can connect to https://renderly.video/api/mcp - these pages exist because the setup differs, not the server.