OpenAI Codex + UnrealUGCUGC video as a Codex task.
Plug OpenAI Codex into UnrealUGC via MCP. Works with the Codex CLI, Codex Cloud, and the 2026 plugin marketplace. Your Codex agent gains 11 typed tools for generating UGC video ads end-to-end.
TOML config.Two lines.
Codex uses TOML for MCP servers. Drop UnrealUGC into your config alongside the other plugins you already use.
~/.codex/config.toml
[mcp_servers.unrealugc]
command = "npx"
args = ["-y", "@unrealugc/mcp"]
env = { UNREALUGC_API_KEY = "usk_live_..." }Or, for Codex Cloud (no local process), point at the hosted endpoint:
[mcp_servers.unrealugc]
url = "https://unrealugc.com/api/mcp"
auth = { type = "bearer", token = "usk_live_..." }Codex picks the brief.UnrealUGC ships the ad.
Codex was built for parallel, long-running tasks. UnrealUGC's async-first API is a natural fit — Codex schedules, we generate, the webhook pings back.
Codex Cloud tasks for ad creative
Spin up a Codex Cloud task with a brief — fresh sandbox, your repo loaded, UnrealUGC tools available. The task generates ads in parallel with whatever else Codex is doing.
Batch via the plugin marketplace
UnrealUGC plugs into the same MCP plumbing as Codex's 90+ official plugins. Use it next to GitHub, Linear, Notion, and Slack in a single workflow.
Long-running ad pipelines
Codex tasks run for as long as they need to. Give it “generate one ad per product weekly” and it handles the loop, retries, and reporting without your involvement.
Skill bundles
Pack UnrealUGC alongside your marketing skill bundle. One install, every tool Codex needs to research, write, and ship a UGC ad.
Example Codex task
Ship a weekly UGC ad batch
Codex runs this task in a fresh sandbox every Monday. By Tuesday morning, you have five new UGC ads in your asset library.
# Task: weekly UGC batch
schedule: every Monday 6am UTC
Steps:
1. Pull the top 5 products by spend in the last 14 days from our DB.
2. For each, write a fresh hook (different angle than last week's).
3. Call list_creators with include=stock and pick one creator per ad.
Bias toward creators that drove the highest CTR last month
(cross-reference our analytics).
4. Call estimate_video_cost for each — abort if total > 2000 credits.
5. Call generate_video for all five in parallel with kling-2.6,
useNativeAudio=true, 12s, 9:16.
6. Poll get_video until COMPLETED. Retry once on FAILED with a
different creator.
7. Upload outputUrls to our asset bucket, post URLs to #marketing.Two waysto connect.
Codex CLI runs UnrealUGC locally via stdio. Codex Cloud uses the hosted MCP endpoint. Same tools, same API key, same auth — pick whichever fits your topology.
Codex CLI (stdio)
Codex spawns @unrealugc/mcp as a child process. Best for local dev, single-developer workflows, and air-gapped environments.
Codex Cloud (HTTP)
Codex Cloud calls our hosted MCP endpoint over HTTPS. Best for parallel cloud tasks, scheduled runs, and team-shared configurations.
Questionsfrom Codex users
- Does this work with the 2026 Codex plugin marketplace?
- Yes — UnrealUGC ships as a standard MCP server, which is the unit the marketplace uses. Add it via TOML or install through your plugin manager.
- Can I use UnrealUGC inside a Codex Cloud sandbox?
- Yes. Point Codex Cloud at https://unrealugc.com/api/mcp with your API key as a Bearer token. No local process needed.
- How do parallel Codex tasks share credits?
- All tasks using the same API key share your account's credit balance. The 10 generations/minute rate limit is per-key, so heavily parallel runs may queue.
- Will UnrealUGC see my Codex repo data?
- No. The MCP server only receives the arguments Codex passes to each tool call — typically a script, product name, and creator id. We don't read files, repos, or codex's internal state.
- How do I scope a Codex task's UnrealUGC permissions?
- Create a dedicated API key in our dashboard, set up a webhook to monitor usage, and revoke the key when the task ends. Keys can be created and revoked in seconds.