How do I add an MCP server to Codex CLI to generate images and videos?

Add an MCP server to Codex CLI with codex mcp add wireflow --url https://www.wireflow.ai/api/mcp, log in, then ask Codex to generate images and videos.

Last updated View as Markdown

To generate images and videos from the Codex CLI, add the Wireflow MCP server with codex mcp add wireflow --url https://www.wireflow.ai/api/mcp, sign in with codex mcp login wireflow, then ask Codex for the image or clip in plain words. There is no API key to copy. Codex calls Wireflow's tools, the models run on your Wireflow credits, and the finished files come back as links.

codex mcp add wireflow --url https://www.wireflow.ai/api/mcp
codex mcp login wireflow

Setting up a different agent? Start from How do I connect my AI agent to image and video generation tools?

Can OpenAI Codex generate images and videos?

Yes, through an MCP server that runs image and video models. With Wireflow added, Codex can make images with models such as Flux 2 Pro and Seedream V4.5, and videos with models such as Seedance 2.0 and Kling Video, across 100+ models with one sign-in. New accounts get a free video, and more videos need a paid Wireflow plan.

How do I add an HTTP MCP server to Codex?

Run codex mcp add with --url, as above, or add a [mcp_servers.wireflow] table to ~/.codex/config.toml yourself:

[mcp_servers.wireflow]
url = "https://www.wireflow.ai/api/mcp"

To keep the server to one project, put the same table in .codex/config.toml inside that project instead. Codex reads project config in trusted projects only. The Codex CLI, the Codex IDE extension and the ChatGPT desktop app share this configuration, so one entry covers all three.

These optional keys go in the same table:

Key What it does
enabled = false Turns the server off without deleting it
default_tools_approval_mode = "writes" Prompts before any tool that isn't marked read-only
tool_timeout_sec Timeout, in seconds, for the server to run a tool. Default: 60
startup_timeout_sec Timeout, in seconds, for the server to start. Default: 10

How do I log in to an MCP server from Codex?

Run codex mcp login wireflow. When the Wireflow sign-in opens, sign in with your Wireflow account and approve the consent screen, which lists exactly the permissions Codex asked for.

Codex uses Dynamic Client Registration when it is available, and Wireflow supports it, so you don't need an OAuth client ID. Leave --oauth-client-id out of the add command: a configured client ID always takes precedence and skips client registration. You can revoke access at any time from your Wireflow settings.

How do I use MCP with Codex CLI?

Check that Codex sees the server, then ask for what you want in plain words. Run codex mcp list to see the configured servers, or type /mcp inside Codex to see the active ones. This first prompt only reads your account, so it spends no credits:

Use Wireflow. List the video models you can run for me with their credit prices, and tell me my credit balance.

Codex should call list_models and get_credit_balance. Then try a generation, which spends credits once you say yes:

Use Wireflow to make a wide image of a lighthouse on a cliff at sunrise with Flux 2 Pro. Tell me the credit cost and wait for my yes before you run it.
Use Wireflow to make a short video of waves breaking below a lighthouse at sunrise with Seedance 2.0. Tell me the credit cost and wait for my yes before you run it.

Flux 2 Pro is billed per processed megapixel and Seedance 2.0 per second of video. See the pricing page for current prices and plans. Each run returns an execution id, and Codex reads the status and the output URLs with get_execution.

With default_tools_approval_mode = "writes" in the server's table, Codex prompts before any Wireflow tool that isn't marked read-only. That keeps a yes between Codex and the tools that spend credits, such as run_workflow.

How do I make product images from the terminal in a build script?

Use Codex with the MCP server while you are at the keyboard, and call the Wireflow REST API from a build script that runs on its own. The script sends an API key, which starts with sk-, and runs a saved workflow by its id, so every build runs the same steps. See Run Workflows and how to run a workflow from your own app.

For product shots inside Codex, the public Wireflow skills install with npx skills add wireflowINC/skills, which works with Codex. The product-photography skill turns one product photo into white background, lifestyle, in-hand and flat lay shots with Nano Banana Lite, and quotes the credits before it runs.

For AI agents: the full documentation index is at /llms.txt, and most docs pages are available as Markdown by adding .md to the URL.

© 2026 Wireflow. All rights reserved.