The Model Context Protocol (MCP) fixes that. When you connect Codex to the UGC Pilot MCP server, the same session that reads your codebase can write a hook, generate a UGC-style clip, add a voiceover and export an edit. This guide walks through the setup, a prompt flow that works, and how to review the output before you use it anywhere.
If you use Claude instead, see the companion post, How to make UGC ads with Claude using an MCP server.
Why make marketing videos from Codex?
Most founders who ship with Codex already have the best source material for a product video sitting in the repo: what the product does, who it's for, and what changed this week. Moving that context into a separate video tool means copy-pasting and re-explaining. With MCP, you skip that step:
- Codex reads the README or a feature file and drafts a script from real product facts.
- It calls UGC Pilot tools to generate the video and audio.
- You review and approve every file before it leaves your machine.
It's not a replacement for the browser editor. For a single quick clip, the AI UGC video generator in the web app is faster. Codex helps when you want the script to come straight from your code and docs, or when you want several variants in a row.
What you need
- A UGC Pilot account. The seven-day free trial needs no credit card; paid plans start at $19 a month. See pricing.
- Codex CLI or the Codex IDE extension.
- The hosted server URL:
https://mcp.getugcpilot.com/mcp
The server uses Streamable HTTP and OAuth with PKCE. You approve access in a browser window, so no API key or bearer token goes into your config file or your chat.
Step 1: Add the server to Codex
The quickest route is the CLI:
codex mcp add ugc-pilot --url https://mcp.getugcpilot.com/mcpOr add it to ~/.codex/config.toml by hand:
[mcp_servers.ugc-pilot]
url = "https://mcp.getugcpilot.com/mcp"Keep tokens out of this file. Sign-in happens through OAuth.
Step 2: Sign in
If Codex doesn't open the consent screen on its own, run:
codex mcp login ugc-pilot --scopes account:read,brand:read,assets:read,assets:write,generation:write,jobs:read,creative:write,jobs:writeApprove the scopes in your browser. Full details, including what each scope covers, are on the Codex setup page and the connect AI page.
Step 3: Check the connection before you spend credits
Start a fresh Codex session and ask:
Use UGC Pilot to check my connection, plan, credits and available generation options. Don't generate anything yet.
Codex should call tools such as get_profile, get_entitlements and get_capabilities and summarise what your plan allows. If the tools don't show up, start a new session; an open session can keep the tool list it loaded at the start.
The public server exposes 78 tools for account reads, images, video, speech, edit drafts and exports. Each one is listed with its permission scope in the MCP tools reference.
Step 4: Write the script from your repo
This is the part where Codex earns its place. Point it at real files:
Read README.md and the pricing page source. Write 5 UGC-style hooks under 10 words for solo SaaS founders, then a 15-second script for the strongest one. Only use claims the files support.
Because Codex is reading your actual product copy, it's less likely to drift into features you don't have. Still check every line. If you saved a brand profile in UGC Pilot, ask Codex to read it with get_saas_brand so the tone matches.
Need a starting structure? The post on UGC ad script templates has fill-in-the-blank formats, and the free hook lines page has openers to adapt.
Step 5: Generate the video
Use UGC Pilot to generate a vertical UGC-style video for this script: a person talking to a phone camera at a desk. Tell me the credit cost before you start.
Codex calls generate_video, then polls get_job until the file is ready. If you have a product image or clip you're allowed to use, upload it first with create_upload and confirm_upload, then ask Codex to use it as a reference.
Showing your real UI? Don't ask a model to invent your app screens. Record the real product and register it as a demo clip with register_demo. The product demo to short video guide explains the workflow.
Step 6: Voiceover and edit
Through the same connection, Codex can:
- List voices with
list_audio_voicesand generate speech withgenerate_audio. - Attach the audio to the video with
import_audio_for_video. - Open an edit draft with
list_edit_drafts, change it withupdate_edit_draft, and export it withexport_edit_draft. - Run finishing with
finish_video.
Ask for two or three hook variants and generate each one, so you have options to compare.
Step 7: Review like an editor, not a developer
Code has tests. Video needs eyes. Before you use any export:
- Watch it on a phone, at real size. Check the captions using the readable video text guide.
- Reject anything invented: fake screens, logos, reviews or results.
- Follow platform rules on AI-generated or synthetic media, and label it where required.
- Download and upload it yourself. UGC Pilot gives you the file; you decide where it goes.
A condensed prompt flow you can reuse
- "Check my UGC Pilot connection, plan and credits. Don't generate."
- "Read README.md and write 5 hooks for [audience] about [one feature]."
- "Generate a 15-second vertical UGC-style video for hook #3. Show the credit cost first."
- "Generate a casual voiceover and attach it."
- "Export the edit and give me the download link."
You can save this as a markdown file in your repo so the whole team runs the same flow.
See what the output looks like
Before you set anything up, it helps to see real clips. These are on UGC Pilot's own channels:
- YouTube: UGC Pilot walkthrough and Shorts like this one, with more on the @Teja.Chundu channel.
- TikTok: example clip on @clara_iamm.
- Instagram: reels on @mira_handles and @clara_iamm.
For build-in-public updates on the MCP server, follow @Teja_chundu on X. For a curated set of outputs, see UGC video generator examples.
Codex vs Claude for UGC videos
Both connect to the same server and the same tools. The difference is where you work:
| Codex | Claude | |
|---|---|---|
| Best for | Scripts drawn from your repo and docs | Conversational brainstorming and briefs |
| Setup | codex mcp add or config.toml | Custom connector or claude mcp add |
| Sign-in | OAuth via codex mcp login | OAuth in the browser |
Pick whichever you already use daily. See /mcp/claude for the Claude route.
FAQ
Can Codex generate videos by itself?
No. Codex needs an MCP server with video tools. Once UGC Pilot is connected, Codex can call generation, speech and editing tools and return the files.
Do I put an API key in config.toml?
No. Add only the server URL. Sign-in uses OAuth, and tokens should stay out of the file.
How many tools does the UGC Pilot MCP server have?
The public tool list has 78 tools. The MCP tools reference shows each one with its scope.
Does the MCP connection cost extra?
The connection is included with your account. Generating images, video and speech, and some finishing work, spends credits from your plan.
Why can't Codex see the UGC Pilot tools?
Check that you finished codex mcp login, then start a new session so the tool list reloads.
Does UGC Pilot post my videos?
No. You download the approved file and upload it wherever you want yourself.
Where do I start if I've never made a UGC video?
Read how an AI UGC video generator works and the guide on how to create UGC videos with AI, then come back to connect Codex.