Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GPT_IMAGE_HOMENoDirectory for the profile, state, and debug captures. Default: ~/.gpt-image-mcp.
GPT_IMAGE_DEBUGNoSet to 1 for verbose logs on stderr. Default: 0.0
GPT_IMAGE_MODELNo?model= slug for new chats. Default: account default.
GPT_IMAGE_WINDOWNoHeaded browser window mode: minimized, normal, or offscreen. Default: minimized.minimized
GPT_IMAGE_CDP_URLNoAttach to an existing Chrome instance instead of launching one, e.g. http://127.0.0.1:9222.
GPT_IMAGE_SESSIONNoChatGPT login/session value to seed an empty profile, such as the value printed by export-session --env or a Cookie-Editor export. Treat as a password.
GPT_IMAGE_TIMEOUTNoPer-job timeout, in seconds. Default: 600.600
GPT_IMAGE_HEADLESSNoSet to 1 for headless mode. Auto: on Linux without a screen, uses a virtual display Xvfb if installed, otherwise headless.auto
GPT_IMAGE_HTTP_HOSTNoHTTP server bind host.
GPT_IMAGE_HTTP_PORTNoHTTP server bind port.
GPT_IMAGE_WARM_TABSNoNumber of ready-to-type ChatGPT tabs the server keeps loaded so jobs start instantly. Default: 3.3
GPT_IMAGE_API_GAP_MSNoStarting gap between ChatGPT data requests, in milliseconds; adapts automatically. Default: 300.300
GPT_IMAGE_HTTP_TOKENNoBearer token required by the HTTP server and used by remote MCP clients.
GPT_IMAGE_OUTPUT_DIRNoDefault folder where generated images are saved. Default: $GPT_IMAGE_HOME/images.
GPT_IMAGE_PUBLIC_URLNoPublic base URL of the remote server.
GPT_IMAGE_SERVER_URLNoMake the CLI use a remote server instead of a local browser.
GPT_IMAGE_PROFILE_DIRNoOverride the browser profile directory, allowing separate instances to use separate profiles.
GPT_IMAGE_SEND_GAP_MSNoMinimum gap between prompt submissions, in milliseconds. Default: 250.250
GPT_IMAGE_SESSION_FILENoPath to a file containing a ChatGPT session/login to seed an empty profile.
GPT_IMAGE_MAX_CALL_WAITNoLongest one tool call blocks, in seconds. Unfinished jobs are collected with wait_for_jobs. Default: 50.50
GPT_IMAGE_MAX_IDLE_TABSNoNumber of finished chats kept open for instant edits. Default: 4.4
GPT_IMAGE_MAX_PAGE_LOADSNoMaximum number of ChatGPT pages loading at once. Default: 5.5
GPT_IMAGE_BROWSER_CHANNELNoBrowser channel: chrome, msedge, or chromium (Playwright's). Default: chrome.chrome
GPT_IMAGE_EXECUTABLE_PATHNoExplicit browser binary path.
GPT_IMAGE_MAX_CONCURRENCYNoMaximum number of chats generating at once; extra jobs queue. Default: 10.10

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 user's own ChatGPT account (uses their plan's image quota, not API credits). Each generate job opens a NEW ChatGPT chat; many jobs in one call run in parallel. Every result has a chat_id — pass it to edit_images to iterate on that exact image with full chat context. Images are saved to disk; read the returned paths (or set return_images) to look at them. Calls return within ~50s; if all_finished is false the images are still generating — call wait_for_jobs (no arguments) until all_finished is true. That's normal, not an error. When images finish, show them to the user (e.g. send the saved files with your file-sharing tool). Quality: use presets (list_presets), proven wording (search_prompts), one subject per image, exact text in text. Images the user attaches in chat can be passed as reference_images (their file path). Brand identities: generate_brand_kit.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_imagesA

Generate one or many images with ChatGPT. Each job runs in its OWN NEW chat, and all jobs in one call generate in parallel (send 10-20 at once for variations or a whole asset set). Returns saved file paths plus a chat_id per image for follow-up edits via edit_images. Typical time: 30-120 s; if the call returns before everything is done, call wait_for_jobs until all_finished is true. For quality, pick a preset (list_presets) and/or borrow proven wording via search_prompts. Attach user-provided images with reference_images.

edit_imagesA

Send a follow-up prompt into existing ChatGPT chats (by chat_id from an earlier result, or a chatgpt.com/c/... URL) to refine the image there — 'make the background darker', 'same character, now running', 'fix the text to say X'. The chat keeps full context of previous images. Several edits (different chats) run in parallel; edits to the same chat run in order.

wait_for_jobsA

Check on or wait for jobs started with wait=false (or that outlasted a call's timeout). Omit job_ids to wait for everything still running.

get_chat_imagesA

Download every generated image (full resolution) from one or MANY ChatGPT chats in a single call — late finishers after a timeout, or chats made by hand in the ChatGPT UI. Pass all chat ids at once in chat_ids (don't call this in parallel). Chats not reached before the call's time limit come back as not_fetched — call again with just those.

list_presetsA

Prompt presets (brand, logo, mascot, product, fashion, portrait, interior, architecture, garden, vehicles, nature, macro, food, backgrounds, video start frames, UI/layout, illustration…) plus style modifiers and the core prompting rules. Use a preset id in generate_images/edit_images jobs. Call this before writing image prompts if you haven't yet.

search_promptsA

Search ~17,000 real-world image prompts (open collections: EvoLink CC0, ZeroLu MIT, YouMind MIT) with sample-image links. Use to borrow structure and wording that's known to work for a subject (e.g. 'perfume ad', 'isometric room', 'character sheet', 'youtube thumbnail'), then adapt it — don't copy blindly. Categories include portrait, poster, ui, ecommerce, ad-creative, character, product-marketing, profile-avatar, social-media-post, infographic, game-asset, comic-storyboard, app-web-design.

generate_brand_kitA

Brand identity done properly: for each creative direction, first generates a logo-system sheet (logo, palette, type), then generates every requested asset FROM that sheet (attached as a reference) so all assets share one logo, palette and type. Assets default to app icon, stationery, social post, website hero, packaging and signage. All directions run in parallel; assets start as soon as their logo sheet is ready. Collect with wait_for_jobs.

list_chatsB

List chats this server has created/edited (newest first) with every turn's prompt and saved image paths. Use to find a chat_id to keep iterating.

chatgpt_statusA

Check that the ChatGPT session is logged in (and which plan), plus queue stats.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation4/5

Core actions are clearly separated: generate_images (new chats, parallel batch), edit_images (iterate in an existing chat), generate_brand_kit (multi-asset identity from a shared logo sheet). The only soft overlaps are get_chat_images vs list_chats (download images vs browse chat history/metadata) and wait_for_jobs vs get_chat_images, but both descriptions make the boundary explicit.

Naming Consistency4/5

Nearly all tools follow a verb_noun snake_case pattern (generate_images, edit_images, list_presets, get_chat_images, search_prompts, wait_for_jobs, list_chats). The single deviation is chatgpt_status, which is noun-first and describes a system state rather than an action.

Tool Count5/5

Nine tools is well within the ideal range and each one covers a distinct stage of the workflow: discovery (list_presets, search_prompts, list_chats), production (generate_images, generate_brand_kit), refinement (edit_images), collection (wait_for_jobs, get_chat_images) and health (chatgpt_status). No tool feels redundant or missing from the count perspective.

Completeness4/5

The async generate → wait → download → edit lifecycle is fully covered, along with prompt/preset discovery and session status. Minor gaps exist: no way to cancel or abort a running job, and no delete/cleanup operation for chat history or saved images, which an agent may want after experimenting.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues