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等客户端中使用

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

Related MCP server: gemini-image-mcp

安装

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画一只可爱的猫咪

Available Tools

1 tool
generate_imageC

Generate images using Google Gemini Nano Banana Pro (gemini-3-pro-image-preview) model

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the image to generate
output_dirNoDirectory to save the generated image(s).

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the model but fails to describe key traits like rate limits, authentication needs, output format (e.g., image type), or whether the operation is idempotent. This leaves significant gaps for a generative AI tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core function and includes necessary model specification, making it appropriately concise for this tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of an image generation tool with no annotations and no output schema, the description is inadequate. It lacks details on behavioral traits, usage context, and output handling, leaving the agent with insufficient information to invoke it effectively beyond basic parameter passing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional parameter semantics beyond what's in the schema, such as prompt formatting tips or output_dir constraints. Baseline 3 is appropriate when the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Generate') and resource ('images'), specifying the model used ('Google Gemini Nano Banana Pro'). However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, though it's not required in this context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It simply states what the tool does without indicating appropriate scenarios or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedgenerate_image

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'generate_image' has a clearly distinct purpose that cannot be confused with any other tool in this set.

Naming Consistency5/5

The single tool name 'generate_image' follows a clear verb_noun pattern. With only one tool, there is perfect consistency as there are no other tools to compare against or create naming conflicts with.

Tool Count2/5

A single tool for an image generation server feels thin and under-scoped. While it might cover the core functionality, typical MCP servers for such domains would include additional tools like list_models, get_image_details, or variations of generation parameters. The count of 1 suggests limited capability for agents to perform related operations.

Completeness2/5

The tool surface is severely incomplete for an image generation domain. There is only a generation tool with no supporting operations like model listing, configuration management, image retrieval, or editing capabilities. This creates significant gaps that will likely cause agent failures when trying to perform comprehensive image-related tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers