Nano Banana MCP Server
Provides advanced image generation, editing, and analysis capabilities using Google's Gemini models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nano Banana MCP Server Generate a 4K image of a cyberpunk city at night using Gemini 3 Pro"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🎨 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 (aka "nano-banana") and Gemini 3 Pro Image Preview (aka "nano-banana pro") models.
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
Dual Model Support - Choose between Gemini 2.5 Flash Image Preview or Gemini 3 Pro Image Preview
High Resolution Output - Generate up to 4K images (4096x4096) with Gemini 3 Pro
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
Model Comparison
Feature | Gemini 2.5 Flash Image | Gemini 3 Pro Image |
Max Resolution | 1K (1024px) | 1K / 2K / 4K |
Aspect Ratios | All supported | All supported |
Text Rendering | Good | Excellent |
Speed | Fast | Moderate |
Quality | High | Premium |
Best For | Quick iterations | Final production |
Supported Aspect Ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
Related MCP server: Nano Banana MCP Server
🚀 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-mcpInstall dependencies:
npm installBuild the project:
npm run buildConfiguration
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 (Standard)
generate_image({
prompt: "A serene mountain landscape at sunset",
config: {
temperature: 0.8,
topP: 0.95
}
})Generate a High-Resolution Image (4K with Gemini 3 Pro)
generate_image({
prompt: "Ultra detailed cyberpunk city at night with neon signs",
model: "gemini-3-pro-image-preview",
resolution: "4K",
aspectRatio: "16:9",
config: {
temperature: 0.9
}
})Edit an Image
edit_image({
prompt: "Add a rainbow in the sky",
imagePath: "./landscape.jpg",
model: "gemini-3-pro-image-preview",
resolution: "2K",
aspectRatio: "4:3",
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 images from text prompts |
| Edit existing images with natural language |
| Analyze images and answer questions |
| Process multiple images together |
| Generate multiple images at once |
| Create variations of an image |
| Use predefined style templates |
| 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 |
| 0.0-2.0 | Controls randomness (lower = more focused) |
| 0.0-1.0 | Nucleus sampling threshold |
| 1-40 | Top-k sampling |
| - | Maximum response length |
📄 License
This project is licensed under the MIT License - see the LICENSE 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
🔗 Links
Available Tools
8 toolsanalyze_imageA
Analyze an image and answer questions about it using Gemini
Inputs: prompt (required), imageData, imagePath.
batch_generateB
Generate multiple images from an array of prompts
Inputs: prompts (required), model, config, parallel, +3 more.
compare_imagesB
Compare two images and analyze their differences or similarities
Inputs: image1Path (required), image2Path (required), compareType.
edit_imageB
Edit an existing image using Gemini image models (Nano Banana 2 or Nano Banana Pro)
Inputs: prompt (required), model, imageData, imagePath, +3 more.
generate_imageC
Generate an image using Gemini image models (Nano Banana 2 or Nano Banana Pro)
Inputs: prompt (required), model, outputDir, resolution, +2 more.
generate_variationsC
Generate variations of an existing image
Inputs: count, model, config, imageData, +5 more.
generate_with_templateB
Generate an image using a pre-defined style template
Inputs: template (required), customization (required), model, config, +3 more.
multi_image_editA
Edit or combine multiple images using Gemini image models (e.g., transfer pose, style, combine elements)
Inputs: images (required), prompt (required), model, outputDir, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct operation (generate, edit, analyze, compare, batch, variations, template), so boundaries are clear. Minor overlap exists between generate_variations and edit_image, but the descriptions help differentiate the intended use cases.
Tool names follow a consistent snake_case verb-object pattern (generate_image, edit_image, analyze_image, compare_images). A few names like multi_image_edit and batch_generate add modifiers but still fit the overall predictable style.
With 8 tools, the server is well-scoped for an image generation and manipulation domain, covering all major workflows without excessive redundancy or a thin feature set.
The set covers generation, editing, analysis, comparison, batch, variations, and template-based creation, providing comprehensive lifecycle coverage for image tasks. Minor gaps like model management or file export are not essential to the core purpose.
Maintenance
Related MCP Connectors
Generate, edit and upscale images with references, batch jobs, cost previews and original downloads.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
AI image generation across 5 quality tiers (SDXL to Gemini 3 Pro), 50 free credits on signup.
Image generation, image editing and text/image-to-video with credit quotes and connection budgets.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables text-to-image generation, image editing, and multi-image composition using Google's Gemini 2.5 Flash Image API. Supports flexible aspect ratios and character consistency across generations.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables generating, editing, and manipulating images using Google Gemini Flash 2.5 through natural language prompts. Supports text-to-image generation, image editing, multi-image composition, and batch processing with direct file management.4MIT
- AlicenseAqualityCmaintenanceEnables AI image generation and editing using Google's Gemini Multimodal Image APIs.61MIT
- AlicenseAqualityCmaintenanceEnables AI image generation and editing using Google's Gemini models via natural language, supporting multi-turn editing, search grounding, storyboards, icon sets, and video-to-image.511 npm1MIT