ai-image-gpt
Generates images through the ChatGPT web backend and saves them to exact user-specified paths; supports multi-account OAuth login, live quota checks, aspect-ratio selection, prompt enhancement toggles, and reasoning-effort settings.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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: imaginate-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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate images and videos with Seedance, Veo, Wan, Grok, GPT-Image and Nano Banana via one MCP.
Generate images with any major model — one API key, one prepaid balance, one MCP.
Generate AI images and videos from any compatible MCP client.
Generate images, video and audio in Claude, Codex and any MCP-ready AI agent.
Related MCP Servers
- FlicenseAqualityDmaintenanceStandalone MCP server and CLI for generating images via ChatGPT backend, with reliable exact file paths and multi-account login support.25-
- AlicenseAqualityDmaintenanceGenerates and edits images using OpenAI GPT Image or Google Gemini models, saving every result to disk and returning local file paths so AI assistants can continue working with the images. It enables prompt-based image creation, editing, inpainting, multi-image composition, and model listing through MCP tools.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable agents to generate and edit images through Gemini or OpenAI, returning an absolute file path instead of image bytes to keep context windows clean.1MIT
- AlicenseAqualityDmaintenanceEnables MCP clients to generate and edit images through Codex's built-in image generation using a ChatGPT login, returning final files with metadata and optional inline previews.4MIT