Codex Images MCP Server
Generate and edit images with gpt-image-2, including masks and transparency.
Codex Images scores 63 (Good), licensed MIT and written in Python. It installs as a local process. It does not declare tools yet. Filed under AI and memory. GitHub shows 0 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
63 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 63 comes from
22 + 20 + 0 + 10 + 4 + 7 = 63. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "jlmoreno00-codex-images-mcp": { "command": "uvx", "args": [ "codex-images-mcp" ] } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
CODEX_IMAGES_HTTP_TOKENSecret | Required | Bearer token. The image listens on 0.0.0.0 and refuses to start without this. |
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
codex-images-mcp
Generate and edit images from any MCP client with gpt-image-2 on the ChatGPT plan you already pay for. No OpenAI API key, no per-image bill.
codex-images-mcp is an MCP server for the Codex Images endpoint. It runs locally over stdio, or as a self-hosted HTTP server that your laptop, your VPS agents and your Pi / Gentle Shell sessions can share. Every image comes back as a verifiable artifact: SHA-256, byte count, MIME type and real dimensions.
Unofficial. Not affiliated with or endorsed by OpenAI. It signs in with your own ChatGPT account and uses the same endpoint as the Codex CLI. You are bound by OpenAI's terms for your account, and image generation counts against your plan's limits.
What you get
- Two tools:
codex_images(generate/edit) andcodex_images_artifact(fetch an image by URI, inline or through a short-lived signed download). - Batches:
parallel,variants,chainandbranded-parallel(every image references a shared anchor for brand-consistent sets). - Edits with references and masks: up to five references per request, HTTPS URLs or inline images.
- Native transparency: real alpha PNGs from the model, with a warning when a result comes back opaque.
- Exact output sizes:
native,exact,fitorcoverpost-processing, so a 1200×630 card is 1200×630. - Prompts sent verbatim: no hidden rewriting model in between.
- Optional API-key engine: set
CODEX_IMAGES_ENGINE=apiwith anOPENAI_API_KEYto choose the model yourself (Images 2.6gpt-image-2.6-sunburst/-flare), with quality up tomaxand complexity control. This engine is billed to your API account. On the default ChatGPT plan route OpenAI chooses the model, and the API selectors (model,quality,complexity) are ignored. - Self-hosting that is safe by default: built-in bearer auth, refuses to listen publicly without a token, SSRF-hardened URL fetching (HTTPS, public addresses only, pinned IP, no redirects), no server paths in results.
- Its own ChatGPT session:
codex-images-mcp loginuses a device code and keeps a separate session, so it never rotates (and breaks) your Codex app's sign-in.
Quick start (local, stdio)
uvx --from codex-images-mcp codex-images-mcp login # sign in once (device code)
uvx --from codex-images-mcp codex-images-mcp setup # register in Claude Code, Claude Desktop, Codex, Cursor, OpenCode
Or try it from the terminal:
uvx --from codex-images-mcp codex-images-mcp generate "a ceramic mug, studio light" --transparent --pretty
Already signed in to the Codex CLI? codex-images-mcp can use that login read-only until its token expires. It never refreshes it; run login for a session of its own.
Example output
Example outputs from gpt-image-2 via this server. The pictures are resized for this page. A transparent generate, and an edit that sends a reference plus a mask, are written up in docs/examples.md.

The generate on the left used the prompt a ceramic mug, studio light with transparent set. The model returned a 1536×1024 PNG, 1,745,462 bytes, sha256 e0d0338218529ca36e0d64e92eb2737c6794b392343f1a5ab32884a49dab48ba. The edit sent that mug as the reference, with a mask over the front, and asked for a small dark brown stamped coffee bean. It returned a 1536×1024 PNG, sha256 7c5b28d4950f5207c111f875ef9d19349e06be3da43ce1200d2d8d2c678b9ba5. The camera angle shifted slightly. A mask is a hint, and the model may adjust the whole frame.
The generate result is a PNG with a real alpha channel. The checkerboard is only a backdrop, so the transparent background is visible:

Also in this folder: an off-white generate, the edit on a checkerboard, and 1200px transparent PNGs of the generate and the edit.
Self-hosted (HTTP)
export CODEX_IMAGES_HTTP_TOKEN=$(openssl rand -hex 32)
docker compose up -d
docker compose run --rm codex-images codex-images-mcp login
Then point your clients at https://your-host/mcp/ with Authorization: Bearer $CODEX_IMAGES_HTTP_TOKEN. See docs/self-hosting.md for the reverse proxy, signed downloads and every setting.
Pi and Gentle Shell
pi-codex-images is a Pi extension for a self-hosted server. It reads the local files you authorize, sends them inline, and writes verified results atomically into your project:
pi install npm:pi-codex-images
Documentation
- MCP tools reference: inputs, results, error codes.
- CLI:
generate,login,logout,setup,status,uninstall. - Self-hosting: Docker, reverse proxy, configuration, security model.
- Examples: batches, edits, masks, transparency, exact sizes.
- Comparison: how this differs from similar projects.
Credits
codex-images-mcp started as a fork of VelmoAI/codex-imagen by wauwa. The installer and much of the original structure come from there. The OAuth token handling derives from codex-image-gen by Small Turtle 2. The generation engine was replaced with the native Codex Images endpoint, and the prompt-rewriting and chroma-key layers were removed.
License
Frequently asked questions
What is Codex Images MCP Server?
Generate and edit images with gpt-image-2, including masks and transparency.
How do I install Codex Images MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Codex Images MCP Server runs locally from the PyPI package codex-images-mcp with the command uvx codex-images-mcp.
Is Codex Images MCP Server free and open source?
Yes. Codex Images MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
How is Codex Images MCP Server's trust score calculated?
Codex Images MCP Server scores 63 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.