
Nanobanana is an MCP that provides image generation, editing, and blend features.
概览
A Model Context Protocol (MCP) server that brings Google's powerful Gemini 2.5 Flash Image generation capabilities directly to Claude Code. Generate, edit, and blend images using natural language through Claude's intelligent interface. - Generate high-quality images from text prompts - Multiple aspect ratios (1:1, 16:9, 9:16, etc.) - Style control (photorealistic, digital-art, etc.) - Batch generation (up to 4 images) - Intelligent prompt optimization - Edit existing images with natural language - Selective editing with mask support - Background replacement - Style transfer and modifications - Preserve or modify specific elements - Combine multiple images (2-4 sources) - Create artistic compositions - Maintain character consistency - Surreal and creative blending - Style harmonization - Real-time API status monitoring - Usage statistics and cost tracking - Performance metrics - Health checks and diagnostics - Automatic error recovery Add to your Claude Desktop configuration...
README
以下为原文 README 节选,完整内容请查看原文。
🍌 Nanobanana MCP Server
Gemini 2.5 Flash Image MCP Server for Claude Code
A Model Context Protocol (MCP) server that brings Google’s powerful Gemini 2.5 Flash Image generation capabilities directly to Claude Code. Generate, edit, and blend images using natural language through Claude’s intelligent interface.
✨ Features
🎨 Text-to-Image Generation
- Generate high-quality images from text prompts
- Multiple aspect ratios (1:1, 16:9, 9:16, etc.)
- Style control (photorealistic, digital-art, etc.)
- Batch generation (up to 4 images)
- Intelligent prompt optimization
✏️ Image Editing
- Edit existing images with natural language
- Selective editing with mask support
- Background replacement
- Style transfer and modifications
- Preserve or modify specific elements
🎭 Image Blending
- Combine multiple images (2-4 sources)
- Create artistic compositions
- Maintain character consistency
- Surreal and creative blending
- Style harmonization
📊 Server Management
- Real-time API status monitoring
- Usage statistics and cost tracking
- Performance metrics
- Health checks and diagnostics
- Automatic error recovery
🚀 Quick Start
1. Installation
# Clone the repository
git clone https://github.com/your-username/nanobanana_mcp.git
cd nanobanana_mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
2. Configuration
# Copy environment template
cp .env.example .env
# Edit .env file with your Google AI API key
GOOGLE_AI_API_KEY=your_api_key_here
3. Claude Desktop Integration
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
\"mcpServers\": {
\"nanobanana\": {
\"command\": \"python\",
\"args\": [\"-m\", \"src.server\"],
\"cwd\": \"/path/to/nanobanana_mcp\",
\"env\": {
\"GEMINI_API_KEY\": \"YOUR_API_KEY_HERE\",
\"GOOGLE_API_KEY\": \"YOUR_API_KEY_HERE\",
\"GOOGLE_AI_API_KEY\": \"YOUR_API_KEY_HERE\"
}
}
}
}
4. Start Using
# Test the server
python -m src.server --check-health
# Run basic usage example
python examples/basic_usage.py
📖 Usage Guide
Basic Image Generation
Ask Claude Code:
\"나노바나나를 사용해서 고양이가 모자를 쓰고 있는 사진을 생성해줘\"
Claude will use:
nanobanana_generate(
prompt=\"A cat wearing a hat, photorealistic style\",
aspect_ratio=\"1:1\",
quality=\"high\"
)
Image Editing
Ask Claude Code:
\"이 이미지의 배경을 바다로 바꿔줘\"
Claude will use:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →