Riti0208/nano-banana-mcp
3.3
If you are the rightful owner of nano-banana-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Nano Banana MCP Server is a powerful tool for advanced image generation, editing, and analysis using Google's Gemini 2.5 Flash Image Preview model.
Tools
5
Resources
0
Prompts
0
🎨 Nano Banana MCP Server
A powerful Model Context Protocol (MCP) server for advanced image generation, editing, and analysis using Google's Gemini 2.5 Flash Image Preview model (aka "nano-banana").
English |
✨ Features
Core Capabilities
- 🖼️ Image Generation - Create images from text prompts with advanced customization
- ✏️ Image Editing - Edit existing images using natural language (supports file paths or base64)
- 🔍 Image Analysis - Analyze and answer questions about images using Gemini
- 🎭 Multi-Image Processing - Combine, style transfer, or edit multiple images at once
- 📦 Batch Generation - Generate multiple images from an array of prompts
- 🎨 Style Templates - Use pre-defined templates for consistent styling
- 🔄 Variations - Generate variations of existing images with controlled randomness
- 🔬 Image Comparison - Compare and analyze differences between images
Advanced Features
- Generation Control - Fine-tune with temperature, topP, topK parameters
- Parallel Processing - Batch operations with optional parallel execution
- Smart Templates - 10+ professional style presets
- Flexible Input - Accept both file paths and base64 encoded images
- Auto-save - Automatically saves generated images with timestamps
🚀 Quick Start
Prerequisites
- Node.js 18.0.0 or higher
- Valid Gemini API key
- MCP-compatible client (like Claude Code)
Installation
- Clone the repository:
git clone https://github.com/Riti0208/nano-banana-mcp.git
cd nano-banana-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
Configuration
Add to your Claude Code MCP settings (claude_code_config.json
):
{
"mcpServers": {
"nano-banana": {
"command": "node",
"args": ["./dist/index.js"],
"cwd": "/path/to/nano-banana-mcp",
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}
📖 Usage Examples
Generate an Image
generate_image({
prompt: "A serene mountain landscape at sunset",
config: {
temperature: 0.8,
topP: 0.95
}
})
Edit an Image
edit_image({
prompt: "Add a rainbow in the sky",
imagePath: "./landscape.jpg",
config: {
temperature: 0.5
}
})
Generate Multiple Variations
generate_variations({
imagePath: "./original.png",
count: 3,
variationStrength: "moderate"
})
Batch Generation
batch_generate({
prompts: [
"A red apple",
"A green apple",
"A golden apple"
],
parallel: true
})
Use Style Templates
generate_with_template({
template: "photorealistic",
customization: "A vintage coffee shop interior"
})
Compare Images
compare_images({
image1Path: "./before.png",
image2Path: "./after.png",
compareType: "differences"
})
🛠️ Available Tools
Tool | Description |
---|---|
generate_image | Generate images from text prompts |
edit_image | Edit existing images with natural language |
analyze_image | Analyze images and answer questions |
multi_image_edit | Process multiple images together |
batch_generate | Generate multiple images at once |
generate_variations | Create variations of an image |
generate_with_template | Use predefined style templates |
compare_images | Compare two images |
🎨 Style Templates
- photorealistic - Ultra-realistic photography
- artistic - Artistic interpretation
- logo - Clean logo design
- portrait - Professional portraits
- landscape - Breathtaking landscapes
- product - Product photography
- architectural - Architectural photography
- fashion - Fashion photography
- food - Food photography
- abstract - Abstract art
⚙️ Configuration Parameters
Parameter | Range | Description |
---|---|---|
temperature | 0.0-2.0 | Controls randomness (lower = more focused) |
topP | 0.0-1.0 | Nucleus sampling threshold |
topK | 1-40 | Top-k sampling |
maxOutputTokens | - | Maximum response length |
📄 License
This project is licensed under the MIT License - see the file for details.
🙏 Acknowledgments
- Google Gemini team for the amazing image generation API
- Model Context Protocol team for the MCP framework
- All contributors who help improve this project