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 ServerGenerate 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 MCP
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"| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Image generation prompt describing the desired image | |
| output_path | Yes | Relative or absolute path to save the generated image (e.g., 'assets/generated/hero.png') | |
| model | No | Gemini model to use. Flash for speed, Pro for quality | gemini-2.5-flash-image |
| aspect_ratio | No | Aspect ratio of the generated image | |
| overwrite | No | If true, overwrite existing file. If false, skip if file exists |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint=false, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable context beyond annotations: it explains cost implications of different models, supported aspect ratios, and the file-saving behavior with overwrite option. This enhances understanding of the tool's operational characteristics.
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 efficiently structured with clear sections (overview, models, aspect ratios, example) and every sentence adds value. The example is particularly helpful for understanding usage without being verbose. The information is well-organized and front-loaded.
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 5 parameters and no output schema, the description provides good context about models, costs, aspect ratios, and file handling. However, it doesn't explain what the tool returns (e.g., success confirmation, error handling) or provide guidance on prompt engineering best practices.
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?
With 100% schema description coverage, the schema already documents all 5 parameters thoroughly. The description adds minimal additional semantic context through the example showing typical usage patterns, but doesn't provide significant new information beyond what's in the schema descriptions.
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 specific action ('Generate an image'), resource ('using Gemini's native image generation'), and distinguishes from siblings by focusing on image creation rather than queue management. It provides a concrete example that reinforces the purpose.
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 implies usage through the example and model descriptions, suggesting when to choose different models based on speed vs. quality. However, it doesn't explicitly state when to use this tool versus the queue-related siblings or provide clear exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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: true| Name | Required | Description | Default |
|---|---|---|---|
| queue_dir | No | Directory to scan for prompt files | nanobanana/queue |
| validate | No | If true, validate each prompt file and report errors | |
| check_conflicts | No | If true, check if output files already exist |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds valuable behavioral context beyond annotations: it specifies the tool scans for markdown files, validates them, checks for output file conflicts, and provides previews. However, it doesn't mention rate limits or authentication needs.
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 well-structured and front-loaded: the first sentence states the core purpose, followed by bullet points detailing outputs, and ends with usage guidance and an example. Every sentence earns its place without redundancy.
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 tool's moderate complexity, rich annotations, and 100% schema coverage, the description is mostly complete. It lacks an output schema, but the description outlines what the tool provides (validation status, conflict detection, preview). A minor gap is no explicit mention of error handling or output format details.
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%, with clear descriptions for all three parameters (queue_dir, validate, check_conflicts). The description adds minimal value beyond the schema, only implying parameter usage through the example. Baseline 3 is appropriate since the schema does the heavy lifting.
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 purpose with specific verbs ('list and validate prompt files') and resources ('queue directory'), distinguishing it from siblings like 'nanobanana_generate_image' (which creates images) and 'nanobanana_process_queue' (which processes the queue). It explicitly mentions scanning markdown prompt files, validation, conflict detection, and content preview.
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 explicit guidance on when to use this tool: 'Use this to review what will be generated before running process_queue.' This clearly distinguishes it from the sibling 'nanobanana_process_queue' and indicates it's for pre-processing inspection rather than execution.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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"| Name | Required | Description | Default |
|---|---|---|---|
| queue_dir | No | Directory containing prompt markdown files | nanobanana/queue |
| output_dir | No | Default directory to save generated images (used if prompt has relative path) | assets/generated |
| completed_dir | No | Directory to move processed prompts to | nanobanana/completed |
| model | No | Gemini model to use for all generations (overrides prompt settings) | gemini-2.5-flash-image |
| validate_only | No | If true, only validate prompt files without generating images | |
| dry_run | No | If true, show what would be generated without actually calling API | |
| overwrite | No | Strategy when output file exists: skip, overwrite, or rename with suffix | skip |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds valuable behavioral context beyond annotations: it explains file movement ('prompt files are moved to completed_dir with timestamp'), operational modes, and overwrite strategies. Annotations cover basic hints (e.g., not read-only, not destructive), but the description enriches this with practical details like no API calls in certain modes. No contradictions with annotations exist.
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 well-structured and front-loaded with the core purpose, followed by organized sections for modes, overwrite strategies, and an example. Every sentence adds value, with no wasted words, making it efficient and easy to scan.
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 tool's complexity (batch processing with multiple modes and file operations) and lack of an output schema, the description does a good job covering behavior, parameters, and usage. However, it could improve by mentioning error handling or output format details, which would be needed for full completeness in this context.
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?
With 100% schema description coverage, the input schema already documents all parameters thoroughly. The description adds minimal extra semantics, such as clarifying that 'output_dir' is used 'if prompt has relative path' and providing an example with parameter values. This meets the baseline for high schema coverage but doesn't significantly enhance understanding beyond the schema.
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 purpose: 'Process all prompt files in the queue directory and generate images.' This specifies the verb ('process'), resource ('prompt files'), and outcome ('generate images'), distinguishing it from sibling tools like 'nanobanana_generate_image' (single generation) and 'nanobanana_list_queue' (listing only).
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 clear context for when to use the tool by detailing three operational modes (validate_only, dry_run, full generation) and overwrite strategies. However, it does not explicitly state when to use this batch processing tool versus the sibling 'nanobanana_generate_image' for single generations, which would be needed for a perfect score.
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.
3 tool updates
v1.0.0- First observed
nanobanana_generate_image - First observed
nanobanana_list_queue - First observed
nanobanana_process_queue
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.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Generate images with any major model β one API key, one prepaid balance, one MCP.
Related MCP Servers
- FlicenseBqualityDmaintenanceGenerates high-quality images using Google's Imagen 3.0 model via the Gemini API with support for up to four images per request. It provides automated file management and creates HTML previews for seamless image viewing within MCP-compatible hosts.24-
- FlicenseBqualityDmaintenanceEnables 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.5-
- AlicenseAqualityCmaintenanceEnables AI image generation, editing, and upscaling via Google Gemini and Imagen models, supporting dynamic model switching and multiple MCP-compatible clients.12MIT
- AlicenseAqualityDmaintenanceEnables AI image generation via multiple providers (Yunwu, Gemini) with customizable aspect ratios, resolutions, and output settings, seamlessly integrating with MCP-compatible clients.14 npmMIT