Nanobanana MCP Server logo

Nanobanana MCP Server

Generates and edits images with Gemini models, supporting automatic model selection, templates, file uploads, and aspect ratios.

Install Nanobanana MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nanobanana-mcp-server": {
      "command": "uvx",
      "args": [
        "nanobanana-mcp-server@latest"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE",
        "NANOBANANA_AUTH_METHOD": "YOUR_VALUE_HERE",
        "GCP_PROJECT_ID": "YOUR_VALUE_HERE",
        "GCP_REGION": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 4 tools correctly (6d ago).

Overview

nanobanana-mcp-server MCP server connects MCP clients to Google's Gemini image-generation models through a stdio process. It can generate and edit images, upload files through the Gemini Files API, apply prompt templates, and expose template and file metadata as MCP resources. Gemini 3.1 Flash Image is the default, while Gemini 3 Pro Image and Gemini 2.5 Flash Image are also available. Reach for it when an agent needs image creation or editing with configurable models, aspect ratios, and Google authentication options.

Use cases

  • Generate production-ready images from agent prompts
  • Edit images through Gemini image models
  • Choose aspect ratios for marketing or social assets
  • Upload source files for image workflows
  • Browse reusable image prompt templates

Key features

  • Multi-model Gemini image generation
  • Automatic model selection
  • Image editing and file uploads
  • Aspect-ratio control
  • Prompt templates and MCP resources
  • API-key and Vertex AI authentication

Tools4

What Nanobanana MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~1.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 45d

What it can do

From the 4 tools this server returned when we ran it; 4 declare their own safety hints.

Writes files · 1Handles credentials · 1Makes network requests · 3Read-only tools · 3
Network at startup2 connections
Files written at startup30

Observed 2026-10-17 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · nanobanana-mcp-server@latest (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars400Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed4Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Nanobanana MCP Server works

What nanobanana-mcp-server MCP server does

nanobanana-mcp-server MCP server gives an MCP-compatible client access to Google's Gemini image models. It supports image generation and editing, with Gemini 3.1 Flash Image used by default. Gemini 3 Pro Image is available for compositions that need deeper reasoning, and Gemini 2.5 Flash Image remains available for fast, lower-resolution iteration.

The server also includes prompt templates for photography, design, and editing workflows. MCP resources allow clients to browse those templates and inspect file metadata. File operations use the Gemini Files API, so the server can upload and manage files used by image workflows.

Aspect ratios can be selected for generated output. Supported examples include 1:1, 16:9, 9:16, and 21:9, with additional ratios described by the project.

How it works

The server runs as a stdio MCP process and sends image-generation requests to Gemini. Its automatic selection mode routes requests to Nano Banana 2 by default, while prompts that clearly require Pro-level reasoning can be directed to the Pro model. Clients can also request a model tier explicitly:

  • nb2 for Gemini 3.1 Flash Image
  • pro for Gemini 3 Pro Image
  • flash for Gemini 2.5 Flash Image
  • auto for automatic routing

Nano Banana 2 supports output up to 3840 pixels, Google Search grounding, subject consistency for scenes with multiple subjects, and text rendering. The Pro model supports configurable LOW or HIGH thinking levels and media-resolution control. The legacy Flash model is intended for rapid drafts up to 1024 pixels.

Setup and configuration

nanobanana-mcp-server MCP server can be installed from the MCP Registry, launched with uvx nanobanana-mcp-server@latest, or installed with pip. Python 3.11 or newer is listed for development.

For API-key authentication, set GEMINI_API_KEY. Google Cloud deployments can use Vertex AI Application Default Credentials instead by setting NANOBANANA_AUTH_METHOD=vertex_ai, GCP_PROJECT_ID, and GCP_REGION. The project documentation lists auto as another authentication mode; it uses the API key when available and otherwise attempts Vertex AI. Vertex AI users must enable the Vertex AI API and grant the service account the roles/aiplatform.user role.

The documented client configurations cover Claude Desktop, Claude Code in VS Code, Cursor, OpenAI Codex, Continue, Open WebUI, and Gemini CLI. The server can also be started directly with python -m nanobanana_mcp_server.server after a pip installation.

Tools and capabilities

The README identifies these tools for direct client use:

  • generate_image creates images with a selected or automatically chosen Gemini model.
  • edit_image edits an existing image through the image workflow.
  • upload_file uploads files using the Gemini Files API.

Additional capabilities include aspect-ratio selection, reusable prompt templates, file management, resource discovery for templates and file metadata, validation, logging, error handling, and caching.

Limitations and notes

Model capabilities differ by tier. The documented Vertex AI region is global for Nano Banana 2 and Gemini 3 Pro Image; us-central1 is specified only for the legacy 2.5 Flash Image model.

Using this server requires either a Google Gemini API key or a working Vertex AI ADC setup. Google Search grounding and other model-specific behavior depend on the selected Gemini model.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Nanobanana MCP Server

nanobanana-mcp-server is an MCP server that connects MCP clients to Google's Gemini image models. Its main tools are generate_image for creating images, edit_image for modifying images, and upload_file for sending files through the Gemini Files API. It also exposes prompt templates and file metadata as MCP resources.

Install it with the MCP Registry, `uvx nanobanana-mcp-server@latest`, or `pip install nanobanana-mcp-server`.

Set `GEMINI_API_KEY` for API-key authentication, or configure Vertex AI with `NANOBANANA_AUTH_METHOD=vertex_ai`, `GCP_PROJECT_ID`, and `GCP_REGION`. The `auto` mode uses the API key when present and otherwise attempts Vertex AI credentials.

Yes, nanobanana-mcp-server works with Cursor through its MCP configuration. Add a server entry that runs `uvx nanobanana-mcp-server@latest` and provide `GEMINI_API_KEY` in the environment.

It supports Gemini 3.1 Flash Image, Gemini 3 Pro Image, and Gemini 2.5 Flash Image. The `nb2` model is the default, while `pro`, `flash`, and `auto` can be selected through the model tier.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNanobanana MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nanobanana-mcp-server?style=directory)](https://allmcps.com/mcp/nanobanana-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/nanobanana-mcp-server"><img src="https://allmcps.com/api/badge/nanobanana-mcp-server?style=directory" alt="Nanobanana MCP Server on AllMCPs" /></a>