Skip to main content
Glama
NH-5

Nano Banana MCP Server

by NH-5

Nano Banana MCP Server

MCP服务器,用于通过Google AI Studio API调用Gemini Nano Banana Pro (gemini-3-pro-image-preview) 图像生成模型。

版本: 1.0.0

功能

  • 调用Google Gemini Nano Banana模型生成图像

  • 支持通过MCP协议在opencode等客户端中使用

  • 生成图片会保存到本地文件

安装

npm install npm run build

配置

  1. 复制 .env.example.env

cp .env.example .env
  1. .env 中设置你的Google API Key:

GOOGLE_API_KEY=your_api_key_here

环境变量

变量

说明

默认值

GOOGLE_API_KEY

Google AI Studio API密钥

(必填)

HTTPS_PROXY

HTTPS代理地址

系统代理

运行

npm start

在opencode中使用

在opencode的mcp配置中添加:

{ "mcp": { "nanobanana": { "type": "local", "command": ["node", "/path/to/nanobanana-mcp-server/dist/index.js"], "env": { "GOOGLE_API_KEY": "your_api_key" }, "enabled": true } } }

工具

generate_image

生成图像

参数:

  • prompt (required): 图像描述文本

  • output_dir: 图片保存目录 (默认当前目录)

示例:

用nano banana画一只可爱的猫咪
Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NH-5/nanobanana-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server