Gemini Image Generator MCP
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
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
Maintainer
Works with
Installation
Manual Installation
npx gemini-image-generator-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 .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.
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.
Restart Claude Desktop
After saving the config file, restart Claude Desktop. The Gemini image tools will appear in the assistant's available tool set.
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.
Gemini Image Generator MCP Alternatives — Similar APIs Servers
Looking for alternatives to Gemini Image Generator MCP? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
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.
Set Up Gemini Image Generator MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.