Nanobanana Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Nanobanana Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
AI 图像生成工具,使用 OpenAI 兼容协议,支持任何兼容的图像生成服务。
| 版本 | 适用场景 | 目录 |
|---|---|---|
| MCP Server | Claude Desktop / Claude Code | src/ |
| Clawdbot Plugin | Clawdbot AI 助手 | clawdbot-plugin/ |
用于 Claude Desktop 和 Claude Code。
npx nanobanana-mcpgit clone https://github.com/superboolgithub/nanobanana-mcp.git
cd nanobanana-mcp
npm install
npm run build| 变量名 | 必填 | 说明 | 默认值 |
|---|---|---|---|
NANOBANANA_API_KEY | ✅ | API 密钥 | - |
NANOBANANA_BASE_URL | ✅ | API 基础 URL | - |
NANOBANANA_OUTPUT_DIR | ✅ | 图片输出目录 | - |
NANOBANANA_DEFAULT_ASPECT_RATIO | ❌ | 默认宽高比 | 1:1 |
NANOBANANA_DEFAULT_IMAGE_SIZE | ❌ | 默认图片尺寸 | 1K |
NANOBANANA_DEFAULT_MODEL | ❌ | 默认模型 | google/gemini-2.5-flash-image-preview |
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"nanobanana": {
"command": "npx",
"args": ["-y", "nanobanana-mcp"],
"env": {
"NANOBANANA_API_KEY": "your-api-key",
"NANOBANANA_BASE_URL": "https://openrouter.ai/api",
"NANOBANANA_OUTPUT_DIR": "/path/to/output"
}
}
}
}在 ~/.claude.json 中添加:
{
"mcpServers": {
"nanobanana": {
"type": "stdio",
"command": "npx",
"args": ["-y", "nanobanana-mcp"],
"env": {
"NANOBANANA_API_KEY": "your-api-key",
"NANOBANANA_BASE_URL": "https://openrouter.ai/api",
"NANOBANANA_OUTPUT_DIR": "/path/to/output"
}
}
}
}用于 Clawdbot AI 助手。
cp -r clawdbot-plugin ~/.clawdbot/extensions/nanobanana在 ~/.clawdbot/clawdbot.json 中添加:
{
"plugins": {
"entries": {
"nanobanana": {
"enabled": true,
"config": {
"apiKey": "your-api-key",
"baseUrl": "https://openrouter.ai/api",
"outputDir": "/tmp/nanobanana",
"defaultAspectRatio": "1:1",
"defaultImageSize": "1K",
"defaultModel": "google/gemini-2.5-flash-image-preview"
}
}
}
}
}| 配置项 | 必填 | 说明 | 默认值 |
|---|---|---|---|
apiKey | ✅ | API 密钥 | - |
baseUrl | ✅ | API 基础 URL | - |
outputDir | ❌ | 图片输出目录 | /tmp/nanobanana |
defaultAspectRatio | ❌ | 默认宽高比 | 1:1 |
defaultImageSize | ❌ | 默认图片尺寸 | 1K |
defaultModel | ❌ | 默认模型 | google/gemini-2.5-flash-image-preview |
根据文本描述生成图片。
参数:
prompt (必填) - 图片描述,最大 5000 字符aspectRatio - 宽高比imageSize - 图片尺寸model - 模型名称基于参考图片生成新图片。
参数:
prompt (必填) - 图片描述referenceImageUrl (必填) - 参考图片 URLaspectRatio - 宽高比imageSize - 图片尺寸model - 模型名称| 值 | 分辨率 | 说明 |
|---|---|---|
1:1 | 1024×1024 | 方形(默认) |
16:9 | 1344×768 | 横版宽屏 |
9:16 | 768×1344 | 竖版 |
4:3 | 1184×864 | 横版 |
3:4 | 864×1184 | 竖版 |
2:3 | 832×1248 | 竖版 |
3:2 | 1248×832 | 横版 |
4:5 | 896×1152 | 竖版 |
5:4 | 1152×896 | 横版 |
21:9 | 1536×672 | 超宽屏 |
| 值 | 说明 |
|---|---|
1K | 标准分辨率(默认) |
2K | 高分辨率 |
4K | 最高分辨率 |
google/gemini-2.5-flash-image-preview - 快速生成google/gemini-3-pro-image-preview - 高质量gemini-2.5-flash-image - Gemini Flashblack-forest-labs/flux.2-pro - Flux Pro使用 OpenAI Chat Completions API 格式:
POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer <api-key>
{
"model": "gemini-2.5-flash-image",
"messages": [
{ "role": "user", "content": "Generate a beautiful sunset" }
],
"modalities": ["image", "text"],
"image_config": {
"aspect_ratio": "16:9",
"image_size": "2K"
}
}支持两种响应格式:
格式 1:OpenRouter 风格
{
"choices": [{
"message": {
"content": "Here's your image",
"images": [{
"image_url": { "url": "data:image/png;base64,..." }
}]
}
}]
}格式 2:Markdown 内嵌
{
"choices": [{
"message": {
"content": ""
}
}]
}任何使用 OpenAI Chat Completions API 格式的图像生成服务:
"生成一张可爱的猫咪图片"
"生成一张 4K 横版的日落海滩风景"
"基于这张图片,生成一个卡通风格的版本"# 安装依赖
npm install
# 开发模式
npm run dev
# 构建
npm run build
# 运行
npm startMIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.