KOF Nano Banana MCP Server
Enables high-quality image generation using Google's Gemini models, specifically Gemini 2.5 Flash Image and Gemini 3 Pro Image.
Utilizes Google Cloud for API project management and billing, which is required to access Gemini's paid image generation services.
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., "@KOF Nano Banana MCP Server Generate a flat illustration of robots at 16:9 saved to assets/robots.png"
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.
KOF Nano Banana MCP Server π
MCP server for Gemini native image generation (Nano Banana). Part of the KeepOnFirst Agentic Workflow.
English | ηΉι«δΈζ
β οΈ Important: Billing Required
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.
Related MCP server: Gemini Image Gen MCP Server
Features
Generate images using Gemini 2.5 Flash Image or Gemini 3 Pro Image
Process queue of prompt files with validation and dry-run support
YAML frontmatter support for prompt configuration
Cross-IDE compatible - works with any MCP-enabled client
β Support this project
If this project helps you, you can support development here:
Installation
Option 1: Use via npx (Recommended)
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"
}
}
}
}Option 2: Local Development
cd kof-nanobanana-mcp
npm install
npm run buildThen configure absolute path in your MCP config (see Configuration section).
Configuration
1. Get a Gemini API Key
Go to Google AI Studio
Create an API key
IMPORTANT: Ensure your project has billing enabled. These models are paid-only.
2. Add to MCP Config
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"
}
}
}
}Tools
nanobanana_generate_image
Generate a single image.
Parameters:
Name | Type | Required | Description |
| string | β | Image description (10-5000 chars) |
| string | β | Path to save the image |
| string | β |
|
| string | β |
|
| 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_queue
List and validate prompt files in the queue.
Parameters:
Name | Type | Required | Description |
| string | β | Queue directory (default: |
| boolean | β | Validate files (default: true) |
| boolean | β | Check if outputs exist (default: true) |
nanobanana_process_queue
Batch process all prompt files.
Parameters:
Name | Type | Required | Description |
| string | β | Queue directory (default: |
| boolean | β | Only validate, no generation |
| boolean | β | Preview without API calls |
| string | β |
|
Prompt File Format
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 gradientPricing Reference
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 |
License
MIT
Available Tools
3 toolsnanobanana_generate_imageGenerate Image with Nano BananaAIdempotent
Generate an image using Gemini's native image generation (Nano Banana).
This tool calls the Gemini API to generate an image based on your text prompt and saves it to the specified path.
Models:
gemini-2.5-flash-image: Fast, efficient (~$0.039/image)
gemini-3-pro-image-preview: Higher quality, supports 4K (~$0.134-0.24/image)
Supported Aspect Ratios: 1:1, 16:9, 9:16, 4:3, 3:4
Example:
prompt: "A modern flat illustration of a workflow diagram with three connected nodes, purple and blue gradient colors, minimal style"
output_path: "assets/generated/workflow-hero.png"
model: "gemini-2.5-flash-image"
aspect_ratio: "16:9"Inputs: prompt (required), output_path (required), model, aspect_ratio, +1 more.
nanobanana_list_queueList Nano Banana QueueARead-onlyIdempotent
List and validate prompt files in the queue directory.
This tool scans the queue directory for markdown prompt files and provides:
Validation status for each file
Conflict detection (output file already exists)
Preview of prompt content
Use this to review what will be generated before running process_queue.
Example:
queue_dir: "nanobanana/queue"
validate: true
check_conflicts: trueInputs: queue_dir, validate, check_conflicts.
nanobanana_process_queueProcess Nano Banana QueueA
Process all prompt files in the queue directory and generate images.
Modes:
validate_only=true: Only validate prompts, no API callsdry_run=true: Show what would be generated, no API callsBoth false: Actually generate images
Overwrite Strategies:
skip: Skip if output file exists (default)overwrite: Replace existing filesrename: Generate with suffix (e.g., hero_1.png)
After successful generation, prompt files are moved to completed_dir with timestamp.
Example:
queue_dir: "nanobanana/queue"
dry_run: true
overwrite: "skip"Inputs: queue_dir, output_dir, completed_dir, model, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: generate_image creates individual images, list_queue inspects pending files, and process_queue batch processes the queue. The descriptions reinforce these separate functions, making misselection unlikely.
All tools follow a perfect verb_noun pattern with the 'nanobanana_' prefix: generate_image, list_queue, process_queue. This consistent naming convention makes the tool set predictable and easy to understand.
Three tools is ideal for this server's focused scope of image generation queue management. Each tool earns its place by covering distinct aspects of the workflow: single generation, queue inspection, and batch processing.
The tool set covers the core image generation workflow well with generation, inspection, and processing capabilities. A minor gap exists in not providing tools for managing completed images or modifying queue entries, but agents can work around this with file system operations.
Related MCP Connectors
Generate AI images and videos from any compatible MCP client.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Generate images and videos with Seedance, Veo, Wan, Grok, GPT-Image and Nano Banana via one MCP.
Generate images, video, audio and short films with 140+ AI models from any MCP client.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables image generation and multi-turn editing sessions using the Gemini API within MCP-compatible environments. Users can create, modify, and configure images through natural language commands, supporting features like aspect ratio adjustments and session-based image transformations.5ISC
- AlicenseAqualityDmaintenanceEnables AI image generation, editing, and upscaling via Google Gemini and Imagen models, supporting dynamic model switching and multiple MCP-compatible clients.12MIT
- AlicenseAqualityBmaintenanceEnables text-to-image generation and image editing or composition with Google's Gemini image models via MCP tools, prompts, and resources. Supports automatic model selection, aspect ratio and resolution control, curated prompt templates, and three credential modes (Gemini API key, Vertex AI Express Mode, or ADC).6369 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables assistants in any MCP client to generate new images or edit existing ones, automatically enriching short requests with composition, lighting, and camera details before sending them to Gemini, OpenAI, or BytePlus Seedream. Supports quality presets, aspect ratios, image sizes, character consistency, blended inputs, and Google Search grounding for current information.1,781 npmMIT