Cospark for Codex

Create end-to-end AI video ads in Codex.

Turn scripts and product media into UGC hooks, talking-head bodies, voiceover, and an editable timeline. The bundled skill already knows how to poll, inspect, and refine each result.

A raw tool list gets an agent to the first call and no further. It does not know that MiniMax H3 Max and Gemini Omni suit different talking-head shots, that a video run returns a handle rather than a file, or that restarting a job because it is still processing wastes four minutes and a generation.

Codex is the one client where that knowledge ships with the tools. The Cospark plugin bundles a skill covering model selection, media inspection, uploads, workspace discovery, and timeline editing, so Codex behaves like it has made ads before.

The rest suits long work. Codex runs headless, tolerates a 900-second tool timeout without complaint, and is happy to sit on a batch of renders — which is what generating a dozen ad variants actually is.

Config, login, plugin

Three steps, then start a new thread.

  1. 01

    Add the server

    Codex reads MCP servers from your config file. The generous tool timeout matters here — video runs take minutes, and a short timeout kills the poll rather than the job.

    ~/.codex/config.toml
    [mcp_servers.cospark]
    url = "https://api.cospark.so/api/mcp/cospark"
    auth = "oauth"
    tool_timeout_sec = 900
  2. 02

    Authenticate

    Codex opens the Cospark sign-in flow and stores the resulting OAuth credentials locally. No API key is involved at any point.

    terminal
    codex mcp login cospark
  3. 03

    Install the plugin

    Codex checks configured Git marketplaces at startup and refreshes installed plugins when the repository changes. Start a new thread after installing so the skill and tools load.

    terminal
    codex plugin marketplace add corift/cospark-ai --ref main
    codex plugin add cospark@cospark

Where the long runs pay off

Batch work an interactive session would not sit through.

Variant sweeps

One script, five hooks, five renders. Codex starts each run, tracks the handles, and reports back when the whole set is reviewed and ready.

  • generate_ugc_video
  • get_ugc_video_status
  • list_workspaces

Footage you already have

Point Codex at raw clips. It inspects duration, transcript, scenes, and silences before deciding where to cut, instead of guessing from a filename.

  • upload_media
  • inspect_media
  • compose_timeline

Voice matched to the read

The plugin's guidance covers voice selection, so Codex checks tone, accent, and sex against the script rather than taking the first ID in the list.

  • list_voices
  • generate_voiceover
  • edit_timeline

Worth knowing

How updates and timeouts behave.

Server updates are automatic

Changes to the hosted MCP implementation land when Cospark deploys. A plugin version bump is only needed when the bundled skill, manifest, or MCP config changes.

Give it the full timeout

tool_timeout_sec = 900 is not caution — talking-head runs include generation, review, and composition. A shorter timeout aborts the poll while the job keeps running.

Questions and answers

Specific to Codex.

Ready to turn your next product into ads ready to test?

Start with one product or brief. Cospark turns it into a complete, editable campaign you can launch, learn from, and iterate on.