- Home
- MCP servers
- Imagen
Imagen
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"michaeljabbour-imagen-mcp": {
"command": "/path/to/imagen-mcp/run.sh",
"args": [],
"env": {
"GEMINI_API_KEY": "AI...",
"OPENAI_API_KEY": "sk-..."
}
}
}
}You run a multi-provider MCP server that intelligently selects the best image generation provider for each prompt, supports multiple backends, and saves results locally. You can tailor usage with per-provider models, reference images, and optional real-time data to produce consistent, high-quality visuals across sessions.
How to use
Install and run the server locally, then connect your MCP client to start generating images. The server automatically analyzes prompts and chooses the most suitable provider (OpenAI GPT-Image-1 or Gemini Nano Banana Pro). You can override the choice with a provider parameter when you need deterministic behavior.
How to install
Prerequisites: Python 3.11+ and a working network connection for API access.
Clone the project, install dependencies, and prepare the wrapper script.
git clone https://github.com/michaeljabbour/imagen-mcp.git
cd imagen-mcp
pip install -r requirements.txt
chmod +x run.sh
Configuration and usage notes
The server can be run locally via the provided wrapper script. Use the stdio MCP configuration to connect with a client.
{
"mcpServers": {
"imagen": {
"type": "stdio",
"command": "/path/to/imagen-mcp/run.sh",
"args": [],
"env": {
"OPENAI_API_KEY": "sk-...",
"GEMINI_API_KEY": "AI..."
}
}
}
}
Additional features and behavior
Auto Provider Selection analyzes prompts to pick the right backend, saving generated images to a default location or a custom path you specify. Gemini supports reference images (up to 14) and Google Search grounding for real-time data, while OpenAI excels with text-heavy visuals and diagrams.
Default save location is a local directory such as ~/Downloads/images/ with per-provider subfolders. You can customize the output path using output_path and override the base directory with the OUTPUT_DIR environment variable.
Usage examples
Auto provider selection example: generate an infographic with a prompt that benefits from combined text and visuals.
Manual provider override example: generate_image(prompt="...", provider="openai") or generate_image(prompt="...", provider="gemini").
Available tools
generate_image
Main tool with auto provider selection for image generation
conversational_image
Multi-turn refinement with history to iteratively improve images
list_conversations
List active conversations and their history
list_providers
Show available providers and capabilities
list_gemini_models
Query available Gemini image models