codex-imagegen-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_HOME | No | Where Codex keeps its login and generated images. | ~/.codex |
| IMAGEGEN_DENY | No | Folders the server must never write to, separated by ';' on Windows and ':' elsewhere. | |
| IMAGEGEN_ROOT | No | Base folder for relative paths. | current directory |
| OPENAI_API_KEY | No | OpenAI API key, required only when IMAGEGEN_BACKEND=openai-api. Read from the environment only. | |
| IMAGEGEN_BACKEND | No | Backend to use: 'codex' or 'openai-api'. | codex |
| IMAGEGEN_WORKDIR | No | Where each run's logs go (events.jsonl, stderr.txt). | system temp |
| IMAGEGEN_CODEX_JS | No | Path to @openai/codex/bin/codex.js, if codex is not on PATH or to skip npm's .cmd shim on Windows. | |
| IMAGEGEN_API_MODEL | No | Model for the openai-api backend. | gpt-image-2 |
| IMAGEGEN_CODEX_TIMEOUT | No | Seconds before giving up on codex exec. | 900 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Generates an image and saves it to a local file. operation: "generate" (the only operation in this version). prompt: full instructions (composition, style, what is forbidden). output_path: output .png file (relative to IMAGEGEN_ROOT or absolute). base_image: image whose composition must be preserved; attached first. reference_images: style images, attached after the base, in the given order. size: desired "WIDTHxHEIGHT" (e.g. "1536x864"). With the codex backend it is only requested in text and not guaranteed; check width/height in the result. overwrite: allows replacing an existing file. Returns path, format, width, height, operation, backend, model, warnings and log. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 1 tool
With a single tool there is no possibility of misselection; the tool's purpose is unambiguous. An agent cannot confuse it with anything else on this server.
The lone name generate_image follows a clean verb_noun snake_case convention and reads predictably. No competing conventions exist to clash with it.
One tool is thin for a server surface, though the operation is deliberately scoped to a single 'generate' action per the description. All functionality (base image, references, size, overwrite) is packed into parameters rather than separate tools, which works but leaves the set feeling minimal.
Generation with optional base/reference images covers the core lifecycle, but there are no edit/variation/inpaint tools and no way to inspect or list prior outputs. The explicit 'only operation in this version' note signals acknowledged gaps.