nano-banana
Generates images through Google's Gemini (Nano Banana) image generation API from a text prompt, supporting configurable aspect ratios and custom output filenames, with generated images saved to a local output directory.
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., "@nano-bananaGenerate a 16:9 image of a futuristic city 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.
MCP Nano Banana
MCP server for image generation using Nano Banana (Gemini). Use it with Claude Code to generate images directly from your prompts.
Setup
1. Get a Gemini API Key
Go to Google AI Studio
Create a new API key
Save it securely (you'll use it in step 3)
2. Build the server
git clone https://github.com/baiano/mcp-nano-banana.git
cd mcp-nano-banana
npm install
npm run build3. Store the API key securely
Add the key to your shell profile (~/.zshrc or ~/.bashrc):
echo 'export GEMINI_API_KEY=your_key_here' >> ~/.zshrc
source ~/.zshrcAlternatively, you can set it per-project in the Claude Code MCP config (see below).
4. Add to Claude Code
Run the following command:
claude mcp add nano-banana -- node /absolute/path/to/mcp-nano-banana/dist/index.jsOr add it manually to ~/.claude/settings.json:
{
"mcpServers": {
"nano-banana": {
"command": "node",
"args": ["/absolute/path/to/mcp-nano-banana/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your_key_here"
}
}
}
}If you set GEMINI_API_KEY in your shell profile, you can omit the env block.
5. Optional: custom output directory
By default, images are saved to ~/Pictures/nano-banana/. Override it with:
{
"env": {
"GEMINI_API_KEY": "your_key_here",
"NANO_BANANA_OUTPUT_DIR": "/path/to/your/folder"
}
}Related MCP server: Gemini Image MCP Server
Usage
Once configured, just ask Claude Code to generate images naturally:
"Generate an image of a medieval knight in pixel art style"
"Create a 16:9 landscape of a futuristic city at sunset"
"Draw a cute cartoon cat with a wizard hat, save as wizard-cat.png"
Claude will recognize the intent and call the generate_image tool via MCP.
Tool: generate_image
Parameter | Required | Description |
| Yes | Detailed description of the image to generate |
| No |
|
| No | Custom filename (e.g. |
Development
npm test # Run tests
npm run build # Compile TypeScriptThis server cannot be deployed
Maintenance
Related MCP Connectors
- lightgenOAuthapp.lightgen
Generate and edit images and create short videos inside Claude. Prepaid credits, no subscription.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
AI image and video generation, talking avatars, consistent characters and photo packs from Claude.
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
Related MCP Servers
- 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
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to generate and edit images using Google Gemini AI.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to generate images on demand using the FLUX.1-schnell model, supporting multiple aspect ratios and saving locally.MIT