gemini-imagen
MCP server from serkanhaslak/gemini-imagen-mcp-server
claude mcp add --transport stdio serkanhaslak-gemini-imagen-mcp-server npx -y gemini-imagen-mcp-server \ --env GEMINI_API_KEY="your-api-key-here"
How to use
This MCP server integrates Google Gemini Imagen image generation directly into Claude Code workflows. Using npx, you can run the server on demand without a full installation, and it saves generated images into your project's imagen/ folder. The server supports multiple Imagen models (imagen-3, imagen-4, imagen-4-ultra) and provides options for batch generation, seeds, aspect ratios, negative prompts, and output formats. You control the server through MCP configuration, enabling image generation as you write code, create UI mocks, or build assets within your project. To start, provide your Gemini API key via the GEMINI_API_KEY environment variable and invoke the server through your Claude Code MCP settings. The server exposes tools like generate_image, batch_generate, list_models, and health_check to streamline asset creation and status checks within your development workflow.
How to install
Prerequisites:
- Node.js 18+ installed on your system
- Access to the internet to fetch the MCP server package
- A Gemini API key from Google AI Studio
Installation steps:
- Install Node.js 18+ if not already present.
- Install the MCP server package globally or use npx as described in the quick start.
- Add your Gemini API key to the MCP configuration or environment before starting generation.
Option A: Quick start (NPX, no installation)
- In Claude Code MCP settings, configure:
{
"mcpServers": {
"gemini-imagen": {
"command": "npx",
"args": ["-y", "gemini-imagen-mcp-server"],
"env": {"GEMINI_API_KEY": "your-api-key-here"}
}
}
}
Option B: Global install (node-based)
npm install -g gemini-imagen-mcp-server
Configure:
{
"mcpServers": {
"gemini-imagen": {
"command": "gemini-imagen-mcp-server",
"env": {"GEMINI_API_KEY": "your-api-key-here"}
}
}
}
Option C: Local development
git clone https://github.com/serkanhaslak/gemini-imagen-mcp-server.git
cd gemini-imagen-mcp-server
npm install
npm run build
Additional notes
Tips and caveats:
- Always set GEMINI_API_KEY in the MCP configuration to authenticate with Google's Gemini Imagen API.
- The server writes generated images to your project’s imagen/ folder by default; ensure the folder is writable.
- If you encounter "GEMINI_API_KEY not found", double-check that the env var is passed in the MCP settings.
- For batch generation, utilize the --batch and --max-batch-size options to control throughput and quotas.
- You can specify different models using the --model option when running via npx gemini-imagen-mcp-server or through the MCP GUI if supported.
- Review quotas and pricing in the API provider's docs to avoid unexpected costs during batch operations.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.