# Codex / OpenAI Image

> Codex / OpenAI Image is an open-source MCP server for design and media. Generate and edit images, and make style-matched sets, with Codex CLI or OpenAI Images. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/meet30997/codex-openai-image-mcp
- **MCP Registry name:** io.github.meet30997/codex-openai-image-mcp
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-18

## About

The point of this server is the set tool: generate_set takes one shared style and up to eight named prompts, then saves each as its own file so icons, stickers or illustrations come out consistent. Alongside it sit generate_image, with sizes from 16 to 4,096 pixels per side, 1 to 4 variants, optional transparency and up to four style references, and edit_image, which never modifies the source file.

Two backends are selectable with IMAGEGEN_PROVIDER. The codex-cli option draws on your ChatGPT plan through a signed-in Codex CLI, which the README describes as no API key and no per-image bill, at roughly 30 to 60 seconds per image. The openai-api option uses an API key and supports edit masks. A mock backend draws placeholders for testing. The README notes the API backend is tested against a mocked client and has not yet had a full live test.

Output stays inside one folder, existing files are never overwritten, and each image gets a JSON sidecar with its prompt and settings. Node.js 20.3 or newer is required.

## Features

- **Matching sets:** One call renders up to 8 images that share a style.
- **Image editing:** Change an image without touching the original; masks work on the API backend.
- **Two backends:** Switch between Codex CLI and the OpenAI Images API.
- **Safe file handling:** Writes only in its output folder and never overwrites.
- **Sidecar metadata:** Prompt, model, size and time saved next to each image.
- **Previews for the agent:** Returns small previews so the assistant can look and iterate.

## Good for

- Make a consistent icon pack
- Create sticker or illustration sets
- Edit a photo to a night scene
- Produce blog header images at an exact size

## Install

### Claude Code (Terminal)

```sh
claude mcp add codex-openai-image-mcp --env IMAGEGEN_PROVIDER='<IMAGEGEN_PROVIDER>' --env OPENAI_API_KEY='<OPENAI_API_KEY>' -- npx -y codex-openai-image-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codex-openai-image-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codex-openai-image-mcp"
      ],
      "env": {
        "IMAGEGEN_PROVIDER": "<IMAGEGEN_PROVIDER>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "codex-openai-image-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codex-openai-image-mcp"
      ],
      "env": {
        "IMAGEGEN_PROVIDER": "<IMAGEGEN_PROVIDER>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "codex-openai-image-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "codex-openai-image-mcp"
      ],
      "env": {
        "IMAGEGEN_PROVIDER": "<IMAGEGEN_PROVIDER>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "codex-openai-image-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codex-openai-image-mcp"
      ],
      "env": {
        "IMAGEGEN_PROVIDER": "<IMAGEGEN_PROVIDER>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "codex-openai-image-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codex-openai-image-mcp"
      ],
      "env": {
        "IMAGEGEN_PROVIDER": "<IMAGEGEN_PROVIDER>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
```

## Tools

- `generate_image`: Create 1 to 4 images from a prompt, with size, transparency and style references.
- `edit_image`: Change an existing image from a prompt, with optional references and a mask on the API backend.
- `generate_set`: Make up to eight named images that share one style.

## FAQ

### Do I need an API key?

Not for the Codex backend, which uses a signed-in Codex CLI and your ChatGPT plan; the API backend needs OPENAI_API_KEY.

### Can it overwrite my images?

No. New files get -2, -3 and so on, and the edited input is never changed.

### What Node version is needed?

Node.js 20.3 or newer.

### What is the licence?

MIT.

### Is Codex / OpenAI Image free?

Yes. Codex / OpenAI Image is open source, so you can use and self-host it for free.

### How do I add Codex / OpenAI Image to Claude Code?

Run this command in your terminal: claude mcp add codex-openai-image-mcp --env IMAGEGEN_PROVIDER='<IMAGEGEN_PROVIDER>' --env OPENAI_API_KEY='<OPENAI_API_KEY>' -- npx -y codex-openai-image-mcp

### What are the best alternatives to Codex / OpenAI Image?

The closest alternatives to Codex / OpenAI Image are HyperFrames by HeyGen, headroom, omniget, next-ai-draw-io and mcp-for-blender.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): HyperFrames by HeyGen is a freemium MCP server for design and media.
- [headroom](https://ai-powered.com/mcp/headroom-3): headroom is an open-source MCP server for ai models and llm tooling.
- [omniget](https://ai-powered.com/mcp/omniget): omniget is an open-source MCP server for ai models and llm tooling.
- [next-ai-draw-io](https://ai-powered.com/mcp/next-ai-draw-io-2): next-ai-draw-io is an open-source MCP server for ai models and llm tooling.
- [mcp-for-blender](https://ai-powered.com/mcp/mcp-for-blender): mcp-for-blender is an open-source MCP server for design and media.
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): ffmpeg-skill is an open-source MCP server for design and media.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [unity-mcp](https://ai-powered.com/mcp/unity-mcp-2): unity-mcp is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/codex-openai-image
