
Mcp Nano Banana
io.github.codeFi由 GitHub 账号 codeFi 发布v1.2.2更新于 Oct 24, 2026
MCP server for Google Nano Banana (Gemini) image generation
概览
一个本地 MCP 服务器,让 AI 助手通过 Google Gemini Nano Banana 模型生成、编辑和合成图片。
- 可以做什么
- 根据文本提示生成图片,可指定分辨率、宽高比和输出格式,保存到指定路径或以 base64 内联返回。编辑已有图片,或将磁盘上最多 14 张参考图合成为一张。生成完整 favicon 套件,包括图标文件、Web 清单和 HTML 片段。可在 Nano Banana Pro、Nano Banana 2 和 Nano Banana Flash 模型间选择,遇到限流时自动回退到 Flash。
- 适用场景
- 适合在工作过程中让助手直接创建或修改图片,例如示意图、壁纸、社交媒体素材或网站图标,无需离开对话。最适合已拥有付费 Google AI Studio 账户并接受按图计费的用户。
- 运行要求
- 通过 stdio 在本地运行,通常用 npx 从 npm 包 mcp-nano-banana 启动,需要 Node.js。需要以 GEMINI_API_KEY 环境变量提供 Gemini API 密钥,并在 Google Cloud 项目中启用付费层级的结算。需要访问 Google Gemini API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Nano Banana,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-nano-banana
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.
Features
- Text-to-image generation — Create images from natural language descriptions
- Image editing — Upload images and modify them with text instructions
- Multi-image combination — Mix up to 14 reference images into one composite
- Resolution control — Generate at 512px, 1K, 2K, or 4K resolution
- 13+ aspect ratios — From square (1:1) to ultra-wide (21:9) and tall (1:8)
- Auto-fallback — Pro model falls back to Flash on rate limits (429/403/402)
- File output — Save to specific paths or return inline base64
- Favicon generation — Generate complete favicon packages with one command
- Multi-format output — PNG, JPEG, and WebP support
Quick Start
Prerequisites
- Get a Gemini API key from Google AI Studio
- Enable billing on your Google Cloud project — image generation requires a paid tier (~$0.04-0.05/image for NB2 at standard resolution)
Installation
Set your API key:
For MCP Registry publication metadata, the registry name is io.github.codeFi/mcp-nano-banana.
MCP Configuration
Codex
Or add manually to ~/.codex/config.toml:
Qwen Code
Add to ~/.qwen/settings.json:
Claude Code
Or add manually to ~/.claude/claude_desktop_config.json:
Other MCP Clients
For CLIs and desktop clients that use the standard mcpServers JSON format, register:
Local / Development Build
Then register with your MCP client:
Models
The server defaults to Nano Banana Pro for best quality and automatically falls back to Flash on rate limits.
Available Parameters
Resolution
Default: "1K"
Aspect Ratio
Tools
generate_image
Generate or edit images from text prompts.
Examples
Generate from text:
Edit an existing image:
Combine multiple images:
High-res wallpaper:
generate_favicons
Generate a complete favicon package from a prompt or existing image.
Example
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 manifest
HTML snippet (included in response):
Pricing
Image generation requires a paid Google AI Studio account. Approximate costs:
You only pay for what you generate — no monthly minimum.
Supported Image Formats
Input (reference images): png, jpg, jpeg, webp, gif
Output: png, jpeg, webp
Development
Troubleshooting
Architecture
License
Author
来源:README.md,提交 7b722eb
工具
0版本历史
1- v1.2.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。