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 "Install 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等客户端中使用
生成图片会保存到本地文件
安装
配置
复制
.env.example为.env:
在
.env中设置你的Google API Key:
环境变量
变量 | 说明 | 默认值 |
| Google AI Studio API密钥 | (必填) |
| HTTPS代理地址 | 系统代理 |
运行
在opencode中使用
在opencode的mcp配置中添加:
工具
generate_image
生成图像
参数:
prompt(required): 图像描述文本output_dir: 图片保存目录 (默认当前目录)
示例: