MCP server for Google Nano Banana (Gemini) image generation
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server for AI-powered image generation using Google Gemini Nano Banana models. Generate, edit, and combine images from text prompts β directly from your AI coding assistant.
Set your API key:
For MCP Registry publication metadata, the registry name is io.github.codeFi/mcp-nano-banana.
Or add manually to ~/.codex/config.toml:
Add to ~/.qwen/settings.json:
Or add manually to ~/.claude/claude_desktop_config.json:
For CLIs and desktop clients that use the standard mcpServers JSON format, register:
Then register with your MCP client:
| Model | MCP Name | Description | Max Ref Images |
|---|---|---|---|
gemini-3-pro-image-preview | Nano Banana Pro | High quality, thinking mode, professional assets | 6 object + 5 character |
gemini-3.1-flash-image-preview | Nano Banana 2 | Fast, high-efficiency, 1:4/4:1/1:8/8:1 ratios | 10 object + 4 character |
gemini-2.5-flash-image | Nano Banana | Fastest, optimized for high-volume tasks | - |
The server defaults to Nano Banana Pro for best quality and automatically falls back to Flash on rate limits.
| Value | Approx. Pixels | Supported Models |
|---|---|---|
"512" | ~512px | Nano Banana 2 only |
"1K" | ~1024px | All models |
"2K" | ~2048px | All models |
"4K" | ~4096px | All models |
Default: "1K"
| Value | Dimensions at 1K | Common Use Case |
|---|---|---|
1:1 | 1024Γ1024 | Social posts, icons |
16:9 | 1344Γ768 | Headers, presentations |
9:16 | 768Γ1344 | Stories, mobile |
4:3 | 1152Γ896 | Desktop, photos |
3:4 | 896Γ1152 | Portraits |
2:3 | ~896Γ1344 | Print, magazines |
3:2 | ~1344Γ896 | Photos |
4:5 | ~896Γ1120 | Instagram posts |
5:4 | ~1120Γ896 | Instagram landscape |
21:9 | ~2048Γ878 | Ultra-wide banners |
1:4 | ~512Γ2048 | Nano Banana 2 only β tall strips |
4:1 | ~2048Γ512 | Nano Banana 2 only β wide strips |
1:8 | ~512Γ4096 | Nano Banana 2 only β extra tall |
8:1 | ~4096Γ512 | Nano Banana 2 only β extra wide |
generate_imageGenerate or edit images from text prompts.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | β Yes | β | Text description or editing instructions |
imagePaths | string[] | No | β | Reference image paths on disk (up to 14) |
model | string | No | gemini-3-pro-image-preview | Model to use |
aspectRatio | string | No | 1:1 | See table above for all options |
resolution | string | No | 1K | 512, 1K, 2K, or 4K |
outputFormat | string | No | png | png, jpeg, webp |
outputPath | string | No | β | Save image to this file path |
Generate from text:
Edit an existing image:
Combine multiple images:
High-res wallpaper:
generate_faviconsGenerate a complete favicon package from a prompt or existing image.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | No* | β | Icon description (required if imagePath not set) |
imagePath | string | No* | β | Path to existing master icon image |
model | string | No | gemini-3-pro-image-preview | Model for prompt generation |
outputDir | string | No | β | Directory for individual favicon files |
outputPath | string | No | β | Save ZIP package to this path |
returnZipBase64 | boolean | No | false | Return ZIP as base64 text |
appName | string | No | My App | Manifest name |
shortName | string | No | App | Manifest short_name |
themeColor | string | No | #ffffff | Manifest theme color |
backgroundColor | string | No | #ffffff | Manifest background color |
includeReadme | boolean | No | true | Include README.md in package |
Generated files:
favicon.ico β Multi-size icon (16/32/48px)favicon-16x16.png β Browser tabsfavicon-32x32.png β Higher-res tabsapple-touch-icon.png β iOS home screenandroid-chrome-192x192.png β Androidandroid-chrome-512x512.png β Android HDsite.webmanifest β PWA manifestHTML snippet (included in response):
Image generation requires a paid Google AI Studio account. Approximate costs:
| Model | 1K | 2K | 4K |
|---|---|---|---|
| Nano Banana 2 | ~$0.04 | ~$0.08 | ~$0.15 |
| Nano Banana Pro | ~$0.06 | ~$0.13 | ~$0.24 |
You only pay for what you generate β no monthly minimum.
Input (reference images): png, jpg, jpeg, webp, gif
Output: png, jpeg, webp
| Issue | Solution |
|---|---|
GEMINI_API_KEY is not set | Export the env var or add it to your MCP config |
429 Too Many Requests | Server auto-falls back to Flash model. Add billing to your account. |
403/402 Quota exceeded | Enable billing at Google Cloud Console |
503 Unavailable | High demand β retry in a moment. Common with 4K requests. |
| Image not updating after edit | Make sure you rebuilt the TypeScript (npm run build) |
imagePaths not found | Use absolute paths. Relative paths may not resolve correctly. |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-nano-banana)<a href="https://allmcps.com/mcp/mcp-nano-banana"><img src="https://allmcps.com/api/badge/mcp-nano-banana?style=directory" alt="MCP Nano Banana on AllMCPs" /></a>