Codex / OpenAI Image
v0.1.2Generate, edit and make matching sets of images with the Codex CLI or the OpenAI Images API
Values you need
| Variable | What it is | |
|---|---|---|
IMAGEGEN_PROVIDER | required | Image backend: codex-cli (your ChatGPT plan via the Codex CLI), openai-api, or mock Default: codex-cli |
OPENAI_API_KEY | optional secret | OpenAI API key, only needed for the openai-api backend |
IMAGEGEN_OUT_DIR | optional | Folder for generated images, relative to the working folder (default generated-images) |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add codex-openai-image-mcp -e IMAGEGEN_PROVIDER=codex-cli -- npx -y codex-openai-image-mcp@0.1.2Add to
claude_desktop_config.json{
"mcpServers": {
"codex-openai-image-mcp": {
"args": [
"-y",
"codex-openai-image-mcp@0.1.2"
],
"command": "npx",
"env": {
"IMAGEGEN_PROVIDER": "codex-cli"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"codex-openai-image-mcp": {
"args": [
"-y",
"codex-openai-image-mcp@0.1.2"
],
"command": "npx",
"env": {
"IMAGEGEN_PROVIDER": "codex-cli"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "IMAGEGEN_PROVIDER",
"id": "imagegen-provider",
"password": true,
"type": "promptString"
}
],
"servers": {
"codex-openai-image-mcp": {
"args": [
"-y",
"codex-openai-image-mcp@0.1.2"
],
"command": "npx",
"env": {
"IMAGEGEN_PROVIDER": "${input:imagegen-provider}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.codex-openai-image-mcp]
command = "npx"
args = ["-y", "codex-openai-image-mcp@0.1.2"]
env = { "IMAGEGEN_PROVIDER" = "codex-cli" }For AI agents
- Ask the user for: IMAGEGEN_PROVIDER. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: generate_image, edit_image, generate_set.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json