Nano Banana MCP Server
Provides AI image generation and editing through Google's Gemini (Nano Banana 2) image model, including text-to-image, image editing and restoration, icons, patterns, story sequences, and diagrams.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nano Banana MCP Server Generate a mountain landscape at sunset, 16:9, 2K resolution"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Nano Banana MCP Server
An MCP (Model Context Protocol) server for AI image generation using Google's Nano Banana 2 (Gemini 3.1 Flash Image) model. Works with Claude Code, Gemini CLI, and any MCP-compatible client.
Forked from gemini-cli-extensions/nanobanana (v1.0.11) by Google LLC, with added support for aspect ratio and image resolution control.
What's different from upstream
aspectRatioparameter:1:1,9:16,16:9,3:4,4:3imageSizeparameter:512px,1K,2K,4KBoth passed to the Gemini API via
imageConfigingenerateContent
Related MCP server: Nano Banana
Tools
Tool | Description |
| Text-to-image with styles, variations, aspect ratio, resolution |
| Edit an existing image from a text prompt |
| Enhance or repair an existing image |
| App icons, favicons, and UI elements |
| Seamless patterns and textures |
| Sequential visual narratives (2-8 steps) |
| Flowcharts, architecture, wireframes |
Setup
Prerequisites
Node.js >= 18
Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"nanobanana": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Gemini CLI
Install as an extension:
gemini extensions install https://github.com/gemini-cli-extensions/nanobananaOr point to this server in your settings.json:
{
"mcpServers": {
"nanobanana": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Usage examples
Generate a mountain landscape at sunset, 16:9, 2K resolution
Edit chill-original.png: remove all floating icons, keep only the person
Generate an app icon for a banana delivery serviceEnvironment variables
Variable | Description |
| Your Gemini API key (required) |
| Override the model (default: |
Development
npm install
npm run build # compile TypeScript
npm run dev # watch mode
npm start # run the serverLicense
Apache-2.0 -- see LICENSE.
Original work Copyright 2025 Google LLC. Modifications by lennix.
Available Tools
7 toolsedit_imageB
Edit an existing image based on a text prompt
Inputs: file (required), prompt (required), preview.
generate_diagramB
Generate technical diagrams, flowcharts, and architectural mockups
Inputs: prompt (required), type, style, colors, +4 more.
generate_iconB
Generate app icons, favicons, and UI elements in multiple sizes and formats
Inputs: prompt (required), type, sizes, style, +4 more.
generate_imageB
Generate single or multiple images from text prompts with style and variation options
Inputs: prompt (required), seed, format, styles, +5 more.
generate_patternB
Generate seamless patterns and textures for backgrounds and design elements
Inputs: prompt (required), size, type, style, +4 more.
generate_storyB
Generate a sequence of related images that tell a visual story or show a process
Inputs: prompt (required), type, steps, style, +4 more.
restore_imageC
Restore or enhance an existing image
Inputs: file (required), prompt (required), preview.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are clearly differentiated by output type: icons, patterns, stories, and diagrams are specialized generation modes. The main overlap is between restore_image and edit_image, since both modify an existing image, but the descriptions distinguish enhancement/restoration from prompt-based editing.
All seven tools follow a consistent snake_case verb_noun pattern: restore_image, edit_image, generate_image, generate_icon, generate_pattern, generate_story, and generate_diagram. The convention is predictable and easy to scan.
Seven tools is well-scoped for an image generation and editing server. Each tool maps to a meaningful image workflow, and there are no obviously redundant entries.
The surface covers core image creation, editing, restoration, and several important specialized generation cases. Minor gaps may exist around image management operations such as listing or retrieving generated assets, but the creative workflow is largely complete.
Maintenance
Related MCP Connectors
Generate and edit images: article covers, pet portraits, product shots. Each call spends credits.
Generate and edit images (PNG, transparent, GIF, SVG) with GPT Image and Nano Banana models.
Image generation, image editing and text/image-to-video with credit quotes and connection budgets.
Generate, edit and upscale images with references, batch jobs, cost previews and original downloads.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables text-to-image generation, image editing, and multi-image composition using Google's Gemini 2.5 Flash Image API. Supports flexible aspect ratios and character consistency across generations.1MIT
- AlicenseBqualityDmaintenanceGenerate, edit, and restore images using natural language prompts through the Gemini 2.5 Flash image model. Supports creating app icons, seamless patterns, visual stories, and technical diagrams with smart file management.810Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI image generation and editing using Google's Gemini models via natural language, supporting multi-turn editing, search grounding, storyboards, icon sets, and video-to-image.516 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables image generation, editing, and refinement using Google's Gemini 2.5 Flash Image model with support for multi-image composition and style transfer.ISC