gemini-nano-banana-mcp
Generates images using Google's Gemini "Nano Banana" image models (e.g., gemini-2.5-flash-image) via the Gemini API, with customizable prompt, aspect ratio, and output file naming.
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., "@gemini-nano-banana-mcpGenerate an image of a serene mountain lake at sunset."
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.
gemini-nano-banana-mcp
Minimal MCP server that generates images through Google's Gemini "Nano Banana"
image models (gemini-2.5-flash-image by default), using your own free
Google AI Studio API key.
No third-party service, no paid credits — requests go straight to Google's Gemini API.
Setup
npm install
npm run buildGet a free API key at https://aistudio.google.com/apikey.
Related MCP server: Nano Banana MCP Server
Register with Claude Code
claude mcp add gemini-image --scope user -e GEMINI_API_KEY=your-key-here -- node /absolute/path/to/gemini-nano-banana-mcp/dist/index.jsTool
generate_image
Argument | Required | Description |
| yes | Text description of the image to generate |
| no | Gemini image model id (default: |
| no | e.g. |
| no | Output file name (default: a timestamp) |
Generated images are saved to OUTPUT_DIR (default: ./output) and the
tool returns the saved file path.
Environment variables
Variable | Required | Default |
| yes | — |
| no |
|
License
MIT
Available Tools
1 toolgenerate_imageGenerate imageA
Generate an image from a text prompt using Google's Gemini image models (Nano Banana). Saves the result as a local file and returns its path.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini image model id. Defaults to "gemini-2.5-flash-image". | |
| prompt | Yes | Text description of the image to generate | |
| file_name | No | Optional output file name. Defaults to a timestamp. | |
| aspect_ratio | No | Optional aspect ratio, e.g. "1:1", "16:9", "9:16". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It explicitly discloses the key side effect of saving the result as a local file and returning its path, which is essential for an agent to understand the tool's behavior. It does not mention potential errors or network dependencies, but the core behavioral trait is transparent.
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 a single, well-structured sentence that front-loads the primary action, includes the model context, and states the output. Every clause earns its place with no unnecessary fluff.
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 there is no output schema, the description covers the return value (the file path). It explains the core purpose and the side effect of file creation. The tool's complexity is low, with only one required parameter, and the description provides enough context for an agent to invoke it correctly. Minor gaps like error conditions are not critical.
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?
All four parameters are fully documented in the schema (100% coverage), so the description does not add significant parameter-level clarification beyond what the schema already provides. The mention of 'text prompt' and 'local file' loosely relates to prompt and file_name, but it does not add new meaning to individual parameters. Baseline of 3 is appropriate.
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 uses a specific verb ('Generate') and resource ('an image'), clearly states the model family (Gemini image models) and the output behavior (saves to a local file, returns its path). This is unambiguous and distinguishes the tool from any potential image-related sibling, though none exist.
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?
There are no sibling tools to differentiate against, but the description clearly implies the usage scenario: converting a text prompt into an image. It does not explicitly state when not to use it or list alternatives, but given the absence of siblings and the self-explanatory nature, it provides clear context without exclusions.
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.
1 tool update
v0.1.0- First observed
generate_image
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion or overlap.
The tool name 'generate_image' follows a clear verb_noun pattern and is descriptive.
With only one tool, the server feels minimal, but it is focused on image generation so it is borderline acceptable.
The server covers the core image generation task, but lacks additional capabilities like editing or variations that might be expected in a full-featured image tool.
Maintenance
Related MCP Connectors
Generate images, video & speech with Nano Banana, Veo, Omni and Gemini TTS. Pay as you go.
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI assistants to generate images from text prompts and transform existing images using Google Gemini's nano banana model through the Nanana AI service. Supports both text-to-image generation and image-to-image transformation capabilities.2145 npm10MIT
- FlicenseAqualityDmaintenanceEnables AI image generation, editing, and composition using Google's Gemini image models (Nano Banana Pro and Nano Banana). Supports text-to-image generation, multi-image composition, flexible aspect ratios, high-resolution output up to 4K, and real-time information grounding.4-
- AlicenseNot gradedqualityBmaintenanceGenerates images from text prompts using Google's Gemini AI models with customizable aspect ratios and resolutions up to 4K, automatically saving images locally.22 npm2MIT
- AlicenseAqualityCmaintenanceEnables 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.35 npmMIT