
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 分
請在儲存庫或註冊中心條目中宣告授權條款。