loading…
Search for a command to run...
loading…
Enables image generation using Gemini native models, supporting both single prompts and batch processing via a file-based queue. It allows for detailed configur
Enables image generation using Gemini native models, supporting both single prompts and batch processing via a file-based queue. It allows for detailed configuration of aspect ratios and models using YAML frontmatter across various MCP-enabled clients.
MCP server for Gemini native image generation (Nano Banana). Part of the KeepOnFirst Agentic Workflow.
English | 繁體中文
Note: The Gemini API Free Tier does NOT support image generation models. To use this MCP server, you must provide an API key from a Google Cloud project with billing enabled.
If this project helps you, you can support development here:
If you have published this package or use it locally:
{
"mcpServers": {
"nanobanana": {
"command": "npx",
"args": ["-y", "@keeponfirst/kof-nanobanana-mcp"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}
cd kof-nanobanana-mcp
npm install
npm run build
Then configure absolute path in your MCP config (see Configuration section).
Add to your MCP configuration file (e.g., ~/.gemini/antigravity/mcp_config.json):
{
"servers": {
"nanobanana": {
"command": "node",
"args": ["/path/to/kof-nanobanana-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}
nanobanana_generate_imageGenerate a single image.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
prompt |
string | ✅ | Image description (10-5000 chars) |
output_path |
string | ✅ | Path to save the image |
model |
string | ❌ | gemini-2.5-flash-image (default) or gemini-3-pro-image-preview |
aspect_ratio |
string | ❌ | 1:1, 16:9, 9:16, 4:3, 3:4 |
overwrite |
boolean | ❌ | Overwrite existing file (default: false) |
Example:
{
"prompt": "A modern flat illustration of three AI robots working together on code",
"output_path": "assets/generated/workflow-hero.png",
"model": "gemini-2.5-flash-image",
"aspect_ratio": "16:9"
}
nanobanana_list_queueList and validate prompt files in the queue.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
queue_dir |
string | ❌ | Queue directory (default: nanobanana/queue) |
validate |
boolean | ❌ | Validate files (default: true) |
check_conflicts |
boolean | ❌ | Check if outputs exist (default: true) |
nanobanana_process_queueBatch process all prompt files.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
queue_dir |
string | ❌ | Queue directory (default: nanobanana/queue) |
validate_only |
boolean | ❌ | Only validate, no generation |
dry_run |
boolean | ❌ | Preview without API calls |
overwrite |
string | ❌ | skip, overwrite, or rename |
Create .md files in nanobanana/queue/ with YAML frontmatter:
---
output_path: assets/generated/workflow-hero.png
model: gemini-2.5-flash-image
aspect_ratio: 16:9
overwrite: false
---
# Workflow Hero Image
Create a modern, sleek hero illustration showing three AI agents
working together in a software development workflow.
## Style Guidelines
- Style: Flat illustration with gradients
- Color palette: Deep purple (#6B46C1) to blue (#3B82F6)
- Background: Subtle gradient
| Model | Price per Image |
|---|---|
| Gemini 2.5 Flash Image | ~$0.039 (1024x1024) |
| Gemini 3 Pro Image (2K) | ~$0.134 |
| Gemini 3 Pro Image (4K) | ~$0.24 |
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"kof-nano-banana-mcp-server": {
"command": "npx",
"args": []
}
}
}