Nanobanana MCP server
An MCP server that provides image generation and editing capabilities
400 stars
Reviews
Write oneNobody has reviewed Nanobanana yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Nanobanana tools (4, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
generate_imagemaintenancePerform maintenance operations following workflows.md patterns.
show_output_statsShow statistics about the output directory and recently generated images.
upload_filewrite actionUpload a local file through the Gemini Files API and return its URI & metadata. Useful when the image is larger than 20MB or reused across prompts.
Public scan report
scanner v0.1.10 · 2026-10-02 · same rubric, same numbers if you re-run it
- Code scan46 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- mediumsubprocess with shell=True
exec.shell-truenanobanana_mcp_server-0.4.6/pyproject.toml: … "S603", # subprocess call without shell=True "S607", # starting subprocess with…
Install Nanobanana in Claude Code, Cursor or VS Code
claude mcp add nanobanana-mcp-server -- uvx nanobanana-mcp-server
What the publisher says
From the Nanobanana repository's README, as published. We do not edit it. Read it on GitHub
Nano Banana MCP Server 🍌
A production-ready Model Context Protocol (MCP) server that provides AI-powered image generation capabilities through Google's Gemini models with intelligent model selection.
⭐ NEW: Nano Banana 2 — Gemini 3.1 Flash Image! 🍌🚀
Nano Banana 2 (gemini-3.1-flash-image-preview) is now the default model — delivering Pro-level quality at Flash speed:
- 🍌 Flash Speed + 4K Quality: Up to 3840px at Gemini 2.5 Flash latency
- 🌐 Google Search Grounding: Real-world knowledge for factually accurate images
- 🎯 Subject Consistency: Up to 5 characters and 14 objects per scene
- ✍️ Precision Text Rendering: Crystal-clear text placement in images
- 🏆 Gemini 3 Pro Image still available for maximum reasoning depth
✨ Features
- 🎨 Multi-Model AI Image Generation: Three Gemini models with intelligent automatic selection
- 🍌 Gemini 3.1 Flash Image (NB2): Default model — 4K resolution at Flash speed with grounding
- 🏆 Gemini 3 Pro Image: Maximum reasoning depth for the most complex compositions
- ⚡ Gemini 2.5 Flash Image: Legacy Flash model for high-volume rapid prototyping
- 🤖 Smart Model Selection: Automatically routes to NB2 or Pro based on your prompt
- 📐 Aspect Ratio Control ⭐ NEW: Specify output dimensions (1:1, 16:9, 9:16, 21:9, and more)
- 📋 Smart Templates: Pre-built prompt templates for photography, design, and editing
- 📁 File Management: Upload and manage files via Gemini Files API
- 🔍 Resource Discovery: Browse templates and file metadata through MCP resources
- 🛡️ Production Ready: Comprehensive error handling, logging, and validation
- ⚡ High Performance: Optimized architecture with intelligent caching
🚀 Quick Start
Prerequisites
- Google Gemini API Key - Get one free here
- Python 3.11+ (for development only)
Installation
Option 1: From MCP Registry (Recommended) This server is available in the Model Context Protocol Registry. Search for "nanobanana" or use the MCP name below with your MCP client.
mcp-name: io.github.zhongweili/nanobanana-mcp-server
Option 2: Using uvx
uvx nanobanana-mcp-server@latestOption 3: Using pip
pip install nanobanana-mcp-server🔧 Configuration
Authentication Methods
Nano Banana supports two authentication methods via NANOBANANAAUTHMETHOD:
- API Key (apikey): Uses GEMINIAPI_KEY. Best for local development and simple deployments.
- Vertex AI ADC (vertex_ai): Uses Google Cloud Application Default Credentials. Best for production on Google Cloud (Cloud Run, GKE, GCE).
- Automatic (auto): Defaults to API Key if present, otherwise tries Vertex AI.
1. API Key Authentication (Default)
Set GEMINIAPIKEY environment variable.
2. Vertex AI Authentication (Google Cloud)
Required environment variables:
- NANOBANANAAUTHMETHOD=vertex_ai (or auto)
- GCPPROJECTID=your-project-id
- GCP_REGION=global (default; required for Gemini 3 Pro Image and NB2. Use us-central1 only for the legacy 2.5 Flash Image model.)
Prerequisites:
- Enable Vertex AI API: gcloud services enable aiplatform.googleapis.com
- Grant IAM Role: roles/aiplatform.user to the service account.
Claude Desktop
Option 1: Using Published Server (Recommended)
Add to your claudedesktopconfig.json:
{
"mcpServers": {
"nanobanana": {
"command": "uvx",
"args": ["nanobanana-mcp-server@latest"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
}Option 2: Using Local Source (Development)
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Nanobanana: common questions
- Is Nanobanana MCP server safe?
- Mostly: it is graded B (75/100). Read the Nanobanana safety report
- How do I install Nanobanana?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Nanobanana need an API key?
- Yes. The registry entry asks for
GEMINI_API_KEY. - Is Nanobanana maintained?
- The last commit was 11 days ago (2026-10-02). The latest release is v1.0.0.
- What can I use instead of Nanobanana?
- Servers from other publishers that do the same job: Midjourney MCP server, SuperCMO MCP server and Aetherwave MCP server. Compare all Nanobanana alternatives.
Alternatives to Nanobanana
Same job from other publishers: the closest match first, then the best rated.
not reviewedGrowingA- SuperCMOMarketing media generation — image, video, voice — for AI agents. BYO keys.not reviewedGrowingB
- AetherwaveMusic, image, video and audio generation across top AI providers - one key, one credit pool.not reviewedGrowingB
Luw.aiAI interior, exterior and landscape design, photoreal rendering, image editing, video and 3D.not reviewedGrowingA- Image DiffMCP server for programmatic image comparison and visual diff generation.not reviewedGrowingA