ai-image-gpt-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-image-gpt-mcp generate an image of a cute puppy on a beach"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ai-image-gpt-mcp
Standalone MCP server + CLI for ChatGPT image generation (image only).
A trimmed, image-focused fork of ai-slides-mcp: all the slide / PowerPoint features are removed, and the image-generation path is made reliable (one call = one image = one exact returned path, no re-generation).
What it does
aigpt gen "<prompt>"generates an image via the ChatGPT backend and saves it.MCP tools
generate_imageandlogin_statusfor use inside Claude Code, Codex, etc.Multi-account login with quota-aware selection.
Related MCP server: MCP OpenAI Image Generator
The reliability fix
The original tool returned images into a directory with an auto-generated name, which made callers guess where the file landed and sometimes re-generate the same image (wasting quota). This fork fixes that:
aigpt gen "..." --out shot.pngsaves to exactlyshot.pngand prints its absolute path on stdout (one line). Use that path directly.--out <dir>still works for a directory ofnimages.The MCP
generate_imagereturns absolute paths in{"paths": [...]}.
One generation call produces one image. Never re-run a call to "find" the file.
Install
Requires Python 3.12+ and uv.
git clone https://github.com/andyluu98/ai-image-gpt-mcp.git
cd ai-image-gpt-mcp
uv syncLogin (2-step OAuth with ChatGPT)
uv run aigpt login
# A browser opens -> log into ChatGPT -> you land on a platform.openai.com page.
# Copy the FULL callback URL, then:
uv run aigpt login --callback "<paste the URL here>"
uv run aigpt accounts # check logged-in accounts + live quotaGenerate
# one exact file
uv run aigpt gen "a red apple on white, minimal" --out shot.png
# skip prompt auto-expansion (faster, more literal) + set reasoning effort
uv run aigpt gen "..." --out shot.png --no-enhance --thinking standard
# a directory of N images
uv run aigpt gen "..." --n 2 --out ./images
# aspect ratio: 16:9 (default), 1:1, 9:16, 4:3, 3:4, or WxH
uv run aigpt gen "..." --aspect 9:16 --out portrait.png--thinking (auto/standard/extended/max) raises image reasoning effort;
higher renders text (e.g. Vietnamese diacritics) better but is slower.
Register as an MCP server
Same shape for Claude Code, Codex, Antigravity:
{
"mcpServers": {
"ai-image-gpt": {
"command": "uv",
"args": ["run", "--directory", "<absolute path to this repo>", "aigpt-mcp"]
}
}
}Exposed tools: generate_image, login_status.
Disclaimer
This tool talks to the ChatGPT web backend (vendored chatgpt2api), not an official
OpenAI API. Using it may violate OpenAI's Terms of Service and can get your account
rate-limited or banned. For experimentation only. You are responsible for your use.
Credits
Image + OAuth engine vendored from chatgpt2api (MIT).
Structure based on ai-slides-mcp.
Available Tools
2 toolsgenerate_imageA
Generate image(s) from a text prompt at the given aspect ratio (16:9, 1:1, 3:4, 4:3, 9:16, or WxH). Generates ONCE and returns the exact ABSOLUTE file path(s) saved, e.g. {"paths": ["C:/.../img-....png"]}. Callers should use the returned path directly and never re-generate to "find" the file.
Images are saved into out_dir (created if missing) as img--.png.
When enhance is True (default), the prompt is auto-expanded via the ChatGPT text path before drawing. style='slide' = clean editorial look; style='fintech' = light-blue dashboard look; style='auto' is the general default.
thinking sets reasoning effort: 'auto' (ChatGPT default) or 'standard'/ 'extended'/'max' (increasing). Higher effort improves rendered-text fidelity (e.g. Vietnamese diacritics) at the cost of speed.
brand_colors (list of hex like ['#10B981']) forces a palette; reserve_corner (e.g. 'top-left') keeps a corner clear for a logo and bans model-drawn logos/text. With enhance=False these still apply via the offline template.
Inputs: prompt (required), n, style, aspect, +5 more.
login_statusA
Check logged-in ChatGPT accounts. Cheap + hint-based (no network probe):
returns {authed, accounts:[{email, type, alive, restore_at}], ready_count}.
ready_count is from persisted hints; for live quota run the CLI aigpt accounts.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve entirely different functions: one checks authentication status, the other generates images. There is no overlap or ambiguity between them.
Both tool names follow the same verb_noun snake_case pattern: login_status and generate_image. The naming is clear, predictable, and consistent.
With only two tools, the server is minimal but appropriately scoped for its single-purpose image generation functionality. The login_status helper supports the main generate_image tool without unnecessary bloat.
The tool set covers the core lifecycle of image generation: checking authentication and generating images with extensive options for style, aspect ratio, enhancement, and thinking effort. There are no obvious gaps for the stated domain.
Maintenance
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for Hailuo (MiniMax) AI video generation
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.-
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's gpt-image-2 image generation API, enabling image generation from text prompts, listing saved images, and loading images inline.1MIT
- AlicenseNot gradedqualityDmaintenanceA minimal MCP server for generating images via OpenAI's GPT image model, supporting inline display or file output.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that gives non-image-capable models like DeepSeek the ability to generate images using backends such as Qwen-Image, Seedream, and CogView, saving them locally and returning file paths instead of base64 data.1MIT