Nano Banana MCP
Provides tools for generating and editing images using Google Gemini models, with configurable model selection and aspect ratios.
Click on "Install 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 MCPA futuristic city skyline at sunset with flying cars"
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.
What is this?
A fork of nano-banana-mcp with one critical upgrade: configurable model selection via environment variable.
The original package hardcodes gemini-2.5-flash-image-preview (shut down January 2026). This fork defaults to gemini-3.1-flash-image-preview and lets you swap models without touching code.
Related MCP server: mrn-gemini-imagen-mcp
Features
Generate images from text prompts
Edit existing images with natural language
Iterative editing (continue refining the last image)
Multi-image reference support (style transfer, combining elements)
Configurable aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 4:5, 5:4, 21:9, and more)
Configurable Gemini model via
GEMINI_MODELenv var
Setup
Claude Code / Cursor
Add to your .mcp.json:
{
"mcpServers": {
"nano-banana": {
"type": "stdio",
"command": "node",
"args": ["/path/to/nanobanana-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key-here",
"GEMINI_MODEL": "gemini-3.1-flash-image-preview"
}
}
}
}Install Dependencies
git clone https://github.com/charlesdove977/nanobanana-mcp.git
cd nanobanana-mcp
npm installGet a Gemini API Key
Go to Google AI Studio
Create a new API key
Add it to your MCP config as
GEMINI_API_KEY
Models
Set GEMINI_MODEL in your env to any of these (or omit it to use the default):
Model ID | Tier | Price | Best For |
| Flash (default) | ~$0.045/img | Speed + quality balance |
| Pro | ~$0.134/img | Highest quality, best text rendering |
| Legacy Flash | ~$0.039/img | Budget, high-volume |
All models support both generation and editing through the same API.
Tools
Tool | Description |
| Create a new image from a text prompt (optional |
| Modify an existing image file with a prompt (optional |
| Keep refining the last generated/edited image (optional |
| Check the path and size of the last image |
| Set API key at runtime |
| Check if API key is configured |
Aspect Ratios
All image tools accept an optional aspectRatio parameter. Supported values:
1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 1:4 1:8 4:1 8:1
Examples
Generate (default 1:1):
"A futuristic city skyline at sunset with flying cars"
Generate (16:9 widescreen):
prompt: "A futuristic city skyline at sunset with flying cars", aspectRatio: "16:9"
Edit:
Edit
photo.png: "Remove the background and replace with a gradient"
Continue editing:
"Make the colors more vibrant and add lens flare"
Image Storage
Generated images are saved to ./generated_imgs/ in your working directory (macOS/Linux) or ~/Documents/nano-banana-images/ (Windows).
Credits
Forked from ConechoAI/Nano-Banana-MCP. Updated with configurable model support and latest Gemini models.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/charlesdove977/nanobanana-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server