nb-mcp
Allows generating and editing images using Google's Gemini nano banana (Gemini 2.5 Flash Image) model, providing tools for text-to-image generation and image editing/restyling.
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., "@nb-mcpGenerate a 16:9 image of a cyberpunk street market"
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.
π nb-mcp β Nano Banana MCP
A remote MCP server that gives Claude the ability to generate and edit images with Google's nano banana (Gemini 2.5 Flash Image) model.
Deploy it once, add it as a custom connector, and then use nano banana directly inside Claude Design, claude.ai, Claude Desktop, and any other MCP client.
generate_imageβ turn a text prompt into an imageedit_imageβ edit, restyle, or combine existing images with a natural-language instruction
The server speaks the modern Streamable HTTP MCP transport and is built to deploy on Vercel in a couple of minutes. Your Gemini API key lives on the server and is never exposed to Claude.
Why a remote MCP server (and not a local one)?
Claude Design and claude.ai connect to custom connectors from Anthropic's cloud, not from your computer β so the server has to be reachable on the public internet over HTTP. That's exactly what this project is: a small hosted HTTP MCP server.
If you only ever use Claude Desktop, a local (stdio) server also works β but the hosted URL below works there too, so one deployment covers every surface.
Related MCP server: NanoBanana MCP
1. Get a Gemini API key
nano banana is part of the Google Gemini API. Grab a free key at
https://aistudio.google.com/apikey. You'll set it as the GEMINI_API_KEY environment
variable on your deployment.
2. Deploy to Vercel
Option A β Vercel CLI
npm i -g vercel # if you don't have it
vercel # link/create the project and deploy a preview
vercel env add GEMINI_API_KEY # paste your key (Production + Preview)
vercel --prod # deploy to productionOption B β Git + Vercel dashboard
Push this repo to GitHub/GitLab/Bitbucket.
In Vercel, Add Newβ¦ β Project and import the repo.
Under Settings β Environment Variables, add
GEMINI_API_KEY.Deploy.
After deploying, your MCP endpoint is:
https://<your-project>.vercel.app/mcpOpen the root URL (https://<your-project>.vercel.app/) in a browser to confirm it's live.
maxDuration: image generation can take 10β30s. The route is configured for up to 60s, which is the limit on Vercel's Hobby plan. On Pro you can raise it.
3. Add it to Claude as a custom connector
In Claude, go to Settings β Connectors (also shown as Customize β Connectors).
Click + Add custom connector.
Name:
nano banana(anything you like). URL:https://<your-project>.vercel.app/mcpSave. No OAuth is required (leave Advanced settings empty).
In a chat, open the + menu β Connectors and enable it for the conversation.
Now ask Claude things like:
βGenerate a 16:9 hero image of a neon-lit cyberpunk street market, cinematic lighting.β
βMake me a minimalist logo: a banana wearing sunglasses, flat vector, on white.β
βTake this image https://example.com/room.jpg and restyle it as a cozy Scandinavian interior.β
βCombine https://β¦/logo.png and https://β¦/tshirt.jpg into a product mockup.β
Custom remote connectors are available on Claude (web), Cowork, and Claude Desktop across Free/Pro/Max/Team/Enterprise. On Team/Enterprise, an Owner adds the connector for the org first. Availability inside Claude Design's UI follows the same connector system; if you don't see custom connectors there yet, add it in claude.ai with the same account.
Tools
generate_image
param | type | required | description |
| string | β | What to draw. Be specific about subject, style, composition, colours, lighting, mood. |
| enum | β |
|
edit_image
param | type | required | description |
| string | β | How to edit / combine the source image(s). |
| string[] (1β4) | β | Publicly reachable image URL(s). Pass several to blend them. |
| enum | β | Optional output aspect ratio. |
Both tools return the resulting image inline so Claude can see and use it.
Configuration
env var | required | default | description |
| β | β | Your Google Gemini API key. |
| β |
| Override the model. |
Model options:
gemini-2.5-flash-imageβ the classic nano banana (fast, great default)gemini-3-pro-imageβ Nano Banana Pro (higher quality, slower, pricier)gemini-3.1-flash-imageβ Nano Banana 2
Local development
npm install
cp .env.example .env.local # then put your GEMINI_API_KEY in .env.local
npm run dev # http://localhost:3000 (endpoint: /mcp)
# in another terminal β verify the MCP protocol end-to-end:
node scripts/smoke-test.mjsscripts/smoke-test.mjs connects as an MCP client and lists the tools β handy for confirming a
deployment too: node scripts/smoke-test.mjs https://<your-project>.vercel.app/mcp.
Security notes
Your
GEMINI_API_KEYstays server-side; Claude never receives it.This server is unauthenticated by default β anyone who knows the URL can call it and spend your Gemini quota. For personal use, keep the URL private. To lock it down, add OAuth via
mcp-handler'swithMcpAuthhelper (Claude's connector UI supports OAuth client id/secret), or put the deployment behind Vercel Authentication / a WAF rule.Images are returned inline as base64. Very large (e.g. 2K) outputs can bump into serverless response-size limits; the default model/resolution stays well within them.
How it works
Claude (Design / web / desktop)
β Streamable HTTP (MCP)
βΌ
/app/[transport]/route.ts β mcp-handler (Streamable HTTP transport)
β
βΌ
/lib/nanobanana.ts β @google/genai β Gemini "nano banana"
β
βΌ
generated image (returned inline to Claude)Transport: Streamable HTTP (the current MCP standard; the route exports
GET/POST/DELETE).Stateless: no Redis/session store required β fine for request/response image tools.
Runtime: Node.js serverless function (
@google/genaineeds Node, not Edge).
Tech
next Β· mcp-handler Β·
@modelcontextprotocol/sdk Β·
@google/genai Β· zod
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.
Latest Blog Posts
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/Artur-ershov/nb-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server