zhongweili avatar

Nanobanana Mcp Server

zhongweili/nanobanana-mcp-server

The Nano Banana MCP Server provides AI-powered image generation through Google's Gemini models, offering three model options including the default Gemini 3.1 Flash Image for 4K resolution output at high speed with intelligent automatic model selection based on prompt complexity. It exposes tools for image generation with customizable aspect ratios and smart prompt templates, file management via the Gemini Files API, and resource discovery for templates and metadata. The server solves the problem of integrating advanced image generation capabilities into AI applications while optimizing for latency, quality, and reasoning depth across different use cases.

GitHub stars
362
tools
3
auth
Secret needed
transport
STDIO
env vars
2
last updated
Sep 9, 2025

Tools

3 tools

Public tool metadata for what this MCP can expose to an agent.

generate_imageGenerate an image from a text prompt3 params

Generate an image from a text prompt

Parameters* required
aspect_ratiostring
Aspect ratio of the generated imageone of 1:1 · 16:9 · 9:16 · 3:4 · 4:3default: 1:1
modelstring
Gemini model to use for generationdefault: gemini-2.0-flash
promptstring
Text description of the image to generate
edit_imageEdit an existing image using a text prompt5 params

Edit an existing image using a text prompt

Parameters* required
aspect_ratiostring
Aspect ratio of the output imageone of 1:1 · 16:9 · 9:16 · 3:4 · 4:3default: 1:1
image_datastring
Base64-encoded image data
mime_typestring
MIME type of the input imageone of image/png · image/jpeg · image/webpdefault: image/png
modelstring
Gemini model to use for editingdefault: gemini-2.0-flash
promptstring
Edit instructions for the image
describe_imageDescribe the contents of an image4 params

Describe the contents of an image

Parameters* required
image_datastring
Base64-encoded image data
mime_typestring
MIME type of the input imageone of image/png · image/jpeg · image/webpdefault: image/png
modelstring
Gemini model to usedefault: gemini-2.0-flash
promptstring
Optional prompt to guide the descriptiondefault: Describe this image in detail.

Sponsors

Configuration

GEMINI_API_KEY*secret

Your Gemini API key

IMAGE_OUTPUT_DIR

The image output directory

Readme

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
nanobanana-mcp-server MCP server

✨ Features


View the full README on GitHub

Details

Repository
github.com/zhongweili/nanobanana-mcp-server
Package
nanobanana-mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active