nano-banana-claude
Provides image generation, editing, and processing tools using Google's Gemini Nano Banana models, including text-to-image, transparent PNGs, image composition, resizing, and AI upscaling.
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-claudeGenerate a 16:9 image of a neon city at night."
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-claude
Generated by generate_image (Nano Banana flash, 16:9).
A small MCP server that gives Claude Code (or any MCP client) image generation via Google's Nano Banana Gemini image models — plus the deterministic post-processing the model can't do reliably on its own: true alpha transparency, AI upscaling, resizing, and format conversion.
The idea: keep generation in the model, but put the things that need real code (a genuine alpha channel, exact dimensions, super-resolution) behind tools so they're reliable instead of prompt-and-hope.
Tools
Tool | What it does |
| Text → image. |
| Generate, then remove the background with rembg (U2-Net) → a real RGBA PNG. Nano Banana can't produce reliable alpha on its own. |
| One or more input images + a prompt → edited / composited result. |
| Local Pillow ops, no API call: resize/fit/crop, convert (png/webp/jpeg + quality), optional background removal. |
| AI super-resolution with Real-ESRGAN ( |
Models: flash → gemini-2.5-flash-image (Nano Banana, default, fast/cheap),
pro → gemini-3-pro-image-preview (Nano Banana Pro, higher quality).
Related MCP server: Nano-Banana MCP Server
Requirements
Python 3.10+
A Gemini API key (free tier available) from https://aistudio.google.com/apikey
~500 MB disk for dependencies; CPU is fine (no GPU required)
Install
git clone https://github.com/tougenrip/nano-banana-claude.git
cd nano-banana-claude
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtTwo ML models download automatically on first use (not committed):
rembg U2-Net (~176 MB) →
~/.u2net/— first transparent-image callReal-ESRGAN x4 (~4.6 MB) →
~/.cache/nano-banana/— first upscale call
Register with Claude Code
From inside the cloned directory:
claude mcp add nano-banana --scope user \
--env GEMINI_API_KEY=your-key-here \
-- "$(pwd)/.venv/bin/python" "$(pwd)/server.py"--scope user makes it available in every project; drop it to scope to the current project.
Reconnect and the five nano-banana tools appear. The API key is read from the environment
at runtime and is never written into the code.
Usage
Once registered, just ask in natural language — Claude picks the tool:
"Generate a 16:9 image of a neon city at night." →
generate_image"Make a transparent PNG of a red sneaker." →
generate_transparent_image"Put the logo in photo.png onto the mug in mug.jpg." →
edit_image"Resize hero.png to 1200px wide as webp." →
process_image"Upscale icon.png 4×." →
upscale_image
Tools can chain: generate a transparent cutout, then upscale it — the alpha survives.
Outputs are written next to the working directory (or to output_path) and the absolute
path is returned. Set NANO_BANANA_OUTPUT_DIR to change the default location.
How transparency works
Image models paint pixels; asking for a "transparent background" usually yields a flat color
or a drawn-in checkerboard, not a real alpha channel. So generate_transparent_image
generates the subject on a plain background, then runs rembg (U2-Net) to compute an actual
alpha matte, producing a true RGBA PNG. process_image(remove_background=true) does the same
on any existing image.
Output of generate_transparent_image — a real RGBA PNG (~90% of pixels fully
transparent), not a painted-on checkerboard.
Layout
server.py FastMCP server + tool definitions; Gemini REST via stdlib urllib
upscale.py Real-ESRGAN inference (onnxruntime), lazily loaded, with tiling
requirements.txt mcp, Pillow, rembg, onnxruntimeLicense
MIT — see LICENSE.
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.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables image generation using Google's Gemini Nano Banana Pro model via the Google AI Studio API. Users can generate and save images locally by providing text prompts through MCP-compatible clients.Last updated1
- AlicenseAqualityDmaintenanceAn MCP server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. It allows users to create new images from text, modify existing files, and perform iterative edits through natural language prompts.Last updated61,090MIT
- Alicense-qualityCmaintenanceAI-powered image generation MCP server with 16 specialized tools for generating, editing, analyzing, and processing images using Google's Nano Banana 2 model. Supports custom API endpoints and integrates with AI coding assistants via natural language.Last updated3941MIT
- Alicense-qualityDmaintenanceMCP server for Google's Nano Banana image generation models (Gemini). Generate and edit images via natural language.Last updated171MIT
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
MCP server for Google Veo AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/tougenrip/nano-banana-claude'
If you have feedback or need assistance with the MCP directory API, please join our Discord server