Generates high-quality images using ByteDance's SeedDream-4 diffusion model via Replicate API with support for custom dimensions and various output formats.
Generates photorealistic images using Google's Imagen 4 model via custom endpoint with support for various quality settings and output formats.
Generates images using Google's Gemini 2.5 Flash Image Preview model (Nano Banana) through the official Google SDK for fast, efficient image generation.
Generates images using OpenAI's GPT-Image-1, DALL-E 3, and DALL-E 2 models with support for custom sizing, quality settings, multiple formats (PNG, JPEG, WebP), and background control for GPT-Image-1.
Generates images using multiple state-of-the-art models including Flux 1.1 Pro, Qwen Image, and SeedDream-4 with support for custom dimensions, seed-based reproducible generation, and various output formats.
šØ ImageGen MCP Server
A powerful MCP server for AI image generation with OpenAI GPT-Image-1, Google Imagen 4, Flux 1.1, Qwen Image, SeedDream-4, and Nano Banana (Gemini 2.5 Flash Image) support
š¬ Quick Demo
ā” Instant (WritingMate.ai)
Visit WritingMate.ai
Say: "Generate an image of a cyberpunk city using Flux 1.1"
ā Done! - No setup, no API keys needed
š ļø Self-Setup (Other Clients)
Then in your MCP client:
"Generate an image of a cyberpunk city using Flux 1.1"
ā
Result: High-quality image saved to outputs/ directory
An MCP (Model Context Protocol) server for AI image generation supporting:
GPT-Image-1 MCP: OpenAI's latest image generation model
Nano Banana MCP: Gemini 2.5 Flash Image Preview model
Google Imagen 4 MCP: Advanced photorealistic image generation
Flux 1.1 MCP: State-of-the-art prompt following via Replicate
šØ Model Comparison
Same prompt: "A serene mountain landscape with a crystal clear lake reflecting snow-capped peaks, golden hour lighting, highly detailed"
⨠Features
Provider | Models | Keywords | Highlights |
š¤ OpenAI | GPT-Image-1, DALL-E 3, DALL-E 2 |
| Latest GPT-Image-1 with background control |
š§ Nano Banana | Gemini 2.5 Flash Image Preview |
| Fast generation via official Google SDK |
šØ Google Imagen | Imagen 4 (custom endpoint) |
| Advanced photorealistic image generation |
ā” Replicate | Flux 1.1 Pro, Qwen Image, SeedDream-4 |
| Multiple cutting-edge models via Replicate |
šÆ Core Capabilities
Multiple Output Formats: PNG, JPEG, WebP support
Flexible Sizing: Custom dimensions and aspect ratios
Base64 & File Output: Return images as base64 or save to disk
Seed Support: Reproducible generation with Flux
MCP Compatible: Works seamlessly with any MCP client
š Setup Comparison
Client | Setup Required | API Keys | Configuration | Ready Time |
WritingMate.ai | ā None | ā Pre-configured | ā Built-in | Instant |
Claude Desktop | Manual config | Your own keys | JSON editing | ~5 minutes |
Claude Code CLI | Command/config | Your own keys | Manual setup | ~5 minutes |
Other MCP clients | Manual setup | Your own keys | Client-specific | ~5-10 minutes |
š Quick Start
Option 1: Install from npm (Recommended)
Option 2: Install from source
Requirements
Node.js 18+
API keys:
OPENAI_API_KEY,GOOGLE_API_KEY, and/orREPLICATE_API_TOKEN
Configuration
Create a .env file in your project directory:
š§ Setup & Configuration
1. Get API Keys
You'll need at least one of these API keys:
Provider | How to Get API Key | Cost |
OpenAI | ~$0.02-0.08 per image | |
Free tier available | ||
Replicate | ~$0.003-0.01 per image |
2. Configure Environment
Create a .env file in your project directory:
3. Add to Your MCP Client
Choose your preferred MCP client:
š WritingMate.ai (Recommended - Zero Setup!)
⨠Already installed and configured! No setup required.
Visit WritingMate.ai
Start generating images immediately: "Generate an image of a sunset using Flux"
All providers pre-configured and ready to use
š” Why WritingMate.ai? ImageGen MCP Server comes pre-installed with all API keys configured. Just start creating!
š„ļø Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
āØļø Claude Code CLI
Add to your MCP configuration:
Or manually configure in your Claude Code settings file:
š Codeium CLI (Codex)
Add to your Codeium MCP configuration:
š§ Other MCP Clients
For any MCP-compatible client, use:
Command: npx imagegen-mcp-server
Environment: Ensure your .env file is in the working directory with your API keys.
4. Test the Installation
Available Tools
1. OpenAI GPT-Image-1 MCP (image.generate.openai)
Generate images using OpenAI's latest GPT-Image-1 model and DALL-E series. This OpenAI image gen MCP tool supports the newest GPT-Image-1 with advanced background control.
Parameters:
Model-specific features:
DALL-E 2: Basic generation, sizes: 256Ć256, 512Ć512, 1024Ć1024
DALL-E 3: High-quality generation, sizes: 1024Ć1024, 1792Ć1024, 1024Ć1792
GPT-Image-1: Latest model with background control, multiple formats, flexible sizing
2. Google Imagen 4 MCP (image.generate.google)
Generate images using Google's advanced Imagen 4 model via custom endpoint. This Google Imagen 4 MCP integration provides cutting-edge photorealistic image generation.
Parameters:
Requirements:
Set
GOOGLE_IMAGEN_ENDPOINTin your.envfileEndpoint should accept POST requests with JSON payload
Response format:
{ image: { base64: string, mimeType?: string } }
3. Nano Banana MCP (image.generate.gemini)
Generate images using Google's Gemini 2.5 Flash Image Preview model (also known as "Nano Banana MCP"). This nano banana implementation provides fast, efficient image generation via Google's official SDK.
Parameters:
4. Replicate Models MCP (image.generate.replicate)
Generate images using multiple cutting-edge models via Replicate API:
Flux 1.1 MCP:
black-forest-labs/flux-1.1-pro(default) - State-of-the-art prompt followingQwen Image MCP:
qwen/qwen-image- Advanced AI image generationSeedDream-4 MCP:
bytedance/seedream-4- High-quality diffusion model
Parameters:
Flux Model Features:
Flux 1.1 Pro: State-of-the-art image quality and prompt following
High Resolution: Supports various aspect ratios and sizes
Fast Generation: Optimized for speed and quality
Seed Support: Reproducible image generation
Examples
Generate with OpenAI GPT-Image-1
Generate with Google Gemini
Generate with Flux 1.1
Generate with Qwen Image
Generate with SeedDream-4
Output Format
All tools return a consistent response format:
Generated images are automatically saved to the configured output directory with timestamped filenames.
Publishing to npm
The package is ready for npm publishing:
API Keys Setup
OpenAI API Key
Visit OpenAI API Keys
Create a new API key
Add to
.envasOPENAI_API_KEY
Google API Key
Visit Google AI Studio
Create API key and enable required APIs
Add to
.envasGOOGLE_API_KEY
Replicate API Token
Visit Replicate
Sign up and go to your account settings
Create an API token
Add to
.envasREPLICATE_API_TOKEN
Development
License
This project is licensed under the MIT License - see the LICENSE file for details.
š” Brought to you by
WritingMate.ai - All-in-One AI Platform
The team behind WritingMate.ai brings you powerful AI tools and integrations