nano-banana-mcp

nano-banana-mcp

A minimal MCP server that wraps Google Gemini image generation, enabling users to generate images via a single tool prompt in Claude Code or other MCP hosts, with automatic filename collision handling.

Category
Visit Server

README

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) -> str
  • Writes a PNG to output_path
  • Auto-suffixes on collision (foo.pngfoo-1.png, foo-2.png, …) — never silently overwrites
  • Returns the absolute path it actually wrote to

Install on a new machine

You need:

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-mcp

Verify 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
gemini-2.5-flash-image (default) Nano Banana Fast / cheap drafts
gemini-3.1-flash-image-preview Nano Banana 2 Higher quality, balanced
gemini-3-pro-image-preview Nano Banana Pro Top quality, costliest

Update / rotate the key

Update the code:

pipx install --force git+https://github.com/DenialGelon/nano-banana-mcp

Rotate 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-mcp

License

MIT — see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured