Nano Banana Pro MCP

Nano Banana Pro MCP

Enables Claude to generate and edit images using Google's Gemini image models, with options for resolution and batch processing, and optional Firebase Storage for cross-environment image transfer.

Category
访问服务器

README

Nano Banana Pro MCP Server

A minimal, auditable MCP server that gives Claude Desktop the ability to generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) model.

~150 lines of TypeScript. No hidden dependencies. You own the code.

What it does

Tool Description
set_model Switch between Gemini image models
set_resolution Set source resolution (1K/2K/4K)
generate_image Create an image from a text prompt
generate_image_batch Create several images at once
edit_image Edit an image (given its URL) with instructions

Generated images are returned inline (so Claude can display them in chat) and saved to ~/nano-banana-output/.

Images are never written to local disk. Each is returned inline for viewing, and — when Firebase Storage is configured — uploaded there with a signed URL you can fetch from other environments (e.g. to embed in a document).

Prerequisites

  • Node.js 18+ — check with node --version
  • Gemini API key — free from Google AI Studio. Enable billing for image generation (pay-per-image, no monthly minimum).

Setup

1. Clone and build

git clone <your-repo-url> nano-banana-mcp
cd nano-banana-mcp
npm install
npm run build

2. Configure Claude Desktop

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this entry (adjust the path to where you cloned the repo):

{
  "mcpServers": {
    "nano-banana-pro": {
      "command": "node",
      "args": ["/absolute/path/to/nano-banana-mcp/build/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

3. Restart Claude Desktop

The server should appear in the MCP tools menu (hammer icon).

Usage examples

Once connected, just ask Claude naturally:

  • "Generate an image of a Senegalese market at sunset"
  • "Create a 16:9 hero banner for a blog about climate resilience"
  • "Edit ~/nano-banana-output/gen_20260714_a1b2.png — remove the background and add a gradient"

Models

The server supports two Gemini image models:

Model ID Quality Speed Cost
Nano Banana Pro gemini-3-pro-image-preview Highest Slower ~$0.09/image
Nano Banana gemini-2.5-flash-image Good Fast ~$0.04/image

By default, generate_image uses Pro. Pass use_pro: false to switch to the faster Flash model.

Security notes

  • Your API key stays local — it's passed via environment variable, never logged or transmitted elsewhere.
  • The server only makes HTTPS calls to generativelanguage.googleapis.com (Google's Gemini API).
  • No telemetry, no analytics, no third-party calls.
  • All code is in src/index.ts — read it before you run it.

Project structure

nano-banana-mcp/
├── src/
│   └── index.ts      ← the entire server (~150 lines)
├── package.json
├── tsconfig.json
└── README.md

License

MIT — do whatever you want with it.

Optional: Firebase Storage (cross-environment image transfer)

By default, generated images are saved to ~/nano-banana-output/ on the machine running the MCP server. If you want images to be usable in another environment (e.g. embedding in a document built by Claude's sandbox) without manually attaching files, configure Firebase Storage. The server will upload each image and return a time-limited signed URL that the other environment can download directly.

Point at your service-account JSON key file (recommended):

"env": {
  "GEMINI_API_KEY": "[API_KEY]",
  "SERVICE_ACCOUNT_KEY_PATH": "/absolute/path/to/firebase-service-account.json",
  "FIREBASE_STORAGE_BUCKET": "your-project.appspot.com"
}

Download the JSON key from Firebase Console → Project Settings → Service Accounts → Generate new private key, save it somewhere on your machine, and point SERVICE_ACCOUNT_KEY_PATH at it.

Alternatively, supply the individual fields instead of a key file (FIREBASE_PROJECT_ID, FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY, plus FIREBASE_STORAGE_BUCKET).

Optional: FIREBASE_SIGNED_URL_MINUTES (default 60) controls how long the download URL stays valid.

Notes:

  • The service-account credentials stay in the MCP server process only — they are never sent to Claude or its sandbox. The sandbox only ever sees a plain signed URL.
  • Get the service-account values from Firebase Console → Project Settings → Service Accounts → Generate new private key.
  • If any of the four vars is missing, uploads stay disabled and the server falls back to saving locally.
  • For the download to work, the environment fetching the URL must have outbound network access to storage.googleapis.com.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选