nano-banana-mcp
Generates images using Google Gemini models, supporting multiple model variants (e.g., gemini-2.5-flash-image, gemini-3.1-flash-image-preview, gemini-3-pro-image-preview).
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-mcpgenerate an image of a cat wearing a hat and save it to ~/Desktop/cat.png"
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
A minimal MCP server that wraps Google Gemini image generation ("Nano Banana") for use inside Claude Code or any other MCP-compatible host.
Built as part of an exploration of agentic workflows for K-12 teaching materials. The whole server is about 75 lines of Python — readable in one sitting.
What it does
Exposes a single tool:
generate_image(prompt: str, output_path: str, model: str | None = None) -> strWrites a PNG to
output_pathAuto-suffixes on collision (
foo.png→foo-1.png,foo-2.png, …) — never silently overwritesReturns the absolute path it actually wrote to
Install on a new machine
You need:
Homebrew (macOS)
A Gemini API key from Google AI Studio
Claude Code (or another MCP host)
brew install pipx
pipx ensurepath
pipx install git+https://github.com/DenialGelon/nano-banana-mcp
claude mcp add nano-banana --scope user \
--env GEMINI_API_KEY=<your-key> -- nano-banana-mcpVerify with claude mcp list — you should see nano-banana: ✓ Connected.
Use
Start a fresh Claude Code session and ask:
Generate an image of a friendly cartoon banana mascot and save it to ~/Desktop/banana.png
Claude will pick up the tool and call it. The return value tells you the final path (with a note if a collision was auto-resolved).
Models
The model argument is optional. Known values (verified 2026-05-18 at the Gemini image-generation docs):
Model string | Nickname | Use for |
| Nano Banana | Fast / cheap drafts |
| Nano Banana 2 | Higher quality, balanced |
| Nano Banana Pro | Top quality, costliest |
Update / rotate the key
Update the code:
pipx install --force git+https://github.com/DenialGelon/nano-banana-mcpRotate the API key:
claude mcp remove nano-banana --scope user
claude mcp add nano-banana --scope user \
--env GEMINI_API_KEY=<new-key> -- nano-banana-mcpLicense
MIT — see LICENSE.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
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/DenialGelon/nano-banana-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server