Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Nanobanana MCP Server

by zhongweiliversion 1.0.0i★ 410iRuns on your computerRepository ↗
Registry nameio.github.zhongweili/nanobanana-mcp-server

How to install

What it does

An MCP server that provides image generation and editing capabilities

  • Connects Runs on your computer
  • Account or key Needs GEMINI_API_KEY
  • Category Design, images & audio

Use together with

Skills that teach the AI this kind of work; they work alongside this one

impeccable

The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.

by pbakaus★ 113,0421 skills

Skill · How-to guide

diagram-design

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

by cathrynlavery★ 68,2961 skills

Skill · How-to guide

frontend-slides

Create beautiful slides on the web using a coding agent's frontend skills

by zarazhangrui★ 32,5791 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity43/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness7/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score50/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: 131 (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Nanobanana MCP Server. Follow https://mcp.popnx.com/i/zhongweili-nanobanana-mcp-server.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nanobanana MCP Server for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nanobanana": { "command": "uvx", "args": [ "nanobanana-mcp-server" ], "env": { "GEMINI_API_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For GEMINI_API_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nanobanana MCP Server tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Nanobanana MCP Server key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "nanobanana": {
          "command": "uvx",
          "args": [
            "nanobanana-mcp-server"
          ],
          "env": {
            "GEMINI_API_KEY": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Nanobanana MCP Server and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Nanobanana MCP Server or shows a Nanobanana MCP Server tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • IMAGE_OUTPUT_DIR The image output directory

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Nanobanana MCP Server yet

Nanobanana MCP Server runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Nanobanana MCP Server

  • You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

B · Others in Design, images & audio that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nanobanana MCP Server for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user nanobanana --env GEMINI_API_KEY=your-value -- uvx nanobanana-mcp-server 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For GEMINI_API_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nanobanana MCP Server tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Nanobanana MCP Server key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user nanobanana --env GEMINI_API_KEY=your-value -- uvx nanobanana-mcp-server

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Nanobanana MCP Server listed as connected

  6. Try it

    Use Nanobanana MCP Server and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Nanobanana MCP Server or shows a Nanobanana MCP Server tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • IMAGE_OUTPUT_DIR The image output directory

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nanobanana MCP Server for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nanobanana": { "command": "uvx", "args": [ "nanobanana-mcp-server" ], "env": { "GEMINI_API_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For GEMINI_API_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nanobanana MCP Server tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Nanobanana MCP Server key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Nanobanana MCP Server settings, GEMINI_API_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Nanobanana MCP Server and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Nanobanana MCP Server or shows a Nanobanana MCP Server tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • IMAGE_OUTPUT_DIR The image output directory

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Nanobanana MCP Server key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nanobanana MCP Server for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "nanobanana": { "type": "stdio", "command": "uvx", "args": [ "nanobanana-mcp-server" ], "env": { "GEMINI_API_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For GEMINI_API_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nanobanana MCP Server tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Nanobanana MCP Server key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Nanobanana MCP Server settings, GEMINI_API_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Nanobanana MCP Server and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Nanobanana MCP Server or shows a Nanobanana MCP Server tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • IMAGE_OUTPUT_DIR The image output directory

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Nanobanana MCP Server💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user nanobanana --env GEMINI_API_KEY=your-value -- uvx nanobanana-mcp-server

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "nanobanana": {
      "command": "uvx",
      "args": [
        "nanobanana-mcp-server"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "nanobanana": {
      "command": "uvx",
      "args": [
        "nanobanana-mcp-server"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "nanobanana": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "nanobanana-mcp-server"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value"
      }
    }
  }
}

Values you fill in

  • GEMINI_API_KEY secret required env
    Your Gemini API key
  • IMAGE_OUTPUT_DIR env
    The image output directory

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
5,147/wk
Connection
Runs on your computer
Latest versioni
1.0.0
Published to registryi
Sep 9, 2025
Code last changedi
Oct 20, 2026
Maker
zhongweili
Packages
pypi: nanobanana-mcp-server
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account zhongweili, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 31 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for nanobanana-mcp-server@1.0.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/zhongweili-nanobanana-mcp-server.svg)](https://mcp.popnx.com/en/servers/zhongweili-nanobanana-mcp-server)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Design, images & audioi

  • More stars than 99% of the other 3313 servers in this category
  • Published to the registry more recently than 0% of the other 3313 servers in this category
  • Basic checks equal to or better than 99% of the other 3313 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Nanobanana MCP Server safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: GEMINI_API_KEY

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 31 days ago, and the latest version (1.0.0) reached the registry 15 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: HyperFrames by HeyGen, Pascal 3D Editor, draw.io, Figma MCP Server, Remocn: Remotion MCP server

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

HyperFrames by HeyGen

Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.

by heygen-comWidely used★ 86.8K Stars for the whole repoUpdated 2 days ago

Runs in the cloud✓ heygen.com

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

by pascalorgWidely used↓ 1K/wk★ 25.6K Stars for the whole repoUpdated 2 days ago

Computer or cloud✓ service owner · pascal.app

draw.io

Create draw.io diagrams in chat from Mermaid or XML, shown live and interactive. 10,000+ shapes.

by jgraphWidely used★ 5.9KUpdated 3 days ago

Runs in the cloud✓ service owner · draw.ioTried by the PopNx team

Figma MCP Server

Figma’s official server gives AI your design data so it can turn designs into code or describe them accurately. Connects to Figma’s cloud.

by figmaWidely used★ 2.2KUpdated 13 months ago

Runs in the cloud✓ service owner · mcp.figma.com
Compared with similar ones
This one
Nanobanana MCP Server
HyperFrames by HeyGenPascal 3D Editordraw.ioFigma MCP ServerRemocn: Remotion MCP server
Runs whereInstalls on your computerRuns in the cloud, nothing to installCloud or install on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoYesNoNoYesNo
Basic checks3/34/45/54/44/44/4
LicenseMITApache-2.0MITApache-2.0–MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

Nano Banana MCP Server 🍌

A production-ready Model Context Protocol (MCP) server that provides AI-powered image generation capabilities through Google's Gemini models with intelligent model selection.

⭐ NEW: Nano Banana 2 — Gemini 3.1 Flash Image! 🍌🚀

Nano Banana 2 (gemini-3.1-flash-image-preview) is now the default model — delivering Pro-level quality at Flash speed:

  • 🍌 Flash Speed + 4K Quality: Up to 3840px at Gemini 2.5 Flash latency
  • 🌐 Google Search Grounding: Real-world knowledge for factually accurate images
  • 🎯 Subject Consistency: Up to 5 characters and 14 objects per scene
  • ✍️ Precision Text Rendering: Crystal-clear text placement in images
  • 🏆 Gemini 3 Pro Image still available for maximum reasoning depth

✨ Features

  • 🎨 Multi-Model AI Image Generation: Three Gemini models with intelligent automatic selection
  • 🍌 Gemini 3.1 Flash Image (NB2): Default model — 4K resolution at Flash speed with grounding
  • 🏆 Gemini 3 Pro Image: Maximum reasoning depth for the most complex compositions
  • ⚡ Gemini 2.5 Flash Image: Legacy Flash model for high-volume rapid prototyping
  • 🤖 Smart Model Selection: Automatically routes to NB2 or Pro based on your prompt
  • 📐 Aspect Ratio Control ⭐ NEW: Specify output dimensions (1:1, 16:9, 9:16, 21:9, and more)
  • 📋 Smart Templates: Pre-built prompt templates for photography, design, and editing
  • 📁 File Management: Upload and manage files via Gemini Files API
  • 🔍 Resource Discovery: Browse templates and file metadata through MCP resources
  • 🛡️ Production Ready: Comprehensive error handling, logging, and validation
  • ⚡ High Performance: Optimized architecture with intelligent caching

🚀 Quick Start

Prerequisites
  1. Google Gemini API Key - Get one free here
  2. Python 3.11+ (for development only)
Installation

Option 1: From MCP Registry (Recommended) This server is available in the Model Context Protocol Registry. Search for "nanobanana" or use the MCP name below with your MCP client.

mcp-name: io.github.zhongweili/nanobanana-mcp-server

Option 2: Using uvx

uvx nanobanana-mcp-server@latest

Option 3: Using pip

pip install nanobanana-mcp-server

🔧 Configuration

Authentication Methods

Nano Banana supports two authentication methods via NANOBANANA_AUTH_METHOD:

  1. API Key (api_key): Uses GEMINI_API_KEY. Best for local development and simple deployments.
  2. Vertex AI ADC (vertex_ai): Uses Google Cloud Application Default Credentials. Best for production on Google Cloud (Cloud Run, GKE, GCE).
  3. Automatic (auto): Defaults to API Key if present, otherwise tries Vertex AI.
1. API Key Authentication (Default)

Set GEMINI_API_KEY environment variable.

2. Vertex AI Authentication (Google Cloud)

Required environment variables:

  • NANOBANANA_AUTH_METHOD=vertex_ai (or auto)
  • GCP_PROJECT_ID=your-project-id
  • GCP_REGION=global (default; required for Gemini 3 Pro Image and NB2. Use us-central1 only for the legacy 2.5 Flash Image model.)

Prerequisites:

  • Enable Vertex AI API: gcloud services enable aiplatform.googleapis.com
  • Grant IAM Role: roles/aiplatform.user to the service account.
Claude Desktop
Option 1: Using Published Server (Recommended)

Add to your claude_desktop_config.json:

{

"mcpServers": { "nanobanana": { "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } } }

Option 2: Using Local Source (Development)

If you are running from source code, point to your local installation:

{

"mcpServers": { "nanobanana-local": { "command": "uv", "args": ["run", "python", "-m", "nanobanana_mcp_server.server"], "cwd": "/absolute/path/to/nanobanana-mcp-server", "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } } }

Option 3: Using Vertex AI (ADC)

To authenticate with Google Cloud Application Default Credentials (instead of an API Key):

{

"mcpServers": { "nanobanana-adc": { "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "NANOBANANA_AUTH_METHOD": "vertex_ai", "GCP_PROJECT_ID": "your-project-id", "GCP_REGION": "global" } } } }

Configuration file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude Code (VS Code Extension)

Install and configure in VS Code:

  1. Install the Claude Code extension
  2. Open Command Palette (Cmd/Ctrl + Shift + P)
  3. Run "Claude Code: Add MCP Server"
  4. Configure:
   {

"name": "nanobanana", "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } }

Cursor

Add to Cursor's MCP configuration:

{

"mcpServers": { "nanobanana": { "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } } }

OpenAI Codex

Add to ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):

[mcp_servers.nanobanana]

command = "uvx" args = ["nanobanana-mcp-server@latest"]

[mcp_servers.nanobanana.env] GEMINI_API_KEY = "your-gemini-api-key-here"

Or add via the CLI:

codex mcp add

Codex supports both the CLI and VSCode extension using the same config.toml. Once added, Codex can call generate_image, edit_image, and upload_file tools directly in your coding sessions.

Note: The Codex config file is shared by the CLI and the IDE extension. A TOML syntax error will break both simultaneously, so validate your edits carefully.

Continue.dev (VS Code/JetBrains)

Add to your config.json:

{

"mcpServers": [ { "name": "nanobanana", "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } ] }

Open WebUI

Configure in Open WebUI settings:

{

"mcp_servers": { "nanobanana": { "command": ["uvx", "nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } } }

Gemini CLI / Generic MCP Client
# Set environment variable

export GEMINI_API_KEY="your-gemini-api-key-here"

Run server in stdio mode

uvx nanobanana-mcp-server@latest

Or with pip installation

python -m nanobanana_mcp_server.server

🤖 Model Selection

Nano Banana supports three Gemini models with intelligent automatic selection:

🍌 NB2 — Nano Banana 2 (Gemini 3.1 Flash Image) ⭐ DEFAULT

Flash speed with Pro-level quality — the best of both worlds

  • Quality: Production-ready 4K output
  • Resolution: Up to 4K (3840px)
  • Speed: ~2-4 seconds per image (Flash-class latency)
  • Special Features:
  • 🌐 Google Search Grounding: Real-world knowledge for factually accurate images
  • 🎯 Subject Consistency: Up to 5 characters and 14 objects per scene
  • ✍️ Precision Text Rendering: Clear, well-placed text in images
  • Best for: Almost everything — production assets, marketing, photography, text overlays
  • model_tier: "nb2" (or "auto" — NB2 is the auto default)
🏆 Pro Model — Nano Banana Pro (Gemini 3 Pro Image)

Maximum reasoning depth for the most demanding compositions

  • Quality: Highest available
  • Resolution: Up to 4K (3840px)
  • Speed: ~5-8 seconds per image
  • Special Features:
  • 🧠 Advanced Reasoning: Configurable thinking levels (LOW/HIGH)
  • 🌐 Google Search Grounding: Real-world knowledge integration
  • 📐 Media Resolution Control: Fine-tune vision processing detail
  • Best for: Complex narrative scenes, intricate compositions, maximum reasoning required
  • model_tier: "pro"
⚡ Flash Model (Gemini 2.5 Flash Image)

Legacy model for high-volume rapid iteration

  • Speed: Very fast (2-3 seconds)
  • Resolution: Up to 1024px
  • Best for: High-volume generation, quick drafts where 4K is not needed
  • model_tier: "flash"
🤖 Automatic Selection (Recommended)

By default, the server uses AUTO mode which routes to NB2 unless Pro's deeper reasoning is clearly needed:

Pro Model Selected When:

  • Strong quality keywords: "4K", "professional", "production", "high-res", "HD"
  • High thinking level requested: thinking_level="HIGH"
  • Multi-image conditioning with multiple input images

NB2 Model Selected When (default):

  • Standard requests, everyday image generation
  • Speed keywords: "quick", "draft", "sketch", "rapid"
  • High-volume batch generation (n > 2)
Usage Examples
# Automatic selection (recommended) — routes to NB2 by default

"A cat sitting on a windowsill" # → NB2 (default) "Quick sketch of a cat" # → NB2 (speed keyword, NB2 is fast enough) "Professional 4K product photo" # → Pro (strong quality keywords)

Explicit NB2 selection

generate_image( prompt="Product photo on white background", model_tier="nb2", # Nano Banana 2 (Flash speed + 4K) resolution="4k", enable_grounding=True )

Leverage Nano Banana Pro for complex reasoning

generate_image( prompt="Cinematic scene: three characters in a tense standoff at dusk", model_tier="pro", # Pro for deep reasoning resolution="4k", thinking_level="HIGH", # Enhanced reasoning enable_grounding=True )

Legacy Flash for high-volume drafts

generate_image( prompt="Simple icon", model_tier="flash" # Fast 1024px generation )

Control aspect ratio for different formats ⭐ NEW!

generate_image( prompt="Cinematic landscape at sunset", aspect_ratio="21:9" # Ultra-wide cinematic format )

generate_image( prompt="Instagram post about coffee", aspect_ratio="1:1" # Square format for social media )

generate_image( prompt="YouTube thumbnail design", aspect_ratio="16:9" # Standard video format )

generate_image( prompt="Mobile wallpaper of mountain vista", aspect_ratio="9:16" # Portrait format for phones )

📐 Aspect Ratio Control

Control the output image dimensions with the aspect_ratio parameter:

Supported Aspect Ratios:

  • 1:1 - Square (Instagram, profile pictures)
  • 4:3 - Classic photo format
  • 3:4 - Portrait orientation
  • 16:9 - Widescreen (YouTube thumbnails, presentations)
  • 9:16 - Mobile portrait (phone wallpapers, stories)
  • 21:9 - Ultra-wide cinematic
  • 2:3, 3:2, 4:5, 5:4 - Various photo formats
# Examples for different use cases

generate_image( prompt="Product showcase for e-commerce", aspect_ratio="3:4", # Portrait format, good for product pages model_tier="pro" )

generate_image( prompt="Social media banner for Facebook", aspect_ratio="16:9" # Landscape banner format )

Note: Aspect ratio works with both Flash and Pro models. For best results with specific aspect ratios at high resolution, use the Pro model with resolution="4k".

📁 Output Path Control ⭐ NEW!

Control where generated images are saved with the output_path parameter:

Three modes of operation:

  1. Specific file path - Save to an exact file location:
generate

Only the beginning is shown; read the rest in the repo