Nano Banana MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/brandon695/nano-banana-mcp
cd nano-banana-mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GEMINI_API_KEY=${GEMINI_API_KEY}" nano-banana -- node "<FULL_PATH_TO_NANO_BANANA_MCP>/dist/index.js"

Replace <FULL_PATH_TO_NANO_BANANA_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GEMINI_API_KEY+ 1 optional
README.md

Image generation and editing using Google's Gemini models

Nano Banana MCP (Local Fork)

Fork of nano-banana-mcp with model selection and aspect ratio support.

Changes from upstream

  • Model selection: Choose between flash (fast/cheap) and pro (slower/better) via env var or per-request parameter
  • Aspect ratio: Pass aspectRatio to generate_image (1:1, 16:9, 9:16, 3:2, 4:3, 21:9, etc.)
  • Accurate model labeling: Status output shows actual model name instead of incorrect "Gemini 2.5 Flash"

Models

Quality Model ID Speed Cost
flash gemini-3.1-flash-image-preview Fast ~$0.04-0.05/image
pro gemini-3-pro-image-preview Slower ~$0.13-0.24/image

Configuration

{
  "nano-banana": {
    "type": "stdio",
    "command": "node",
    "args": ["/path/to/nano-banana-mcp-local/dist/index.js"],
    "env": {
      "GEMINI_API_KEY": "your-key-here",
      "NANO_BANANA_MODEL": "flash"
    }
  }
}

Environment Variables

Variable Values Default Description
GEMINI_API_KEY API key string required Your Google AI Studio API key
NANO_BANANA_MODEL flash, pro flash Default model for all requests

Usage

generate_image

generate_image({
  prompt: "A dramatic photo of...",
  quality: "pro",         // optional, overrides env default
  aspectRatio: "16:9"     // optional, default 1:1
})

edit_image / continue_editing

Same as upstream, plus optional quality parameter.

License

MIT (same as upstream)

Tools (3)

generate_imageGenerates an image based on a text prompt with optional quality and aspect ratio settings.
edit_imageEdits an existing image based on a text prompt.
continue_editingContinues an existing image editing session.

Environment Variables

GEMINI_API_KEYrequiredYour Google AI Studio API key
NANO_BANANA_MODELDefault model for all requests (flash or pro)

Configuration

claude_desktop_config.json
{"nano-banana": {"type": "stdio", "command": "node", "args": ["/path/to/nano-banana-mcp-local/dist/index.js"], "env": {"GEMINI_API_KEY": "your-key-here", "NANO_BANANA_MODEL": "flash"}}}

Try it

Generate a dramatic photo of a futuristic city skyline at sunset.
Create a 16:9 image of a cozy cabin in the woods during winter.
Edit the previous image to add a golden retriever sitting on the porch.
Generate a high-quality portrait of a robot reading a book using the pro model.

Frequently Asked Questions

What are the key features of Nano Banana MCP?

Supports Google Gemini image generation models. Model selection between flash and pro versions. Customizable aspect ratios including 1:1, 16:9, 9:16, 3:2, 4:3, and 21:9. Image editing and continuous editing capabilities. Accurate model status reporting.

What can I use Nano Banana MCP for?

Rapidly generating visual assets for creative projects using natural language. Iteratively refining AI-generated images through conversational editing. Switching between fast, cost-effective generation and high-quality pro output. Creating images with specific dimensions for social media or presentation layouts.

How do I install Nano Banana MCP?

Install Nano Banana MCP by running: node /path/to/nano-banana-mcp-local/dist/index.js

What MCP clients work with Nano Banana MCP?

Nano Banana MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Nano Banana MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare