gpt-image
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_PATH | No | Full path to the `codex` executable. Replaces the automatic search. | |
| GPT_IMAGE_MODEL | No | Default Codex model for every call, e.g. `gpt-6-astra`. A `model` argument in the call wins. | |
| GPT_IMAGE_EFFORT | No | Default reasoning effort, e.g. `max`. A `reasoning_effort` argument in the call wins. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Generates and edits images and looping animated GIFs (gif parameter) with GPT Image through the local Codex CLI, using the user's ChatGPT login (no API key). Each image takes roughly 30-90 seconds. Write the complete final prompt yourself: in prompt_mode "exact" (default) Codex is told to pass it to GPT Image unchanged, and the result reports whether it did. There is no size parameter: state the aspect ratio in the prompt (for example "16:9 landscape"). Results include the saved file paths and the usage limits Codex reports (5-hour and weekly windows). Call codex_status to check the setup, the usage limits, and which models and reasoning efforts are available. To keep working while an image renders, call generate_image with background: true and collect it later with get_image_result.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Generate or edit images with GPT Image through the local Codex CLI and return them inline, saved to disk. It also creates looping animated GIFs: pass the gif parameter. Pass reference_images to edit existing images or to use them as style/subject references. Set background: true to get a job id at once and keep working; the images then come from get_image_result. Takes about 30-90 seconds per image. There is no size parameter: put the aspect ratio in the prompt (for example "16:9 landscape", "square 1:1", "vertical 9:16"). The result lists each saved file path and size, the prompt that reached GPT Image, an alpha-channel check when a transparent background was requested, and the usage limits Codex reports. |
| get_image_resultA | Collect the result of a generate_image call started with background: true. When the job is done it returns the same text and images as a normal call (images only the first time; later calls return the text and file paths). While it runs it returns its status. Finished jobs are kept for 1 hour and are lost if the MCP server restarts. |
| codex_statusA | Check the Codex CLI setup used for image generation: install location, version, ChatGPT sign-in, remaining 5-hour and weekly usage limits, and the available models with their reasoning efforts. |
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 starts or performs the work, get_image_result only polls a previously started background job, and codex_status only reports CLI/account diagnostics. The descriptions explicitly state the relationship between the first two (background: true then get_image_result), so an agent can pick the right one without guessing.
All names are snake_case and readable, with two following a verb_noun shape (generate_image, get_image_result). codex_status breaks the verb-first pattern by being noun+topic, though it is still predictable and unambiguous.
Three tools is lean but each earns its place: one core action, one necessary async-collection counterpart, and one environment/limits check. Nothing overlapping or redundant, though the surface is near the thin end for a server.
The core lifecycle (generate, edit via reference_images, animated GIF, async start, result retrieval, quota/status check) is covered with no dead ends. Minor gaps exist around background-job management — no cancel, list-jobs, or delete-file operation, and finished jobs expire after an hour.