Nano Banana MCP Server

Image generation and editing using Google's Gemini models

README.md

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)

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.

Open Conare