ai-image-gpt-mcp
Click on "Install 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-mcpgenerate 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: glm-image-mcp-server
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.
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| style | No | auto | |
| aspect | No | 16:9 | |
| prompt | Yes | ||
| enhance | No | ||
| out_dir | No | out | |
| thinking | No | auto | |
| brand_colors | No | ||
| reserve_corner | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility and does so admirably. It discloses that generation happens ONCE, where and how files are saved (out_dir, img-<timestamp>-<i>.png), that enhance auto-expands prompts via ChatGPT, what each style looks like, the effect of thinking levels on text fidelity, and that brand_colors/reserve_corner apply even when enhance=False. This is rich, non-obvious behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Despite being about 200 words, every sentence contributes functional value. The description is front-loaded with the core purpose and critical usage rule, then organizes parameter details into clear, scannable paragraphs. There is no repetition or fluff; it's appropriately dense for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 9 parameters, no annotations, and no output schema, the description covers the key aspects: return format (JSON with absolute paths), file-saving behavior, generation-once guarantee, and the effects of each parameter. It even mentions edge cases like enhance=False still applying brand_colors. This is very complete for the tool's scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no descriptions (0% coverage), so the text must compensate. The description explains aspect ratio values, enhance, style meanings, thinking levels, brand_colors, reserve_corner, and out_dir. It implies the 'n' parameter via 'image(s)' and the -<i>.png pattern, but doesn't explicitly state that n controls the count. Still, the explanation covers the vast majority of the 9 parameters with practical meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource statement: 'Generate image(s) from a text prompt at the given aspect ratio.' It also lists the allowed aspect ratios and gives a concrete example of the returned paths. This clearly distinguishes the tool from its only sibling (login_status) and fully conveys its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context, especially the explicit instruction to use the returned path directly and never re-generate to 'find' the file. It also explains how enhance, style, thinking, brand_colors, and reserve_corner affect output. There are no relevant alternative tools to compare against, so explicit when-not-to-use guidance isn't necessary, but the provided constraints are valuable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the burden. It discloses that the tool is hint-based, performs no network probe, and derives ready_count from persisted hints, making the data's potential staleness transparent. It also details the exact return structure, which is crucial in absence of an output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet information-dense. It front-loads the purpose, then adds key behavioral notes and return shape, and finishes with a practical caveat and pointer. Every sentence adds value; there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with no output schema, the description covers all essentials: what it does, its limitations, the exact return value, and when to use an alternative. This is fully self-contained and leaves no critical gaps for an AI agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is trivially covered at 100%. Per the rubric, 0 params earn a baseline of 4. The description adds nothing about parameters because there is nothing to add, but this is appropriate given the tool's design.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Check logged-in ChatGPT accounts.' The verb 'check' and resource 'logged-in ChatGPT accounts' are specific, and the description also outlines the return shape, removing ambiguity. It is easily distinguished from the sibling generate_image tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly frames when to use this tool: 'Cheap + hint-based (no network probe),' and provides a direct alternative for live data: 'for live quota run the CLI `aigpt accounts`'. This gives the agent a clear decision path between this tool and the recommended alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
generate_image - First observed
login_status
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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 Hailuo (MiniMax) AI video generation
MCP server for Flux AI image generation
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.-
- AlicenseAqualityDmaintenanceMCP server for generating images using Z.AI's glm-image model. Supports image generation with various sizes and qualities, and includes batch CLI functionality.118MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that wraps OpenAI's gpt-image-2 image generation API, enabling image generation from text prompts, listing saved images, and loading images inline.1-
- AlicenseNot gradedqualityCmaintenanceA minimal MCP server for generating images via OpenAI's GPT image model, supporting inline display or file output.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/andyluu98/ai-image-gpt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server