Nano Banana Pro MCP
Click on "Install 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., "@Nano Banana Pro MCPGenerate an image of a Senegalese market 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.
Nano Banana Pro MCP Server
A minimal, auditable MCP server that gives Claude Desktop the ability to generate and edit images using Google's Gemini image models (Nano Banana / Nano Banana Pro).
All logic lives in src/index.ts. No hidden dependencies — read it before you run it.
What it does
Tool | Description |
| Switch between Gemini image models at runtime |
| Set source resolution ( |
| Set how long download URLs stay valid (default 30 min) |
| Generate an image from a text prompt |
| Generate several images from a list of prompts |
| Edit an image (fetched from a URL) with instructions |
Images are never written to local disk. generate_image and edit_image return an inline
preview (an MCP Apps HTML widget with the image embedded, rendered in the chat) plus, when
Firebase Storage is configured, a time-limited signed download URL. generate_image_batch
returns URLs only (no previews). Another environment (e.g. Claude's sandbox) fetches a URL to
embed the image in a document.
Inline preview rendering depends on the client supporting MCP Apps; if it doesn't render, the image is still available via the signed URL. Images are compressed only if they exceed the size threshold (500KB by default); smaller images are kept as-is.
Related MCP server: Banana Image MCP
Prerequisites
Node.js 18+ — check with
node --versionGemini API key — from Google AI Studio. Enable billing for image generation (pay-per-image).
(Optional) Firebase Storage — only needed if you want generated images usable outside the chat (see below).
Setup
1. Build
npm install
npm run build2. Configure Claude Desktop
Open the config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"nano-banana-pro": {
"command": "node",
"args": ["/absolute/path/to/nano-banana-mcp/build/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}3. Fully quit and reopen Claude Desktop
Use Cmd+Q (not just closing the window) — the config is only read at launch.
Usage
"Generate an image of a Senegalese market at sunset"
"Create a 16:9 hero banner for a blog about climate resilience"
"Switch to nano-banana-pro and generate a 2K product shot"
Models
Friendly name | Model ID | Notes |
|
| Fast, good quality |
|
| Highest quality, slower |
|
| Original flash model |
Switch at runtime with the set_model tool (e.g. "use nano-banana-pro").
Optional: Firebase Storage (use images outside the chat)
Inline previews work without Firebase. Firebase is what makes an image usable outside the chat: each image is uploaded and a signed download URL is returned, which another environment (e.g. Claude's sandbox) can fetch to embed in a document.
Point at your service-account JSON key file (recommended):
"env": {
"GEMINI_API_KEY": "your-api-key-here",
"SERVICE_ACCOUNT_KEY_PATH": "/Users/you/keys/firebase-adminsdk.json",
"FIREBASE_STORAGE_BUCKET": "your-project.firebasestorage.app"
}Download the key from Firebase Console → Project Settings → Service Accounts → Generate new private key.
Copy the bucket name exactly from the Storage page (newer projects use
*.firebasestorage.app, older ones*.appspot.com).A leading
~in the key path is expanded automatically; a full absolute path also works.Alternatively supply
FIREBASE_PROJECT_ID,FIREBASE_CLIENT_EMAIL, andFIREBASE_PRIVATE_KEYinstead of a key file.Optional:
FIREBASE_SIGNED_URL_MINUTES(default 30) sets the default download-URL lifetime. Change it at runtime with theset_url_lifetimetool (accepts 1–10080 minutes, i.e. up to 7 days).Optional:
FIREBASE_OBJECT_TTL_DAYS(default 1) — uploaded images auto-delete after this many days via a bucket lifecycle rule (see below).For the download to work, the environment fetching the URL needs outbound access to
storage.googleapis.com.
Auto-deletion of stored images
Images are deleted from the bucket automatically after FIREBASE_OBJECT_TTL_DAYS days (default 1) so nothing accumulates indefinitely. The server tries to apply this as a bucket lifecycle rule at startup. If the service account lacks permission to update bucket metadata, apply it once manually with the gcloud CLI:
cat > /tmp/lifecycle.json <<'JSON'
{ "rule": [ { "action": {"type": "Delete"}, "condition": {"age": 1} } ] }
JSON
gcloud storage buckets update gs://YOUR_BUCKET --lifecycle-file=/tmp/lifecycle.json(age is in days.) This runs on Google Cloud regardless of whether the MCP server is running.
Confidentiality notes (important for org rollout)
Generation sends prompts and receives images via Google's Gemini API; treat prompt content accordingly.
Download URLs are signed URLs — anyone with the link can open the image until it expires (default 30 min). Keep the lifetime short and avoid pasting URLs into shared/persistent places.
All images share one bucket under one service-account key; there is no per-user separation or audit trail. If your images may be sensitive, review this against your data-handling policy before org-wide use.
Storage rules
The server authenticates with the Admin SDK, which bypasses Storage rules, and hands out signed URLs that carry their own auth. So you can keep rules fully locked down:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} { allow read, write: if false; }
}
}Remote (HTTP) mode
Besides the default stdio mode above, the server can run as a Streamable HTTP MCP server
(node build/http.js) for central hosting (e.g. Cloud Run). Each MCP session gets its own
settings, so one user's set_model / set_resolution / set_url_lifetime doesn't affect
another's. Endpoints: /mcp (MCP, POST/GET/DELETE), /healthz (unauthenticated health check).
Environment variables (in addition to the ones above):
Variable | Description |
| Port to listen on (default |
| Public base URL of this server, advertised in OAuth protected-resource metadata (e.g. |
| Supabase project URL (e.g. |
| Set to |
# Local test run without auth (never expose this publicly):
GEMINI_API_KEY=... ALLOW_UNAUTHENTICATED=1 node build/http.jsKnobs
Set in the env block if needed:
NANO_BANANA_MAX_IMAGE— max stored file size in bytes; larger images are compressed down (default512000, i.e. 500KB). Images under the threshold are stored untouched in their original format.NANO_BANANA_INLINE_PREVIEW— whethergenerate_image/edit_imageinclude an inline image preview by default (trueby default; setfalseto return URL/text only, which makes responses smaller and faster). Each call can override this with aninline_previewargument.NANO_BANANA_TIMEOUT_MS— per-operation timeout in milliseconds for the Gemini call, Firebase upload, and edit-image fetch (default60000). A stuck call fails cleanly with a "timed out" error instead of hanging until the client aborts the turn.
Security notes
The Gemini key and Firebase credentials stay in the MCP server process — never sent to Claude or its sandbox (the sandbox only ever sees a plain signed URL).
Keep the service-account
.jsonout of any git repo or synced folder — it's a real credential.No telemetry, no analytics.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Desktop users to generate and edit high-quality images using Google's Gemini AI. Supports text-to-image generation, image transformations with text prompts, and automatic local saving with multilingual support.31MIT
- AlicenseAqualityCmaintenanceEnables Claude and other AI assistants to generate high-quality images up to 4K resolution using Google's Gemini image models, with support for flexible aspect ratios, natural language editing, and Google Search grounding for accurate results.412MIT
- Flicense-qualityDmaintenanceEnables image generation and prompt enhancement within Claude.ai by leveraging Google Gemini models. It allows users to create visual content in various styles like photorealistic and 3D render directly through natural language.
- Alicense-qualityDmaintenanceEnables Claude Code to generate, edit, blend, and create variations of images using BytePlus SeeDream AI models, with streaming and Firebase sync.MIT
Related MCP Connectors
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
LLM chat, text summarization and AI image generation
Generate AI images, video, speech, music and presentations from Claude, ChatGPT and Cursor.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IDinsight/nano-banana-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server