
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 分