mcpField
N
NanoBanana Pro 2

NanoBanana Pro 2

Local
github.com/u2n4Media & Design3Updated 28w ago

About NanoBanana Pro 2

NanoBanana Pro 2 is an MCP server for generating and editing images with Pro and Flash models, defaulting to 4K output. It supports reference images, negative prompts, Google Search grounding, and image metadata tracking.

Key features

  1. 01Choose Pro or Flash models
  2. 02Generate images and edit with references
  3. 03Resolution up to 4K
  4. 04Negative prompts and batch generation
  5. 05Google Search grounding
  6. 06Image statistics and storage maintenance

Use cases

  1. 01Create detailed images of complex scenes
  2. 02Generate consistent views from reference images
  3. 03Iterate quickly on simple image concepts
  4. 04Review generated image counts and storage

MCP support

The server exposes image generation, reference-file upload, output statistics, and storage-maintenance tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"u2n4-nanobanana-imagen": {
"command": "uvx",
"args": [
"nanobanana-imagen-mcp"
]
}
}
}
Run commanduvx nanobanana-imagen-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypinanobanana-imagen-mcp1.1.2

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

NanoBanana MCP Server

MCP server for AI image generation using NanoBanana Pro 2. Supports Pro (maximum quality) and Flash (fast generation) models with default 4K resolution.

Inspired by the nano-banana naming convention used across the MCP community. This is an independent implementation.

Quick Install

pip install nanobanana-imagen-mcp
# or
uvx nanobanana-imagen-mcp --help

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "nanobanana": {
      "command": "uvx",
      "args": ["nanobanana-imagen-mcp"],
      "env": {
        "GEMINI_API_KEY": "your_key_here"
      }
    }
  }
}
VariableDescriptionDefault
GEMINI_API_KEYGemini API key — required for all generation--
IMAGE_OUTPUT_DIRDirectory where generated images are saved~/nanobanana-images
NANOBANANA_DB_PATHSQLite database path for image metadata~/nanobanana-images/images.db

What It Does

Generates AI images using NanoBanana Pro 2 models. Supports text-to-image generation, image editing with reference images, file uploads, and server maintenance. Produces high-quality images at up to 4K resolution.

Tools (4)

ToolDescription
generate_imageGenerate images using NanoBanana Pro 2. Supports model selection (Pro/Flash), aspect ratio, resolution (up to 4K), negative prompts, thinking level, grounding, reference images, and batch generation.
upload_fileUpload a reference image for use in image editing or conditioning.
show_output_statsDisplay statistics about generated images — count, total size, file details.
maintenanceServer maintenance and cleanup — clear caches, remove temporary files, optimize storage.

Models

ModelEngineBest For
ProGemini 3 Pro ImageMaximum quality, complex scenes, photorealism
FlashGemini 3.1 Flash ImageFast generation, simple scenes, quick iterations

Configuration

VariableDescriptionDefault
GEMINI_API_KEYGemini API key (required)--
IMAGE_OUTPUT_DIROutput directory for generated images~/nanobanana-images

Storage

Generated image metadata is tracked in a SQLite database.

VariableDescriptionDefault
NANOBANANA_DB_PATHPath to the SQLite metadata database~/nanobanana-images/images.db

Opt out of persistent storage by setting NANOBANANA_DB_PATH=:memory:. This uses an in-memory database that is discarded when the server exits — useful for ephemeral or read-only environments. Trade-off: image history is lost on restart; the show_output_stats tool will show an empty database each session.

The database and output directories are created lazily on first image generation — starting the server with no GEMINI_API_KEY set (e.g. nanobanana-imagen-mcp --help) does not create any files or directories.

Claude Desktop Configuration

From pip (recommended)
pip install nanobanana-imagen-mcp
{
  "mcpServers": {
    "nanobanana": {
      "command": "uvx",
      "args": ["nanobanana-imagen-mcp"],
      "env": {
        "GEMINI_API_KEY": "your_key_here"
      }
    }
  }
}
From this repository
{
  "mcpServers": {
    "nanobanana": {
      "command": "python",
      "args": ["-m", "servers.nanobanana.nanobanana_mcp_server.server"],
      "env": {
        "GEMINI_API_KEY": "your_key_here"
      },
      "cwd": "path/to/gemini-media-mcp"
    }
  }
}

Features

  • Default 4K resolution for maximum detail
  • Pro model for complex, photorealistic scenes
  • Flash model for fast iterations and simple subjects
  • Reference image support for consistent multi-angle shots
  • Negative prompt support for quality control
  • Thinking level control for complex multi-element scenes
  • Google Search grounding for real-world subjects

License

MIT

Credits

Inspired by the nano-banana naming convention used across the MCP community. This is an independent implementation.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.