
Nanobanana Mcp
io.github.getjoystick由 GitHub 帳號 getjoystick 發布v0.1.2更新於 Oct 24, 2026
Lean MCP server for Google's Nano Banana (Gemini) image models. Returns file paths, not base64.
概覽
本機 MCP 伺服器,讓助理用 Google Gemini 模型生成與編輯圖片、製作 Veo 影片,並把檔案存到磁碟後回傳路徑。
- 可以做什麼
- 依提示詞生成圖片,可設定長寬比、解析度、Google 搜尋接地與思考等級
- 用一張或多張參考圖編輯圖片,實現風格轉移、角色一致或合成
- 以文字或起始影格啟動 Veo 影片工作,支援參考圖、負面提示詞與人物生成設定
- 輪詢影片工作並把完成的片段存成 mp4,回傳路徑與 Veo URI
- 把既有的 Veo 片段延長約七秒
- 列出目前 API 金鑰可用的圖片與影片模型 id
- 適用情境
- 適合希望助理在程式開發或桌面用戶端內直接產出、修改圖片與短影片,又不願讓 base64 資料佔滿上下文的場合。適用於需要把素材存成檔案的工作流程,例如效果圖、資訊圖表或短片。
- 執行需求
- 透過 npx 從 npm 套件在本機執行,需要 Node.js。需要 GEMINI_API_KEY 中的 Gemini API 金鑰(GOOGLE_API_KEY 亦可);可選 NANOBANANA_MODEL、NANOBANANA_VIDEO_MODEL 與 NANOBANANA_OUTPUT_DIR 設定預設值。需要連線至 Google API 的網路,影片還需已開通計費的金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Nanobanana Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@nanobanana/mcp 🍌
A lean MCP server for Google's Nano Banana (Gemini) image models and Veo video models. It generates and edits images and generates video from any MCP client (Claude Code, Claude Desktop, Cursor) and hands back file paths instead of base64, so your agent's context stays small.
- Six tools and nothing else:
generate_image,edit_image,generate_video,extend_video,get_video_result,list_models - Defaults to Nano Banana 2 (
gemini-3.1-flash-image) and Veo 3.1 Fast (veo-3.1-fast-generate-preview). Switch models per call or via env. If a pinned model id ever goes stale,list_modelsshows what your key can actually use. - Multi-image editing: pass reference images for style transfer, characters, or compositing
- Control over aspect ratio (
1:1through21:9, out to1:4and8:1) and resolution (512,1K,2K,4K) - Google Search grounding for images that need real-world accuracy, like infographics
- Video as a job, not a blocked call: generation takes 1–6 min, so
generate_videoreturns a job id andget_video_resultpolls within every client's 60s timeout - Safe output paths. The server never writes to
/when a desktop MCP client spawns it there. - Auth lives in env vars only, so your API key never passes through chat context
Quick start
Get a free Gemini API key at aistudio.google.com/apikey.
Claude Code
Also listed in the MCP Registry as io.github.getjoystick/nanobanana-mcp.
Claude Desktop / Cursor: add this to claude_desktop_config.json or .cursor/mcp.json:
Tools
generate_image
edit_image
Same params, plus:
Both tools save to disk and return the file path.
list_models
Takes no params. Lists the image and video model ids your API key can use, in two sections. Handy when a pinned model id stops working, which is how earlier Nano Banana servers broke — and Veo's ids are previews that will be renamed.
Video
Veo generation takes 1–6 minutes, and MCP clients kill a tool call at ~60s. So video is a job: you start one, then poll.
get_video_result does the waiting for you — each call blocks up to waitSeconds
(45 by default, the most that fits inside a client's 60s timeout). Call it right
away and call it again the moment it returns; there is no need to pause in between,
which matters because an agent has no way to sleep.
The job id carries everything the server needs, so it keeps working even if the
server process restarts in between. Download promptly: Google deletes generated
videos server-side after ~2 days — and that server-side copy is the only thing
extend_video can extend, so keep the Veo URI if you plan to continue the shot.
Animating an image you just generated? Give generate_image an aspectRatio of
16:9 or 9:16 first. Veo only outputs those two ratios and crops the frame you
hand it, so a square image loses its edges — and you pay for the clip either way.
generate_video
Frames (image, referenceImages) must be png or jpg.
extend_video
Extends a Veo-generated clip by ~7s, continuing from its final second. Input up to ~141s, output up to ~148s across at most 20 extensions, always 720p. Not supported by Lite.
Extension runs on Google's copy of the video, not on your local file — pass the
Veo URI that get_video_result prints. It expires with the video after ~2 days.
get_video_result
Saves the finished video as .mp4 and returns the absolute path, plus the Veo URI
of the server-side copy that extend_video needs.
Configuration
Models
Video models
Veo has no free tier — you need a billing-enabled API key, and you are charged per second of output.
All three do text-to-video, image-to-video, and native audio. Extension,
reference images, and 4k are Veo 3.1 and 3.1 Fast only. Clips are 4, 6, or 8
seconds, in 16:9 or 9:16.
Development
Acknowledgements
Inspired by other Nano Banana MCPs. Built with Claude Code.
License
MIT
來源:README.md,提交 697550f
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分