MCP Image

v0.11.0Data Science & MLstable

MCP server for AI image generation and editing with automatic prompt optimization and quality presets. Powered by Gemini (Nano Banana 2 & Pro), with optional OpenAI GPT Image support.

agent-skillsai-toolsclaude-codecodexcursor
Share:
110
Stars
0
Downloads
0
Weekly
0/5

What is MCP Image?

MCP Image is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for ai image generation and editing with automatic prompt optimization and quality presets. powered by gemini (nano banana 2 & pro), with optional openai gpt image support.

MCP server for AI image generation and editing with automatic prompt optimization and quality presets. Powered by Gemini (Nano Banana 2 & Pro), with optional OpenAI GPT Image support.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • generate_image

Use Cases

Generate and edit images with automatic prompt optimization.
Use Gemini Nano and Pro for local and cloud-based image generation.
Support optional OpenAI GPT Image API integration.
shinpr

Maintainer

LicenseMIT
Languagetypescript
Versionv0.11.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-image

Manual Installation

npx -y mcp-image

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Image

MCP Image is an AI image generation and editing MCP server powered by Google Gemini (Nano Banana 2 / Gemini 3.1 Flash Image and Nano Banana Pro / Gemini 3 Pro Image), with optional OpenAI GPT Image support. It automatically enriches simple text prompts using a Subject-Context-Style framework — adding lighting, composition, atmosphere, and artistic details — so you get high-quality images without any prompt engineering. It supports text-to-image, image-to-image editing, high-resolution output up to 4K, flexible aspect ratios, and multi-image blending, making it ideal for developers who want professional images directly from their AI coding tools.

Prerequisites

  • Node.js 22 or higher
  • A Gemini API key from Google AI Studio (aistudio.google.com/apikey) for the default provider
  • An OpenAI API key (optional) if you want to use IMAGE_PROVIDER=openai with gpt-image-2
  • An MCP-compatible client: Claude Code, Cursor, Codex, or Claude Desktop
  • An absolute local directory path where generated images will be saved
1

Obtain a Gemini API key

Visit Google AI Studio at aistudio.google.com/apikey, sign in with your Google account, and create a new API key. Copy the key — you will supply it as the GEMINI_API_KEY environment variable. If you prefer OpenAI instead, skip this step and get an OpenAI API key from platform.openai.com/api-keys.

2

Choose an output directory

Decide on an absolute path where generated images will be written. The server uses this path via the IMAGE_OUTPUT_DIR environment variable. Create the directory in advance if it does not already exist.

mkdir -p /absolute/path/to/images
3

Add the MCP server to Claude Code

Run the following command in your terminal to register mcp-image with Claude Code for the current project. Replace the placeholder values with your real API key and image directory.

claude mcp add mcp-image --env GEMINI_API_KEY=your-gemini-api-key --env IMAGE_OUTPUT_DIR=/absolute/path/to/images -- npx -y mcp-image
4

Verify the server is running

Inside Claude Code, type /mcp to list connected servers. You should see mcp-image listed with a green status. If you see an error, check that your GEMINI_API_KEY is correct and that Node.js 22+ is on your PATH.

5

(Optional) Switch to OpenAI provider

To use OpenAI GPT Image (gpt-image-2) instead of Gemini, add the IMAGE_PROVIDER and OPENAI_API_KEY environment variables. Note that OpenAI mode requires organization verification on the OpenAI platform before it will work.

claude mcp add mcp-image --env IMAGE_PROVIDER=openai --env OPENAI_API_KEY=your-openai-api-key --env IMAGE_OUTPUT_DIR=/absolute/path/to/images -- npx -y mcp-image

MCP Image Examples

Client configuration (Claude Desktop / Cursor)

Add this block to your claude_desktop_config.json or ~/.cursor/mcp.json to enable mcp-image with the Gemini provider.

{
  "mcpServers": {
    "mcp-image": {
      "command": "npx",
      "args": ["-y", "mcp-image"],
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key_here",
        "IMAGE_OUTPUT_DIR": "/absolute/path/to/images"
      }
    }
  }
}

Prompts to try

Once the server is connected, use these prompts in your AI client to generate images. The server automatically optimizes your prompt before calling the Gemini API.

- "Generate an image of a futuristic city at dusk with neon reflections on wet streets"
- "Create a product photo of a minimalist wooden desk lamp on a white background, studio lighting"
- "Edit this image to make the sky look like a stormy sunset" (attach an image first)
- "Generate a 16:9 banner image for a tech blog about machine learning, abstract style"
- "Create a portrait illustration of a fantasy wizard in a dark forest, painterly style"

Troubleshooting MCP Image

Images are not saved or the server reports a path error

Ensure IMAGE_OUTPUT_DIR is set to an absolute path (not relative), and that the directory already exists with write permissions. The server does not create the directory automatically.

API key invalid or quota exceeded error from Gemini

Double-check that GEMINI_API_KEY matches the key shown in Google AI Studio. Free-tier keys have per-minute and per-day quotas; if you hit a 429 error, wait a minute or upgrade your plan.

OpenAI provider returns an authorization error

OpenAI image generation (gpt-image-2) requires your OpenAI organization to have completed identity/payment verification. Check your organization status at platform.openai.com/organization before using IMAGE_PROVIDER=openai.

Frequently Asked Questions about MCP Image

What is MCP Image?

MCP Image is a Model Context Protocol (MCP) server that mcp server for ai image generation and editing with automatic prompt optimization and quality presets. powered by gemini (nano banana 2 & pro), with optional openai gpt image support. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Image?

Install via npm with the command: npx -y mcp-image. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with MCP Image?

MCP Image works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Image free to use?

Yes, MCP Image is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-image": { "command": "npx", "args": ["-y", "mcp-image"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Image?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides