Nano Banana

io.github.mindstone由 GitHub 账号 mindstone 发布v0.5.0更新于 Nov 3, 2026

Nano Banana MCP server — Google Gemini image generation and editing via Model Context Protocol

已验证STDIO仅桌面媒体与设计AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,让助手用 Google Gemini 模型生成和编辑图片,并保存到工作区目录。

可以做什么
  • 根据文字描述生成图片,可选择 Gemini 图像模型和输出分辨率。
  • 编辑或合成已有图片,最多可引用 14 张来自工作区路径或 HTTPS 链接的参考图。
  • 把结果保存到工作区指定路径,文件仅所有者可读写且不会覆盖已有文件。
  • 通过配置工具保存 Gemini API 密钥,无需手动改配置文件。
适用场景
适合让助手在对话中根据提示词生成插画、示意图或变体,或对现有图片进行编辑、组合与放大,而无需切换到其他工具。
运行要求
通过 npx 在本地运行,需要 Node.js 20+ 和 npm。需要在 GEMINI_API_KEY 中提供 Google Gemini API 密钥。可选设置:MCP_WORKSPACE_PATH 指定图片保存目录,以及超时覆盖项 NANO_BANANA_GEMINI_TIMEOUT_MS 和 NANO_BANANA_BRIDGE_TIMEOUT_MS。需要能访问 Google Gemini API 的网络。
安装前请注意
GEMINI_API_KEY 是会产生费用的凭据;生成图片,尤其是 Nano Banana 2.1 模型默认开启的思考级别,都会在 Google 侧计费。提示词和参考图(包括远程链接)会发送给 Google。服务器会向工作区写入文件,请把 MCP_WORKSPACE_PATH 指向你愿意存放图片的目录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Nano Banana,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@mindstone/mcp-server-nano-banana

[npm version] [License: FSL-1.1-MIT]

Nano Banana MCP server — Google Gemini image generation and editing via Model Context Protocol. Generate images from text descriptions and edit existing images using Google Gemini's AI capabilities.

Status

Requirements

  • Node.js 20+
  • npm

One-click install

[Add to Cursor] [Add to VS Code] [Add to VS Code Insiders]

After clicking the button, your host will prompt you to fill: GEMINI_API_KEY, NANO_BANANA_GEMINI_TIMEOUT_MS, NANO_BANANA_BRIDGE_TIMEOUT_MS.

Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Nano Banana)
json
{  "mcpServers": {    "Nano Banana": {      "command": "npx",      "args": [        "-y",        "@mindstone/mcp-server-nano-banana"      ],      "env": {        "GEMINI_API_KEY": "",        "NANO_BANANA_GEMINI_TIMEOUT_MS": "180000",        "NANO_BANANA_BRIDGE_TIMEOUT_MS": "30000"      }    }  }}

Quick Start

Install & build

bash
cd <path-to-repo>/connectors/nano-banananpm installnpm run build

npx (once published)

bash
npx -y @mindstone/mcp-server-nano-banana

Local

bash
node dist/index.js

Configuration

Environment variables

  • GEMINI_API_KEY — Google Gemini API key
  • MCP_WORKSPACE_PATH — optional workspace path for saving generated images
  • MCP_HOST_BRIDGE_STATE — optional path to a host bridge state file used for credential management
  • MINDSTONE_REBEL_BRIDGE_STATE — backwards-compatible alias for MCP_HOST_BRIDGE_STATE
  • NANO_BANANA_GEMINI_TIMEOUT_MS — optional override (positive integer ms) for the outbound Gemini request timeout. Default: 180000 (3 min). Increase this if you use gemini-3-pro-image and see TIMEOUT errors on slow generations; decrease it if you want tighter bounds.
  • NANO_BANANA_BRIDGE_TIMEOUT_MS — optional override (positive integer ms) for requests to the host bridge. Default: 30000.

Host configuration examples

Claude Desktop / Cursor

json
{  "mcpServers": {    "NanoBanana": {      "command": "npx",      "args": ["-y", "@mindstone/mcp-server-nano-banana"],      "env": {        "GEMINI_API_KEY": "your-gemini-api-key"      }    }  }}

Local development (no npm publish needed)

json
{  "mcpServers": {    "NanoBanana": {      "command": "node",      "args": ["<path-to-repo>/connectors/nano-banana/dist/index.js"],      "env": {        "GEMINI_API_KEY": "your-gemini-api-key"      }    }  }}

Tools (3)

Configuration

  • configure_nano_banana_api_key — Save your Gemini API key for image generation

Image generation

  • nano_banana_generate — Generate images from text descriptions
  • nano_banana_edit — Edit existing images using AI; accepts up to 14 reference images (source_image_paths) for multi-image composition/fusion. Each source may be a workspace file path or an https:// URL — every source is capped at 20MB per image (local files included) with a combined-size cap across sources, and remote fetches are SSRF-guarded (HTTPS only, no userinfo, private/loopback/link-local hosts refused with DNS re-validation, redirects re-validated per hop, PNG/JPEG/WebP only)

Both image tools accept an optional save_path inside the workspace. Saves never overwrite: if a file (or symlink) already exists at save_path, the tool returns a SAVE_EXISTS error (with the image still included inline) — choose a different path or delete the existing file. Saved files are written owner-only (0600).

Generated and edited output is identified from its bytes before it is returned or saved. PNG, JPEG, and WebP are supported; other or unrecognised formats (including GIF) return a structured UNSUPPORTED_IMAGE_FORMAT error instead of being relabelled.

Output resolution

Both image tools accept an optional image_size parameter ("1K", "2K", or "4K"; default "1K" ≈ 1024px). Higher resolutions are only honoured by the Gemini 3 image models (gemini-3.1-flash-image, the default, gemini-3-pro-image and gemini-nano-banana-2.1); the legacy gemini-2.5-flash-image always produces ~1K output and rejects an explicit image_size.

gemini-nano-banana-2.1 (Nano Banana 2.1) can be chosen with model; it is not the default. Google enables thinking on it by default (level medium, billed), so it is slower than gemini-3.1-flash-image. It takes 1K, 2K or 4K.

The model parameter also accepts the retired preview ids gemini-3.1-flash-image-preview and gemini-3-pro-image-preview, which Google shut down on 2026-06-25; a request naming one is sent as its generally available id (gemini-3.1-flash-image, gemini-3-pro-image).

Licence

FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.

来源:connectors/nano-banana/README.md,提交 9b9aa57

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.5.0最新Nov 3, 2026
  2. v0.4.1Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。