ImageGen MCP Server

ImageGen MCP Server

imagegen•bywritingmate

An MCP server for AI image generation supporting OpenAI GPT-Image-1, Google Imagen 4, Flux 1.1, Qwen Image, SeedDream-4, and Nano Banana (Gemini 2.5 Flash Image).

License: MIT License•Runtime: Awaiting documentation review•Category: media design

WHAT IT DOES

  • •Provides an image.generate.openai tool for generating images with OpenAI's GPT-Image-1 and DALL-E models, including background control and flexible sizing.
  • •Provides an image.generate.gemini tool for generating images with Google's Gemini 2.5 Flash Image Preview model (Nano Banana).
  • •Provides an image.generate.replicate tool supporting Flux 1.1 Pro, Qwen Image, and SeedDream-4 with width, height, and seed parameters.
  • •Returns generated images as base64 content and saves them to a configured output directory with timestamped filenames.

BEST FOR

  • •Generating images from text prompts in any MCP-compatible client such as Claude Desktop or Claude Code CLI.
  • •Comparing or choosing among multiple image-generation providers and models through a single server.
  • •Producing reproducible image generations using seed values with Flux models.

ABOUT IMAGEGEN

ImageGen MCP Server is cataloged as an MCP server attributed to writingmate. An MCP server for AI image generation supporting OpenAI GPT-Image-1, Google Imagen 4, Flux 1.1, Qwen Image, SeedDream-4, and Nano Banana (Gemini 2.5 Flash Image). It is categorized under media design. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for ImageGen MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which image generation providers does this MCP server support?

It supports OpenAI (GPT-Image-1, DALL-E), Google (Imagen 4 and Gemini 2.5 Flash Image/Nano Banana), and Replicate models (Flux 1.1 Pro, Qwen Image, SeedDream-4).

What output formats can generated images use?

Images can be produced as PNG, JPEG, or WebP, and can be returned as base64 or saved to disk.

Do I need my own API keys to run the server?

Yes, running it yourself requires at least one of OPENAI_API_KEY, GOOGLE_API_KEY, or REPLICATE_API_TOKEN, though WritingMate.ai is described as pre-configured.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 110d3a579d0a · 采集于 2026-11-13 09:09:41 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

🎨 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

npm version license models

GPT-Image-1 MCP • Nano Banana MCP • Google Imagen 4 MCP • Flux 1.1 MCP

npx imagegen-mcp-server

Powered by WritingMate.ai


🎬 Quick Demo

⚡ Instant (WritingMate.ai)

  1. Visit WritingMate.ai
  2. Say: "Generate an image of a cyberpunk city using Flux 1.1"
  3. ✅ Done! - No setup, no API keys needed

🛠️ Self-Setup (Other Clients)

# Install and run in one command
npx imagegen-mcp-server

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"

Flux 1.1 Pro

Flux 1.1 Pro MCP
black-forest-labs/flux-1.1-pro

Qwen Image

Qwen Image MCP
qwen/qwen-image

SeedDream-4

SeedDream-4 MCP
bytedance/seedream-4

Nano Banana

Nano Banana MCP
Gemini 2.5 Flash Image Preview

✨ Features

ProviderModelsKeywordsHighlights
🤖 OpenAIGPT-Image-1, DALL-E 3, DALL-E 2gpt-image-1 mcp, openai image genLatest GPT-Image-1 with background control
🧠 Nano BananaGemini 2.5 Flash Image Previewnano banana mcpFast generation via official Google SDK
🎨 Google ImagenImagen 4 (custom endpoint)google imagen 4 mcpAdvanced photorealistic image generation
⚡ ReplicateFlux 1.1 Pro, Qwen Image, SeedDream-4flux 1.1 mcp, qwen image mcp, seedream-4 mcpMultiple 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

ClientSetup RequiredAPI KeysConfigurationReady Time
WritingMate.ai✅ None✅ Pre-configured✅ Built-inInstant
Claude DesktopManual configYour own keysJSON editing~5 minutes
Claude Code CLICommand/configYour own keysManual setup~5 minutes
Other MCP clientsManual setupYour own keysClient-specific~5-10 minutes

🚀 Quick Start

# Install globally
npm install -g imagegen-mcp-server

# Or use with npx (no installation required)
npx imagegen-mcp-server

Option 2: Install from source

# Clone the repository
git clone https://github.com/writingmate/imagegen-mcp.git
cd imagegen-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Run the server
npm start

Requirements

  • Node.js 18+
  • API keys: OPENAI_API_KEY, GOOGLE_API_KEY, and/or REPLICATE_API_TOKEN

Configuration

Create a .env file in your project directory:

# Required: OpenAI API Key for DALL-E models
OPENAI_API_KEY=your-openai-api-key-here

# Required: Google API Key for Imagen and Gemini
GOOGLE_API_KEY=your-google-api-key-here

# Required: Replicate API Token for Flux models
REPLICATE_API_TOKEN=your-replicate-api-token-here

# Optional: Custom Google Imagen endpoint
GOOGLE_IMAGEN_ENDPOINT=

# Optional: Output directory for generated images (default: outputs)
OUTPUT_DIR=outputs

🔧 Setup & Configuration

1. Get API Keys

You'll need at least one of these API keys:

ProviderHow to Get API KeyCost
OpenAIGet OpenAI API Key~$0.02-0.08 per image
GoogleGet Google API KeyFree tier available
ReplicateGet Replicate Token~$0.003-0.01 per image

2. Configure Environment

Create a .env file in your project directory:

# Add the API keys for the providers you want to use
OPENAI_API_KEY=your-openai-api-key-here
GOOGLE_API_KEY=your-google-api-key-here  
REPLICATE_API_TOKEN=your-replicate-api-token-here

# Optional settings
OUTPUT_DIR=outputs
GOOGLE_IMAGEN_ENDPOINT=

3. Add to Your MCP Client

Choose your preferred MCP client:

✨ Already installed and configured! No setup required.

  1. Visit WritingMate.ai
  2. Start generating images immediately: "Generate an image of a sunset using Flux"
  3. 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

{
  "mcpServers": {
    "imagegen": {
      "command": "npx",
      "args": ["imagegen-mcp-server"]
    }
  }
}

⌨️ Claude Code CLI

Add to your MCP configuration:

# Add to Claude Code MCP settings
claude-code config mcp add imagegen npx imagegen-mcp-server

Or manually configure in your Claude Code settings file:

{
  "mcpServers": {
    "imagegen": {
      "command": "npx", 
      "args": ["imagegen-mcp-server"]
    }
  }
}

📝 Codeium CLI (Codex)

Add to your Codeium MCP configuration:

{
  "mcp_servers": {
    "imagegen": {
      "command": "npx",
      "args": ["imagegen-mcp-server"],
      "env": {}
    }
  }
}

🔧 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

# Test if the server starts correctly
npx imagegen-mcp-server

# Or if installed globally
imagegen-mcp-server

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:

{
  prompt: string;              // Required: Image description
  model?: string;              // "dall-e-2", "dall-e-3", "gpt-image-1" (default)
  size?: string;               // "1024x1024", "1792x1024", "1024x1792", etc.
  width?: number;              // Alternative to size
  height?: number;             // Alternative to size
  quality?: "standard" | "hd" | "low" | "medium" | "high" | "auto";
  format?: "png" | "jpeg" | "jpg" | "webp";
  background?: "transparent" | "opaque" | "auto"; // gpt-image-1 only
  style?: "vivid" | "natural";  // DALL-E 3 only
  returnBase64?: boolean;      // Include base64 in response
  filenameHint?: string;       // Custom filename prefix
}

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:

{
  prompt: string;              // Required: Image description
  model?: string;              // Model name
  size?: string;               // Image dimensions
  quality?: string;            // Quality setting
  format?: "png" | "jpeg" | "jpg" | "webp";
  returnBase64?: boolean;
  filenameHint?: string;
}

Requirements:

  • Set GOOGLE_IMAGEN_ENDPOINT in your .env file
  • Endpoint 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:

{
  prompt: string;              // Required: Image description
  model?: string;              // Default: "gemini-2.5-flash-image-preview"
  returnBase64?: boolean;
  filenameHint?: string;
}

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 following
  • Qwen Image MCP: qwen/qwen-image - Advanced AI image generation
  • SeedDream-4 MCP: bytedance/seedream-4 - High-quality diffusion model

Parameters:

{
  prompt: string;              // Required: Image description
  model?: string;              // Default: "black-forest-labs/flux-1.1-pro"
  width?: number;              // Image width (default: 1024)
  height?: number;             // Image height (default: 1024)
  size?: string;               // Alternative format: "1024x1024"
  format?: "png" | "jpeg" | "jpg" | "webp";
  seed?: number;               // Reproducible generation
  returnBase64?: boolean;
  filenameHint?: string;
}

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

const result = await mcpClient.callTool("image.generate.openai", {
  prompt: "A serene mountain landscape at sunset",
  model: "gpt-image-1",
  size: "1536x1024",
  format: "webp",
  background: "transparent",
  quality: "high"
});

Generate with Google Gemini

const result = await mcpClient.callTool("image.generate.gemini", {
  prompt: "A futuristic city with flying cars",
  returnBase64: true
});

Generate with Flux 1.1

const result = await mcpClient.callTool("image.generate.replicate", {
  prompt: "A detailed portrait of a robot in a cyberpunk setting",
  model: "black-forest-labs/flux-1.1-pro", // Default model
  width: 1024,
  height: 1536,
  seed: 12345,
  format: "png"
});

Generate with Qwen Image

const result = await mcpClient.callTool("image.generate.replicate", {
  prompt: "A traditional Chinese landscape painting with mountains and rivers",
  model: "qwen/qwen-image",
  width: 1024,
  height: 1024
});

Generate with SeedDream-4

const result = await mcpClient.callTool("image.generate.replicate", {
  prompt: "A vibrant abstract art piece with flowing colors",
  model: "bytedance/seedream-4",
  width: 1024,
  height: 1024 // Minimum 1024x1024 required
});

Output Format

All tools return a consistent response format:

{
  content: [
    {
      type: "text",
      text: "provider=openai model=gpt-image-1 saved=/path/to/image.png"
    },
    {
      type: "image",        // Only if returnBase64: true
      data: "base64data",
      mimeType: "image/png"
    }
  ]
}

Generated images are automatically saved to the configured output directory with timestamped filenames.

Publishing to npm

The package is ready for npm publishing:

# Update version
npm version patch|minor|major

# Publish
npm publish

API Keys Setup

OpenAI API Key

  1. Visit OpenAI API Keys
  2. Create a new API key
  3. Add to .env as OPENAI_API_KEY

Google API Key

  1. Visit Google AI Studio
  2. Create API key and enable required APIs
  3. Add to .env as GOOGLE_API_KEY

Replicate API Token

  1. Visit Replicate
  2. Sign up and go to your account settings
  3. Create an API token
  4. Add to .env as REPLICATE_API_TOKEN

Development

npm install    # Install dependencies
npm run dev    # Development with hot reload
npm run build  # Build for production
npm start      # Start production server

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

WritingMate.ai

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for ImageGen MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/imagegen)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related media design MCP Servers

Alternative and complementary servers in the same category

View all in media design →

A Rust CAD application with an MCP server for creating, inspecting and rendering drawings, either headlessly or through a connection to the desktop app.

8K
Media & Design
Liquid Composer
liquid-composer•frontedu

Liquid Composer is a browser-based Liquid Glass icon design tool that offers a local MCP server for agent-driven icon workflows.

69
Media & Design

agent-media makes short drama series and other short vertical videos from Claude, ChatGPT or Codex through one MCP connection, with OAuth sign-in and no API keys.

1
Media & Design