Nano Banana Mcp

io.github.fjacquetv3.2.1更新于 Oct 11, 2026

AI image generation and editing with Google Gemini: Nano Banana 2.1, Pro and Lite models

已验证STDIO仅桌面AI & MLMedia & Design

概览

AI 生成的概览

让助手通过 Google Gemini 图像模型生成并迭代编辑图片,需使用 Gemini API 密钥。

功能
这个本地 MCP 服务器提供 AI 图像相关工具:generate_image 根据文本提示生成新图片,edit_image 修改已有图片并可附带参考图,continue_editing 对上一张图片进行迭代编辑。此外还有 get_last_image_info 查看上一张图片信息、configure_gemini_token 设置 API 密钥、get_configuration_status 检查配置状态。生成与编辑工具都接受可选的 model 参数,用于在多个 Gemini 图像模型之间选择。
适用场景
适合希望在 Claude Code、Cursor 等 MCP 客户端中,用自然语言提示让助手创建或修改图片,并对同一张图片做多步编辑的场景。适用于把图像生成作为任务一部分的桌面工作流。
运行要求
以 stdio 方式在本地运行,需要 Node.js 18 或更高版本以及 npx。必须提供来自 Google AI Studio 的 Gemini API 密钥,可通过 GEMINI_API_KEY 环境变量传入,或稍后用 configure_gemini_token 工具设置。需要访问 Google Gemini API 的网络连接。
安装前请注意
服务器需要 GEMINI_API_KEY 密钥,该密钥可访问你的 Google AI Studio 账户,并可能在该账户上产生使用费用。图像提示词以及你传入的参考图会发送到 Google 的 Gemini API。configure_gemini_token 工具可在运行时设置密钥,因此运行中的进程会持有该凭据。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Nano-Banana MCP Server

[npm version] [CI] [License: MIT] [Node.js >= 18] [Release] [License]

An MCP server for AI image generation and editing using Google Gemini. Works with Claude Code, Cursor, and other MCP clients.

Models supported:

Brand nameModel IDNotes
Nano Banana 2.1gemini-nano-banana-2.1Default — pro quality at Flash speed
Nano Banana Progemini-3-pro-imageHighest quality, advanced reasoning
Nano Banana 2gemini-3.1-flash-imagePrevious default
Nano Banana 2 Litegemini-3.1-flash-lite-imageFastest and cheapest — 1K output only
Nano Bananagemini-2.5-flash-imageLegacy — shut down by Google on 2027-03-15

Quick Start

  1. Get a Gemini API key from Google AI Studio

  2. Add to your MCP client config (Claude Code example):

json
{  "mcpServers": {    "nano-banana": {      "command": "npx",      "args": ["-y", "github:fjacquet/Nano-Banana-MCP"],      "env": {        "GEMINI_API_KEY": "your-key-here"      }    }  }}

See docs/configuration.md for Cursor and other MCP clients.

  1. Use the tools:
Generate an image of a sunset over mountainsEdit this image to add some birds in the skyContinue editing to make it more dramatic

Tools

ToolDescription
generate_imageCreate new images from text prompts
edit_imageModify existing images with optional reference images
continue_editingIteratively edit the last image
get_last_image_infoGet info about the last image
configure_gemini_tokenSet API key
get_configuration_statusCheck configuration

All generation/editing tools accept an optional model parameter to choose between the two models.

See docs/tools.md for full API reference, docs/configuration.md for setup details, and docs/workflows.md for usage patterns.

Development

bash
npm installnpm run dev          # Run with tsxnpm run build        # Compile TypeScriptnpm test             # Run testsnpm run lint         # Lintnpm run typecheck    # Type-check

Requires Node.js >= 18.0.0.

License

MIT — see LICENSE.

Fork of ConechoAI/Nano-Banana-MCP.

来源:README.md,提交 dd44598

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v3.2.1最新Oct 11, 2026