Nano Banana MCP Server
Enables integration with Google AI Studio services to utilize the Google AI Studio API for image generation tasks.
Allows for the generation of images from text prompts by interacting with the Gemini Nano Banana Pro model.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nano Banana MCP Servergenerate a cinematic image of a lone astronaut exploring a crystal cave"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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配置
复制
.env.example为.env:
cp .env.example .env在
.env中设置你的Google API Key:
GOOGLE_API_KEY=your_api_key_here环境变量
变量 | 说明 | 默认值 |
| Google AI Studio API密钥 | (必填) |
| 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 toolgenerate_imageC
Generate images using Google Gemini Nano Banana Pro (gemini-3-pro-image-preview) model
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the image to generate | |
| output_dir | No | Directory to save the generated image(s) | . |
TDQS
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.
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.
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.
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.
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.
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 tool update
v1.0.0- First observed
generate_image
TDQS
Scored across 1 tool
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.
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.
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.
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
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Qwen Image 3 AI image generation
Generate AI images and videos from any compatible MCP client.
MCP server for Flux AI image generation
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server for image generation using the Gemini API.1332MIT
- FlicenseAqualityDmaintenanceMCP server that generates images using Gemini models via an OpenAI-compatible gateway.19-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides image generation using Google's Nano Banana Gemini models, with additional tools for background removal, upscaling, and format conversion via deterministic post-processing.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Google's Nano Banana image generation models (Gemini). Generate and edit images via natural language.71MIT