About Nano Banana
Nano Banana is an MCP server for generating and editing images with Google Gemini. It is for users who want image tools in MCP clients, with support for multi-image references and configurable output resolution.
Key features
- 01Generate images from text
- 02Edit images with AI
- 03Compose from multiple references
- 04Set output image resolution
- 05Save results to workspace
Use cases
- 01Create images from descriptions
- 02Combine multiple reference images
- 03Modify existing images
MCP support
It exposes image generation, editing, and API-key configuration tools to MCP clients. Image requests are handled through Google Gemini.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @mindstone/mcp-server-nano-bananaGEMINI_API_KEYSecretGoogle Gemini API keyMCP_WORKSPACE_PATHWorkspace directory for saving generated imagesNANO_BANANA_GEMINI_TIMEOUT_MSOutbound Gemini request timeout in millisecondsNANO_BANANA_BRIDGE_TIMEOUT_MSHost-bridge request timeout in millisecondsLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
3Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Gemini API key from https://aistudio.google.com/api-keys |
Details
From the project README@mindstone/mcp-server-nano-banana
Nano Banana MCP server — Google Gemini image generation and editing via Model Context Protocol. Generate images from text descriptions and edit existing images using Google Gemini's AI capabilities.
Status
- Version: 0.4.1 · npm
- Auth: API key (
GEMINI_API_KEY) - Tools: 3 (image-generation, image-editing)
- Surface: cloud-api
- Machine-readable:
STATUS.json
Requirements
- Node.js 20+
- npm
One-click install
After clicking the button, your host will prompt you to fill: GEMINI_API_KEY, NANO_BANANA_GEMINI_TIMEOUT_MS, NANO_BANANA_BRIDGE_TIMEOUT_MS.
Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Nano Banana)
{
"mcpServers": {
"Nano Banana": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-nano-banana"
],
"env": {
"GEMINI_API_KEY": "",
"NANO_BANANA_GEMINI_TIMEOUT_MS": "180000",
"NANO_BANANA_BRIDGE_TIMEOUT_MS": "30000"
}
}
}
}
Quick Start
Install & build
cd <path-to-repo>/connectors/nano-banana
npm install
npm run build
npx (once published)
npx -y @mindstone/mcp-server-nano-banana
Local
node dist/index.js
Configuration
Environment variables
GEMINI_API_KEY— Google Gemini API keyMCP_WORKSPACE_PATH— optional workspace path for saving generated imagesMCP_HOST_BRIDGE_STATE— optional path to a host bridge state file used for credential managementMINDSTONE_REBEL_BRIDGE_STATE— backwards-compatible alias forMCP_HOST_BRIDGE_STATENANO_BANANA_GEMINI_TIMEOUT_MS— optional override (positive integer ms) for the outbound Gemini request timeout. Default:180000(3 min). Increase this if you usegemini-3-pro-image-previewand seeTIMEOUTerrors on slow generations; decrease it if you want tighter bounds.NANO_BANANA_BRIDGE_TIMEOUT_MS— optional override (positive integer ms) for requests to the host bridge. Default:30000.
Host configuration examples
Claude Desktop / Cursor
{
"mcpServers": {
"NanoBanana": {
"command": "npx",
"args": ["-y", "@mindstone/mcp-server-nano-banana"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
}
}
}
}
Local development (no npm publish needed)
{
"mcpServers": {
"NanoBanana": {
"command": "node",
"args": ["<path-to-repo>/connectors/nano-banana/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
}
}
}
}
Tools (3)
Configuration
configure_nano_banana_api_key— Save your Gemini API key for image generation
Image generation
nano_banana_generate— Generate images from text descriptionsnano_banana_edit— Edit existing images using AI; accepts up to 14 reference images (source_image_paths) for multi-image composition/fusion. Each source may be a workspace file path or anhttps://URL — every source is capped at 20MB per image (local files included) with a combined-size cap across sources, and remote fetches are SSRF-guarded (HTTPS only, no userinfo, private/loopback/link-local hosts refused with DNS re-validation, redirects re-validated per hop, PNG/JPEG/WebP only)
Both image tools accept an optional save_path inside the workspace. Saves never overwrite: if a file (or symlink) already exists at save_path, the tool returns a SAVE_EXISTS error (with the image still included inline) — choose a different path or delete the existing file. Saved files are written owner-only (0600).
Generated and edited output is identified from its bytes before it is returned or saved. PNG, JPEG, and WebP are supported; other or unrecognised formats (including GIF) return a structured UNSUPPORTED_IMAGE_FORMAT error instead of being relabelled.
Output resolution
Both image tools accept an optional image_size parameter ("1K", "2K", or "4K"; default "1K" ≈ 1024px). Higher resolutions are only honoured by the Gemini 3 image models (gemini-3.1-flash-image-preview, gemini-3-pro-image-preview); the legacy gemini-2.5-flash-image always produces ~1K output and rejects an explicit image_size.
Licence
FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.