Gemini Image Generator MCP

v1.0.0APIsstable

MCP server for AI image generation and editing using Google's Gemini Flash models. Create images from text prompts with intelligent filename generation and strict text exclusion. Supports text-to-image generation with future expansion to image editin

gemini-image-generator-mcp-servermcpai-integration
Share:
33
Stars
0
Downloads
0
Weekly
0/5

What is Gemini Image Generator MCP?

Gemini Image Generator MCP 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 using google's gemini flash models. create images from text prompts with intelligent filename generation and strict text exclusion. supports text-to-imag...

MCP server for AI image generation and editing using Google's Gemini Flash models. Create images from text prompts with intelligent filename generation and strict text exclusion. Supports text-to-image generation with future expansion to image editin

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

Features

  • MCP server for AI image generation and editing using Google'

Use Cases

Generate images from text prompts using Gemini Flash.
Create images with intelligent filename generation.
Exclude unwanted text from generated images.
qhdrl12

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gemini-image-generator-mcp-server

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 Gemini Image Generator MCP

The Gemini Image Generator MCP Server lets any MCP-compatible AI assistant generate and transform images using Google's Gemini 2.0 Flash model. It exposes three tools: text-to-image generation, image transformation from a file path, and image transformation from base64-encoded data. The server handles prompt engineering, automatic translation of non-English prompts, intelligent filename generation, and local storage of results — so AI assistants can create and iterate on images without the user manually managing the Gemini API.

Prerequisites

  • Python 3.11 or higher installed
  • A Google AI Studio account with a Gemini API key — get one at https://aistudio.google.com/apikey
  • uv installed for dependency management (recommended): 'curl -LsSf https://astral.sh/uv/install.sh | sh'
  • Claude Desktop, Cursor, or another MCP-compatible client
1

Clone the repository and set up a virtual environment

Clone the project and create a virtual environment using uv, then install the package in editable mode.

git clone https://github.com/qhdrl12/mcp-server-gemini-image-generator.git
cd mcp-server-gemini-image-generator
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e .
2

Get your Gemini API key

Visit https://aistudio.google.com/apikey, sign in with your Google account, click 'Create API Key', and copy the key. The API provides a free usage quota each month.

3

Configure the server in Claude Desktop

Add the server to your claude_desktop_config.json. Set GEMINI_API_KEY to your key and OUTPUT_IMAGE_PATH to the directory where generated images should be saved.

4

Restart Claude Desktop

After saving the config file, restart Claude Desktop. The Gemini image tools will appear in the assistant's available tool set.

5

Generate your first image

Ask the AI to generate an image from a text description. The server calls generate_image_from_text, saves the file to OUTPUT_IMAGE_PATH with an auto-generated filename, and returns both the image data and the file path.

Gemini Image Generator MCP Examples

Client configuration

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, replacing the path and API key with real values.

{
  "mcpServers": {
    "gemini-image-generator": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-server-gemini-image-generator",
        "run",
        "mcp_server_gemini_image_generator"
      ],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key",
        "OUTPUT_IMAGE_PATH": "/Users/you/Pictures/gemini-output"
      }
    }
  }
}

Prompts to try

Use these with Claude Desktop to exercise text-to-image and image transformation tools.

- "Generate an image of a sunset over snow-capped mountains with a lone pine tree in the foreground"
- "Create a photorealistic image of a tabby cat sitting at a laptop"
- "Transform /Users/you/Pictures/photo.jpg to look like a watercolor painting"
- "Take the image at /tmp/logo.png and make it look like a neon sign on a dark background"

Troubleshooting Gemini Image Generator MCP

Error: GEMINI_API_KEY is not set or invalid

Confirm the key is correctly placed in the env block of your claude_desktop_config.json and that it was copied in full from Google AI Studio. Visit https://aistudio.google.com/apikey to verify the key is still active.

Images are generated but Claude Desktop cannot display or find the file

This is a known issue with path resolution in Claude Desktop. Use the transform_image_from_file tool with an absolute path instead of transform_image_from_encoded, and ensure OUTPUT_IMAGE_PATH points to an existing, writable directory.

transform_image_from_encoded is very slow

Sending large base64-encoded images over the MCP stdio protocol adds significant overhead. Use transform_image_from_file with a file path whenever possible to avoid encoding/decoding latency.

Frequently Asked Questions about Gemini Image Generator MCP

What is Gemini Image Generator MCP?

Gemini Image Generator MCP is a Model Context Protocol (MCP) server that mcp server for ai image generation and editing using google's gemini flash models. create images from text prompts with intelligent filename generation and strict text exclusion. supports text-to-image generation with future expansion to image editin It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gemini Image Generator MCP?

Follow the installation instructions on the Gemini Image Generator MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Gemini Image Generator MCP?

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

Is Gemini Image Generator MCP free to use?

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

Browse More APIs MCP Servers

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

Quick Config Preview

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

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

Read the full setup guide →

Ready to use Gemini Image Generator MCP?

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