nanobanana-mcp
by YCSE·★ 28·Score 44
An MCP server integrating Gemini's image generation and editing capabilities with Claude Desktop and Claude Code.
Overview
NanoBanana MCP provides a seamless integration between Google's Gemini image models and Claude applications. It enables users to generate and edit images directly within Claude environments, supporting both flash and pro models for different quality needs. The server maintains session consistency for character/style across multiple generations and allows runtime model switching without restarting the environment.
Try asking AI
After installing, here are 6 things you can ask your AI assistant:
When to choose this
Choose this MCP when you need integrated image generation/editing directly within Claude applications and prefer Google's Gemini models over alternatives.
When NOT to choose this
Avoid if you need non-Google model options or require commercial usage rights for generated images, as terms depend on Google's Gemini API terms.
Tools this server exposes
7 tools extracted from the READMEset_aspect_ratioSet aspect ratio before image generation
set_modelSwitch between flash/pro models at runtime
gemini_generate_imageGenerate images from text prompts
gemini_edit_imageEdit images with natural language instructions
gemini_chatMulti-turn conversation with images
get_image_historyView session image history
clear_conversationReset session context
Comparable tools
Installation
Installation
Prerequisites
- Node.js 18+
- Google AI API Key
Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"nanobanana-mcp": {
"command": "npx",
"args": ["-y", "@ycse/nanobanana-mcp"],
"env": {
"GOOGLE_AI_API_KEY": "your_api_key"
}
}
}
}Add to Claude Code
claude mcp add nanobanana-mcp -- npx -y @ycse/nanobanana-mcp \
-e "GOOGLE_AI_API_KEY=your_api_key"FAQ
- What models are supported?
- The server supports Gemini Flash (gemini-3.1-flash-image-preview) and Gemini Pro (gemini-3-pro-image-preview) models. You can switch between them during a session without restarting.
- How do I maintain character consistency across multiple image generations?
- Use the same conversation_id parameter in your generation calls and set use_image_history to true. This maintains the visual context from previous images in the same conversation session.
- Where are the generated images saved?
- Images are saved to ~/Documents/nanobanana_generated/ by default. Generated files are named with a timestamp prefix, while edited images include the original filename.
Compare nanobanana-mcp with
Last updated · Auto-generated from public README + GitHub signals.