Overview · 90 seconds
What Nano Banana actually does.
Nano Banana is a local MCP (Model Context Protocol) server that exposes Google’s Gemini image & audio models as tools inside Claude Code. Once it’s registered, every Claude Code session can generate animated stills and matching audio from a plain-English prompt — no separate UI, no SaaS account beyond the Gemini API key.
The stack
| Component | Purpose | Where |
|---|---|---|
| Claude Code | The agent you already use. Reads MCP servers from ~/.claude.json. | VS Code / CLI |
| Nano Banana MCP server | Translates Claude Code tool calls into Gemini API calls for image + audio generation. | zhongweili/nanobanana-mcp-server |
| uv | Astral’s Python runtime. Installs and isolates the server’s deps on first run. | astral.sh/uv |
| Gemini API key | The only paid dependency. Free tier covers most personal experiments. | aistudio.google.com |
Step 1 of 4 · Install
1 Clone the repo & install uv.
Two parallel commands. The repo is small (single Python package). uv is the Astral runtime that uv run uses to auto-install Python deps on first launch — no global pip install needed.
- Clone
zhongweili/nanobanana-mcp-serverinto your home directory (or anywhere stable). - Install uv via the official standalone installer — no Homebrew required.
- Confirm both worked:
ls ~/nanobanana-mcp-serverand~/.local/bin/uv --version.
git clone https://github.com/zhongweili/nanobanana-mcp-server.git ~/nanobanana-mcp-server
curl -LsSf https://astral.sh/uv/install.sh | sh
# verify
ls ~/nanobanana-mcp-server
~/.local/bin/uv --version
uv run instead of uvx ...@latest? uvx @latest fetches and executes fresh PyPI code on every Claude Code start — a separate trust decision. Running from your already-cloned local source reuses code you’ve already accepted.
Step 2 of 4 · API key
2 Grab a Gemini API key.
Free tier covers most experiments. The key is what gives Nano Banana access to the Gemini image and audio endpoints — the rest is local.
- Open aistudio.google.com/app/apikey and sign in with the Google account you want billed.
- Click Create API key · copy the long string starting with
AIza.... - Keep it in your password manager. You’ll paste it into the MCP config in Step 3 — never commit it to git.
Step 3 of 4 · MCP config
3 Add Nano Banana to Claude Code.
Edit ~/.claude.json and add a new entry under mcpServers. Back up the file first — one bad bracket and Claude Code won’t start. The config below is the local-source variant (recommended).
{
"mcpServers": {
"nanobanana-local": {
"command": "uv",
"args": ["run", "python", "-m", "nanobanana_mcp_server.server"],
"cwd": "/absolute/path/to/nanobanana-mcp-server",
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
}
- Replace
/absolute/path/to/nanobanana-mcp-serverwith the real clone path (e.g./Users/azizsaif/nanobanana-mcp-server). - Paste your Gemini key in place of
your-gemini-api-key-here. - If
uvisn’t on PATH, use the absolute path:"command": "/Users/azizsaif/.local/bin/uv". - Back up first:
cp ~/.claude.json ~/.claude.json.bak.
~/.claude.json without explicit approval — that’s by design. Either approve the edit when prompted, or paste the JSON in manually with your editor of choice.
Step 4 of 4 · Prompts
4 Drive it from Claude Code.
Restart Claude Code. In any session, ask for a clip the same way you’d ask for a file. The MCP server returns an image plus a matching audio track — ready to drop into Blotato, CapCut or directly into a social schedule.
Halal-first hero clip for www.eatcookjoy-uae.com
Use nanobanana to generate a 6-second animated still: slow steam rising off a clay pot of nihari, warm golden-hour light, top-down on a dark wood table, ambient pakistani rabab + soft kitchen sounds. Aspect 9:16. Brand: terracotta + gold. No text.
Recipe loop — biryani layering
Generate a seamless 4-second loop: hand layering saffron rice over slow-cooked beef, overhead, soft natural light, shallow depth of field, audio: gentle sizzle + light spoon-on-pot tap. Aspect 1:1, no captions, halal-only ingredients.
Chef Ayesha — intro card
Animated still, 5 seconds, 9:16: Chef Ayesha smiling in a Dubai home kitchen, soft window light, terracotta apron, gentle blink + steam from a pot in foreground. Audio: warm 3-note oud motif.
Cinemagraph — gulf evening
4-second cinemagraph: Dubai skyline at maghrib, static foreground (rooftop dinner table set for two), animated background (slow drifting clouds, soft city glow). Audio: distant adhan + low wind. Aspect 16:9.
~/eatcookjoy-marketing/clips/ (or your equivalent) before posting — Blotato picks up from a folder watch.
Reference
Common traps.
- Claude Code can’t see the server. Quit Claude Code completely (not just close the window) and reopen — MCP servers load at startup.
uv: command not found. Add~/.local/binto PATH, or use the absolute path in the MCPcommandfield.- 403 / quota errors. Check the Gemini key has the image + audio models enabled in aistudio.google.com.
- JSON broken. Restore from
~/.claude.json.bakand try again with a JSON linter. - Slow first run.
uv runresolves and installs the Python deps on the first call — expect 30–60s before the first response.
Outbound links
Everything in one place.
- Repo · github.com/zhongweili/nanobanana-mcp-server
- uv installer · docs.astral.sh/uv/getting-started/installation/
- Gemini API key · aistudio.google.com/app/apikey
- Model Context Protocol · modelcontextprotocol.io
- Sister playbook · Claude Code + Blotato — step by step
- EatCookJoy marketing site · azizsaif.com/eatcookjoy-marketing/