image-gen
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_BIN | No | Path to the Codex executable. | codex |
| IMAGE_BACKEND | No | Default image backend. | auto |
| MCP_HTTP_HOST | No | HTTP bind address. | 127.0.0.1 |
| MCP_HTTP_PORT | No | HTTP port. | 8788 |
| MCP_TRANSPORT | No | Set to http to serve Streamable HTTP. | stdio |
| MCP_PATH_SECRET | No | Override the secret path segment; generated on first run if not set. | |
| CLAUDE_IMAGE_DIR | No | Output folder for generated images. | ~/Pictures/Claude Images |
| CODEX_SOFT_WAIT_MS | No | Time before returning a job_id instead of waiting for the image. | 50000 |
| CODEX_IMAGE_TIMEOUT_MS | No | Codex process timeout in milliseconds. | 240000 |
| POLLINATIONS_TIMEOUT_MS | No | FLUX request timeout in milliseconds. | 180000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Generates images with the ChatGPT/Codex plan when signed in, otherwise free FLUX. If generate_image returns a job_id, call get_image_job with it until the image is ready.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Generate an image from a text prompt and save it to disk. Uses the ChatGPT/Codex plan when signed in, otherwise a free FLUX backend. Returns the image and saved path, or a job_id when generation takes longer than ~50 seconds; in that case call get_image_job with the job_id. |
| get_image_jobA | Retrieve the image from a generate_image call that returned a job_id. Waits up to wait_seconds for the generation to finish. |
| image_backend_statusA | Report whether the ChatGPT/Codex image backend is signed in, the free fallback, and the output folder. |
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 3 tools
Each tool has a clearly distinct role: generate_image creates, get_image_job polls an async result, and image_backend_status reports configuration. The descriptions explicitly cross-link generate_image's job_id output to get_image_job, so an agent cannot easily misselect.
All names use consistent snake_case, and two follow a verb_noun pattern (generate_image, get_image_job). image_backend_status is a noun-only diagnostic name, a minor deviation from the verb-first convention.
Three tools is well-scoped for a focused image-generation server; the async job model genuinely justifies a separate retrieval tool, and the status tool is small but useful for diagnosing backend auth. No filler tools.
Core flow (generate, poll, check backend) is covered, but the async job lifecycle has dead ends: no way to list pending jobs, cancel a job, or recover a result if the job_id is lost. Configuration of output/size is also not exposed beyond what generate_image infers.