imagegen
Allows generating and editing images using Google Gemini models.
Allows generating and editing images using OpenAI's GPT Image models.
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., "@imagegenGenerate a photorealistic sunset over the ocean with vibrant orange and purple colors"
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.
imagegen
Local-first MCP image generation server with multi-model support and an embedded interactive studio.
Generate and edit AI images through OpenAI GPT Image and Google Gemini models via the Model Context Protocol (MCP). Includes a built-in studio UI for visual iteration directly inside the chat surface.
Works with any MCP-compatible client: Claude Desktop, Cursor, Windsurf, AnythingLLM, and other AI platforms.
Features
Multi-model support -- OpenAI GPT Image 1.5, GPT Image 1 Mini, Google Gemini 3.1 Flash, Gemini 3 Pro, Gemini 2.5 Flash
Image generation -- create images from detailed text prompts with configurable aspect ratios and quality profiles
Image editing -- modify existing images with natural language instructions and optional reference images
Embedded studio -- interactive MCP App for browsing assets, switching models, adjusting settings, and iterating visually
Local asset storage -- all generated and uploaded images are persisted locally with full history
Enterprise-ready -- configurable model access, concurrency limits, and provider API key management
Related MCP server: jgkme/kilo-image-gen-mcp
Tools
Model-visible
These tools are exposed to the AI model:
Tool | Description |
| Generate a new image from a detailed text prompt |
| Edit an existing image using instructions and optional reference images |
| List enabled image models and their capabilities |
App-only
These tools are used internally by the embedded studio UI and are not visible to the AI model:
imagegen_list_assets, imagegen_read_asset_bytes, imagegen_create_upload,
imagegen_append_upload_chunk, imagegen_finalize_upload
Quick start
Prerequisites: Node.js >= 24, pnpm
git clone https://github.com/CCimen/imagegen.git
cd imagegen
pnpm install
cp .env.example .envSet at least one provider API key in .env:
OPENAI_API_KEY=sk-...
# and/or
GOOGLE_API_KEY=AI...Start the server:
pnpm devThe Streamable HTTP endpoint is available at:
http://127.0.0.1:3001/mcpConfiguration
Variable | Default | Description |
| -- | OpenAI API key (required for GPT Image models) |
| -- | Google AI API key (required for Gemini Image models) |
|
| Local directory for generated assets |
|
| Comma-separated list of enabled model IDs |
|
| Model used when none is specified |
|
| Max concurrent image generation requests |
|
| Server bind address |
|
| Server port |
MCP client configuration
Add this to your MCP client configuration (e.g. claude_desktop_config.json):
{
"mcpServers": {
"imagegen": {
"url": "http://127.0.0.1:3001/mcp"
}
}
}Docker: If connecting from inside a container, use
http://host.docker.internal:3001/mcpinstead of127.0.0.1.
Supported models
Model | Provider | Highlights |
| OpenAI | State-of-the-art image generation and editing |
| OpenAI | Cost-efficient variant with editing support |
| Fast generation with thinking controls | |
| High-fidelity text rendering | |
| Low-latency generation |
Models are enabled via IMAGEGEN_ENABLED_MODELS in .env. The server fails
fast on startup if no enabled models have valid API keys configured.
Development
pnpm dev # build studio + start server in watch mode
pnpm test # run all tests
pnpm test:e2e # run end-to-end server tests
pnpm build # production build
pnpm start # start production server
pnpm check # type-check all packagesLicense
If you run a modified version of this server for users over a network, you must make the corresponding source available to those users, as required by the AGPL.
This server cannot be deployed
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 Flux AI image generation
MCP server for NanoBanana AI image generation and editing
Related MCP Servers
- AlicenseBqualityDmaintenanceA local MCP server for generating and editing images using OpenAI-compatible APIs. It provides text-to-image generation and image editing capabilities with configurable endpoints and saves output directly to local files.211 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for generating, editing, and processing images via multiple providers including Kilo, OpenRouter, OpenAI, and Gemini, with local tools for background removal, resizing, and cropping.19 npm3MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.-
- AlicenseAqualityDmaintenanceMCP server for generating and editing images using Google Gemini API, with support for multi-turn iterative refinement.325 npmMIT