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: openrouter-image-gen-mcp
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.
This server cannot be installed
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 Servers
- Flicense-qualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.Last updated
- Alicense-qualityDmaintenanceMCP server for generating images using OpenRouter API, supporting models like Gemini 2.5 Flash. Enables image generation with flexible options like saving to local files.Last updatedDo What The F*ck You Want To Public
- Alicense-qualityDmaintenanceMCP server for generating images using Z.AI's glm-image model. Supports image generation with various sizes and qualities, and includes batch CLI functionality.Last updated4MIT
- Flicense-qualityCmaintenanceMCP server that wraps OpenAI's gpt-image-2 image generation API, enabling image generation from text prompts, listing saved images, and loading images inline.Last updated
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Flux AI image generation
MCP server for NanoBanana AI image generation and editing
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