Codex Imagegen MCP logo

Codex Imagegen MCP

Generate, edit, and process images in coding agents through ChatGPT authentication without an API key.

Install Codex Imagegen MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codex-imagegen-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codex-imagegen-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio codex-imagegen-mcp -- npx -y codex-imagegen-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 5 tools correctly ().

Overview

The codex-imagegen-mcp MCP server brings Codex image generation and editing into supported coding agents through a local stdio process. It connects to ChatGPT authentication and exposes tools for creating images, editing existing files or references, removing flat backgrounds locally, checking account status, and signing in. The package includes an installer that updates detected client configurations and an adapted image-generation skill. Reach for it when an agent needs to create project assets without separate OpenAI API credentials.

Use cases

  • Generate project hero images from coding-agent prompts
  • Edit existing project assets with reference images
  • Create transparent PNGs for interface artwork
  • Remove flat backgrounds without using image quota
  • Check ChatGPT image-generation access and usage

Key features

  • Text-to-image generation
  • Image editing with one to five references
  • Local flat-background removal
  • Transparent PNG validation
  • Eleven aspect-ratio options
  • ChatGPT sign-in and usage-status tools

Tools5

What Codex Imagegen MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 49d

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Can delete or modify data · 1Handles credentials · 3Makes network requests · 4Read-only tools · 4
Network at startup3 connections
Files written at startup1
Install scriptsNone
npm provenanceSigned build
Package age49 days
Maintainers1

Observed 2026-11-11 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · codex-imagegen-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars12Stargazers on the source repository.
npm downloads556Package downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.
Directory activity20 viewsConfig copies, upvotes, and views on AllMCPs.

How Codex Imagegen MCP works

What codex-imagegen-mcp does

The codex-imagegen-mcp MCP server adds image-generation workflows to coding agents that support MCP. It uses a ChatGPT plan that includes Codex rather than an API key, and image usage is counted against that plan. The Free plan does not include Codex image generation.

The server can create a new image from a text prompt, edit an existing image, or generate an image using one to five reference files. Generated files can be saved into the project workspace. Existing output files are not overwritten; the server chooses a new filename such as hero-2.png when necessary.

It also supports transparent output, multiple canvas shapes, and up to four prompt variants in parallel. Transparent output is checked for alpha data. Flat-background removal is performed locally, so that operation does not make a network request or consume image quota.

How it works

The agent communicates with a local MCP process over stdio. The process handles authentication and communicates with the relevant ChatGPT and Codex services when image generation or editing is requested. Background removal runs on the local machine instead.

Authentication can use a ChatGPT sign-in performed by this package, or credentials already available to Codex or opencode. The auth_status tool reports sign-in state, plan, credential source, and usage windows. The sign_in tool starts the sign-in flow and returns a browser link or device code as appropriate.

The image tools accept options such as aspect_ratio; the documented range includes eleven ratios from 21:9 through 9:21. Aspect selection creates a composition for the requested canvas rather than simply cropping an existing result.

Setup and configuration

The codex-imagegen-mcp MCP server requires Node.js 22 or newer and a ChatGPT plan with Codex access. The standard installer can be run without a prior package installation:

Terminal
npx -y codex-imagegen-mcp install

It detects supported coding tools, displays the files it will create or modify, and waits for confirmation. Named clients can be supplied for noninteractive installation, while --all --dry-run previews changes for every detected client. The installer edits only its own configuration entry and preserves existing comments and formatting.

After installation, authenticate with:

Terminal
npx -y codex-imagegen-mcp login

Use --device for a headless machine. The installer can also be installed globally with npm, installed from a GitHub release archive, or built from a source checkout. doctor checks Node.js, credentials, quota, and installed client configurations.

Tools and capabilities

  • generate_image: creates an image from a prompt.
  • edit_image: edits supplied images or generates from one to five references.
  • remove_background: removes a flat backdrop locally.
  • auth_status: reports authentication, plan, credential-source, and usage-window information.
  • sign_in: begins ChatGPT authentication and returns a link or code.

The package also supplies an imagegen-mcp skill adapted from Codex's image-generation workflow. It provides guidance for prompt structure, edit invariants, and file-saving behavior.

Limitations and notes

The codex-imagegen-mcp MCP server is a stdio service, so each coding client must be configured to launch it locally. Image generation and editing require a ChatGPT plan that includes Codex; a Free plan is not sufficient. The package does not use an OpenAI API key for this workflow.

Generated output depends on the available account usage windows. Local background removal is limited to cutting out a flat backdrop; it is not described as a general-purpose segmentation tool. The installer writes client configuration only after confirmation unless run in a noninteractive mode, and --dry-run does not apply changes.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codex Imagegen MCP

codex-imagegen-mcp is an MCP server that connects coding agents to ChatGPT-powered Codex image generation. Its main tools generate images, edit images or reference sets, remove flat backgrounds locally, report authentication and usage status, and start ChatGPT sign-in. It runs locally over stdio and uses an eligible ChatGPT plan instead of an API key.

Run `npx -y codex-imagegen-mcp install` to start the interactive installer. It detects supported tools, previews configuration changes, and writes the selected entries after confirmation. You can also name clients directly, preview all detected clients with `--all --dry-run`, install globally with npm, or build from source.

No, codex-imagegen-mcp uses ChatGPT authentication rather than an OpenAI API key. Sign in with `npx -y codex-imagegen-mcp login`, or reuse credentials from Codex or opencode when available. Image generation requires a ChatGPT plan that includes Codex, and the Free plan is not supported.

codex-imagegen-mcp supports the clients named in the project documentation, including opencode, Claude Code, Codex, Cursor, VS Code, Gemini CLI, and Claude Desktop. The installer detects supported tools and can configure selected clients, while the server itself communicates through standard MCP stdio.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodex Imagegen MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codex-imagegen-mcp?style=directory)](https://allmcps.com/mcp/codex-imagegen-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/codex-imagegen-mcp"><img src="https://allmcps.com/api/badge/codex-imagegen-mcp?style=directory" alt="Codex Imagegen MCP on AllMCPs" /></a>