Skip to main content
MCP server CX Codex

Nano Banana — Claude Code MCP server: generate and edit images

An MCP server that hands your agent image generation and editing through Google Gemini. Useful when a picture has to come out of the coding session itself.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env NANO_BANANA_GEMINI_TIMEOUT_MS=<NANO_BANANA_GEMINI_TIMEOUT_MS> --env NANO_BANANA_BRIDGE_TIMEOUT_MS=<NANO_BANANA_BRIDGE_TIMEOUT_MS> --transport stdio nano-banana -- npx -y @mindstone/mcp-server-nano-banana
Open on GitHub

What Nano Banana does

Three tools ship with the server. nano_banana_generate draws an image from a text description, nano_banana_edit changes one you already have, and configure_nano_banana_api_key stores the Gemini key. Everything runs against the cloud API, so nothing heavy happens on your machine.

nano_banana_edit takes up to 14 reference images, each either a workspace path or an https:// URL. A single source is capped at 20MB. Remote fetches go through SSRF checks: HTTPS only, no userinfo, private and loopback hosts refused. PNG, JPEG and WebP are accepted; a GIF comes back as UNSUPPORTED_IMAGE_FORMAT. Saving never overwrites — an existing file at save_path triggers SAVE_EXISTS.

You need a GEMINI_API_KEY; without it the server will not start. Node.js 20+ and npm are required too. Output size is set with image_size — "1K", "2K" or "4K", defaulting to "1K". Only the Gemini 3 image models honour anything above 1K; gemini-2.5-flash-image stays near 1K and rejects an explicit image_size. The Gemini request timeout defaults to 180000 ms, and slow generations on gemini-3-pro-image-preview will need it raised.

What it helps with

  • generate an image from a description without leaving the agent chat
  • touch up an existing picture from inside the editor
  • fuse several source images into one composition
  • write the result into the project without clobbering an old file
  • get a 2K or 4K render for a layout

Example prompts for the agent

  • Generate an image: a logo for the dark theme, save it to assets/logo.png
  • Edit assets/hero.jpg — drop the background, put the result in assets/hero-clean.png
  • Combine shot-1.png and shot-2.png into one collage at 2K

How to install Nano Banana

Platform CLI

claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env NANO_BANANA_GEMINI_TIMEOUT_MS=<NANO_BANANA_GEMINI_TIMEOUT_MS> --env NANO_BANANA_BRIDGE_TIMEOUT_MS=<NANO_BANANA_BRIDGE_TIMEOUT_MS> --transport stdio nano-banana -- npx -y @mindstone/mcp-server-nano-banana

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Nano Banana

How do I install Nano Banana in Claude Code?

One command: claude mcp add mcp-server-nano-banana -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y @mindstone/mcp-server-nano-banana. Replace <GEMINI_API_KEY> with your own Gemini key.

What does Nano Banana do?

It exposes three tools to the agent: text-to-image generation, editing of existing images, and saving the Gemini API key. All calls go to Google Gemini's cloud API.

What does the server need to run?

Node.js 20+, npm and a GEMINI_API_KEY. No key, no startup.

Similar MCP servers

All MCP servers for AI and ML →

From the same set13

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor