mcp-nano-banana
Generates and edits images from text prompts and reference images using Google Gemini image models, with configurable model, aspect ratio, output format, and fallback from Pro to Flash.
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., "@mcp-nano-banana Create a 16:9 illustration of a sunset over mountains and save it as sunset.png"
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.
mcp-nano-banana
MCP server for AI-powered image generation using Google Gemini models. Generate images from text prompts or combine multiple reference images.
Features
Text-to-image generation
Multi-image combination (up to 14 reference images)
Automatic fallback from Pro to Flash model on rate limits
Save output to file or return inline
Support for multiple aspect ratios and output formats
Generate a full favicon package (PNG sizes, favicon.ico, manifest, README, optional ZIP)
Related MCP server: Toolkits MCP
Use Cases
Generate illustrations - Create images for blog posts, documentation, or presentations
Edit existing images - Add objects, change backgrounds, or modify elements in photos
Combine multiple images - Merge product photos, create composites, or blend styles
Create variations - Generate different versions of a concept or design
Prototype UI mockups - Quickly visualize interface ideas or app screens
Generate icons and assets - Create logos, buttons, or graphic elements for projects
Installation
npm install -g @igorstechnoclub/mcp-nano-bananaImportant: Don't forget to set your GEMINI_API_KEY environment variable (see Configuration below).
Configuration
Environment Variable
Set your Gemini API key:
export GEMINI_API_KEY=your-api-keyGet an API key at: https://aistudio.google.com/apikey
Claude Code Setup
Add the MCP server using the CLI:
claude mcp add nano-banana -e GEMINI_API_KEY=your-api-key -- npx -y @igorstechnoclub/mcp-nano-banana@latestOr add manually to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": ["-y", "@igorstechnoclub/mcp-nano-banana@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Usage
Tool: generate_image
Parameter | Type | Required | Default | Description |
| string | Yes | - | Text description or editing instructions |
| string[] | No | - | Reference image paths (up to 14) |
| string | No |
| Model to use |
| string | No |
|
|
| string | No |
|
|
| string | No | - | Save image to this path |
Examples
Generate from text:
prompt: "A sunset over mountains"
outputPath: "/path/to/output.png"Combine images:
prompt: "Put these glasses on this person's face"
imagePaths: ["/path/to/face.jpg", "/path/to/glasses.jpg"]
outputPath: "/path/to/result.png"Tool: generate_favicons
Generate a complete favicon package from a prompt or an existing image.
Parameter | Type | Required | Default | Description |
| string | No* | - | Icon description (required if |
| string | No* | - | Path to existing master icon image |
| string | No |
| Model to use when generating from prompt |
| string | No | - | Directory to write individual favicon files |
| string | No | - | Save ZIP package to this path |
| boolean | No |
| Return ZIP as base64 text |
| string | No |
| Manifest |
| string | No |
| Manifest |
| string | No |
| Manifest theme color |
| string | No |
| Manifest background color |
| boolean | No |
| Include |
Generate from prompt and write files + ZIP:
prompt: "A minimalist banana icon with a soft gradient"
outputDir: "/path/to/favicon"
outputPath: "/path/to/favicon.zip"Use an existing image and return base64 ZIP:
imagePath: "/path/to/master-icon.png"
returnZipBase64: trueCodex MCP Usage (Local)
Build the local server:
npm install
npm run buildRegister with Codex:
codex mcp add nano-banana --env GEMINI_API_KEY=your-api-key -- node /path/to/mcp-nano-banana/dist/index.jsExample request:
Use MCP tool generate_favicons with:
prompt: "A bold, simple icon for VideoFix: a stylized play button combined with a small wrench, flat design, high contrast, centered on a soft off-white background."
appName: "VideoFix"
shortName: "VideoFix"
themeColor: "#1d1b18"
backgroundColor: "#f7f3ef"
outputDir: "/path/to/project/assets/favicon"Models
gemini-3-pro-image-preview- High quality (default)gemini-2.5-flash-image- Fast generation
The server automatically falls back to Flash if Pro hits rate limits (429/403/402 errors).
Development
# Build
npm run build
# Test
npm test
# Run directly
node dist/index.jsBlog Post
Read about the development of this project: https://igorstechnoclub.com/mcp-nano-banana/
Author
Visit my personal site: https://igorstechnoclub.com
License
MIT
Available Tools
2 toolsgenerate_faviconsA
Generate a full favicon package from a prompt or an existing image. Creates PNG sizes, a web manifest, and optional README, then writes files and/or a ZIP bundle.
Inputs: model, prompt, appName, imagePath, +7 more.
generate_imageA
Generate an image using Google Nano Banana (Gemini) AI model. Can generate from text only, or use one or more reference images (up to 14) to guide generation.
Inputs: prompt (required), model, imagePaths, outputPath, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
generate_image and generate_favicons have clearly different outputs (single image vs. a full favicon package with manifest and ZIP), so selection is usually straightforward. However, generate_favicons is essentially a specialization of image generation, so there is minor conceptual overlap in purpose.
Both tools follow the same snake_case verb_noun pattern (generate_image, generate_favicons). The convention is consistent and immediately readable.
Two tools is on the thin side for a server whose domain (image generation and asset packaging) naturally invites more operations. It is not wrong, but the surface feels minimal rather than well-scoped.
Core generation and favicon packaging are covered, but there are notable gaps: no image editing/inpainting, variation, upscaling, or background-removal operations, and no way to inspect or manage previously generated assets. Agents needing anything beyond one-shot generation hit a dead end.
Maintenance
Related MCP Connectors
Generate PWA icon sets and iOS splash screens from a text prompt or an existing image.
Generate, edit and upscale images with references, batch jobs, cost previews and original downloads.
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
Check, generate, and troubleshoot complete favicon, Apple touch icon, PWA, and web app icon sets.
Related MCP Servers
- AlicenseAqualityDmaintenanceAutomatically generates complete favicon sets from PNG images or URLs, creating multiple sizes, ICO files, Apple touch icons, and manifest.json for web applications.234MIT
- FlicenseNot gradedqualityDmaintenanceA collection of image processing tools that enables users to optimize images, remove backgrounds using AI, and generate favicons from logo files locally.-
- 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
- AlicenseAqualityDmaintenanceEnables AI-powered image generation and editing using Google Gemini models, with support for transparency, reference images, and flexible output sizes.2MIT