Gemini Nanobanana (Image Generation)▌
by junhan2
Gemini Nanobanana: AI image generator for creating, editing, and composing stunning images using advanced artificial int
Integrates with Google's Gemini 2.5 Flash Image API to provide text-to-image generation, single image editing with prompts, multi-image composition, and style transfer capabilities with automatic file saving and collision handling.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / Content creators needing quick image generation
- / Designers prototyping visual concepts
- / Users wanting AI art within Claude conversations
capabilities
- / Generate images from text descriptions
- / Edit existing images with text prompts
- / Compose multiple images together
- / Apply style transfer to images
- / Save generated images with collision handling
what it does
Integrates Google's Gemini 2.5 Flash Image API into Claude conversations, allowing you to generate images from text prompts directly in chat.
about
Gemini Nanobanana (Image Generation) is a community-built MCP server published by junhan2 that provides AI assistants with tools and capabilities via the Model Context Protocol. Gemini Nanobanana: AI image generator for creating, editing, and composing stunning images using advanced artificial int It is categorized under ai ml.
how to install
You can install Gemini Nanobanana (Image Generation) in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Gemini Nanobanana (Image Generation) is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
🎨 Gemini Nanobanana MCP
Generate images from text with Claude! Simply type "Draw a cute cat" and get instant AI-generated images.
A beginner-friendly Model Context Protocol (MCP) server that brings Google's Gemini 2.5 Flash Image generation directly into your Claude conversations.
Quick Start - Just 3 Steps
1️⃣ Get Your API Key (1 minute)
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API key" → Copy the key
2️⃣ Install in Your Claude Client (2 minutes)
<details> <summary><b>Claude Desktop (Windows)</b></summary>- Open Notepad
- Copy this code and replace
YOUR_API_KEYwith your actual key:
{
"mcpServers": {
"gemini-nanobanana-mcp": {
"command": "npx",
"args": ["gemini-nanobanana-mcp@latest"],
"env": {
"GEMINI_API_KEY": "YOUR_API_KEY"
}
}
}
}
- Save as:
%APPDATA%/Claude/claude_desktop_config.json - Restart Claude Desktop
- Open Terminal (search "Terminal" in Spotlight)
- Run this command (replace
YOUR_API_KEY):
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'
{
"mcpServers": {
"gemini-nanobanana-mcp": {
"command": "npx",
"args": ["gemini-nanobanana-mcp@latest"],
"env": {
"GEMINI_API_KEY": "YOUR_API_KEY"
}
}
}
}
EOF
- Restart Claude Desktop
Just run this one command in your terminal (replace YOUR_API_KEY):
claude mcp add gemini-nanobanana-mcp -s user -e GEMINI_API_KEY="YOUR_API_KEY" -- npx -y gemini-nanobanana-mcp@latest
</details>
<details>
<summary><b>Cursor</b></summary>
- Go to
Cursor Settings→MCP→Add new MCP Server - Fill in:
- Name:
gemini-nanobanana-mcp - Command:
npx - Args:
gemini-nanobanana-mcp@latest - Environment Variables:
GEMINI_API_KEY=YOUR_API_KEY
- Name:
- Restart Cursor
3️⃣ Start Creating! (0 minutes)
Try these in Claude:
- "Generate a cute puppy playing in a garden"
- "Create a beautiful sunset over mountains"
- "Draw a red sports car"
- "Make an abstract colorful painting"
Your images automatically save to ~/Downloads/gemini-images/
See It In Action
Basic Usage
You: Generate a cozy coffee shop interior
Claude: [Generating image...]
Image generated and saved to: ~/Downloads/gemini-images/generate-2025-01-09-14-30-45.png
Size: 1.2MB | Format: PNG
Custom Save Location
You: Create a sunset landscape and save it as ./my-sunset.png
Claude: Image saved to: ./my-sunset.png
What You Can Do
Text-to-Image Generation
Create any image you can imagine from a text description.
Examples:
"A majestic dragon flying over a medieval castle""Modern minimalist living room with plants""Vintage bicycle on a cobblestone street"
Image Editing
Edit existing images with natural language instructions.
How to use:
- Upload an image to Claude
- Say:
"Make this image black and white" - Or:
"Add a sunset background to this photo"
Image Composition
Combine multiple images into one creative composition.
How to use:
- Upload 2-10 images to Claude
- Say:
"Combine these images into a collage" - Or:
"Blend these photos together artistically"
Style Transfer
Apply the artistic style of one image to another.
How to use:
- Upload two images: a content image and a style reference
- Say:
"Apply the style of the second image to the first"
Configuration Options
<details> <summary><b>Environment Variables</b></summary>| Variable | Default | Description |
|---|---|---|
GEMINI_API_KEY | Required | Your Google AI Studio API key |
AUTO_SAVE | true | Automatically save images when no path specified |
DEFAULT_SAVE_DIR | ~/Downloads/gemini-images | Default directory for saved images |
LOG_LEVEL | info | Logging level (error, warn, info, debug) |
Example with custom settings:
{
"mcpServers": {
"gemini-nanobanana-mcp": {
"command": "npx",
"args": ["gemini-nanobanana-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key",
"AUTO_SAVE": "true",
"DEFAULT_SAVE_DIR": "~/Pictures/AI-Images",
"LOG_LEVEL": "debug"
}
}
}
}
</details>
<details>
<summary><b>Disable Auto-Save</b></summary>
To only save when you explicitly request it:
{
"env": {
"GEMINI_API_KEY": "your-api-key",
"AUTO_SAVE": "false"
}
}
Then images will only appear in the chat without saving to disk.
</details>Instant Image Preview (Claude Code)
Want images to open automatically after generation? Set up Claude Code hooks for instant Quick Look previews!
One-Click Setup (Mac)
# Clone this repo and run the installer
git clone https://github.com/nanobanana/nanobanana-mcp.git
cd nanobanana-mcp
bash hooks/install.sh
What You Get
- Instant Preview: Generated images open automatically in Quick Look
- Zero Manual Work: No more finding and opening files
- Smart Detection: Only triggers for nanobanana image tools
- Press Space to Close: Standard Quick Look controls
Full setup guide: hooks/README.md
Troubleshooting
<details> <summary><b>❌ "GEMINI_API_KEY not set" error</b></summary>Solution:
- Double-check you replaced
YOUR_API_KEYwith your actual API key - Make sure there are no extra spaces around the key
- Restart your Claude client completely
- Verify your API key works at Google AI Studio
Solution:
- Install Node.js from nodejs.org (choose LTS version)
- Restart your terminal/Claude client
- Try the installation again
Checklist:
- API key correctly set?
- Internet connection working?
- Restart Claude after configuration?
- Try a simple prompt: "Generate a blue circle"
Solution:
Check your configuration has AUTO_SAVE: "true" (default behavior).
If you want to disable auto-save, set it to "false".
Common fixes:
- Make sure you're using Claude Code (not Claude Desktop)
- Run the installer from the nanobanana-mcp directory
- Restart Claude Code after installation
- Check hooks/README.md for detailed troubleshooting
Tips for Better Images
Prompt Writing Tips
- Be specific: "A golden retriever puppy" vs "A dog"
- Include style: "in watercolor style", "photorealistic", "cartoon style"
- Add details: "with blue eyes", "in a sunny garden", "wearing a red collar"
- Set the mood: "cozy", "dramatic", "peaceful", "energetic"
Technical Details
- Supported formats: PNG, JPEG, WebP, GIF
- Default output: PNG format
- Image size: Optimized for quality and reasonable file size
- Rate limits: Managed automatically with retry logic
🚀 Advanced Features
<details> <summary><b>🔗 HTTP Mode (for integrations)</b></summary>Run as an HTTP server instead of stdio:
MCP_TRANSPORT=http MCP_HTTP_PORT=8080 npx gemini-nanobanana-mcp@latest
Access at http://localhost:8080/mcp
Enable detailed logging:
{
"env": {
"GEMINI_API_KEY": "your-key",
"LOG_LEVEL": "debug"
}
}
</details>
💡 Need Help?
- 📖 Quick Setup Guide: QUICK_START.md
- 🪝 Auto-Preview Setup: hooks/README.md
- 🐛 Report Issues: GitHub Issues
- 💬 Feature Requests: Welcome!
🤝 Contributing
Found a bug? Have a feature idea? Contributions are welcome!
- Fork the repository
- Create your feature branch
- Make your changes
- Submit a pull request
📄 License
MIT License - feel free to use this in your own projects!
⭐ If this helped you, please star the repository on GitHub!
Built with ❤️ for the Claude community
FAQ
- What is the Gemini Nanobanana (Image Generation) MCP server?
- Gemini Nanobanana (Image Generation) is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Gemini Nanobanana (Image Generation)?
- This profile displays 62 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Extended AI Capabilities
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Context Enhancement
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Workflow Automation
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor IDE with MCP support
- ›Basic understanding of MCP architecture and capabilities
- ›Access credentials for integrated services (if required)
- ›Willingness to experiment and iterate on configuration
Time Estimate
15-60 minutes depending on server complexity
Installation Steps
- 1.Install MCP server: npm install -g [package-name] or via GitHub
- 2.Add server configuration to ~/.claude/mcp.json
- 3.Provide required credentials and configuration
- 4.Restart Claude Desktop to load new server
- 5.Test basic functionality with simple prompts
- 6.Explore capabilities and experiment with use cases
- 7.Document successful patterns for reuse
Troubleshooting
- ⚠MCP server not loading: Check config syntax, verify installation
- ⚠Connection errors: Check network, firewall, credentials
- ⚠Feature not working: Read server docs, check required parameters
- ⚠Performance issues: Monitor resource usage, check for network latency
- ⚠Conflicts with other servers: Check port assignments, namespace collisions
Best Practices▌
✓ Do
- +Read server documentation thoroughly before setup
- +Start with simple use cases to validate functionality
- +Test in non-production environment first
- +Monitor resource usage and performance
- +Keep servers updated for bug fixes and new features
- +Document configuration for team members
- +Use environment variables for sensitive configuration
✗ Don't
- −Don't grant overly permissive access to MCP servers
- −Don't skip reading security considerations in docs
- −Don't expose sensitive data without proper controls
- −Don't run untrusted MCP servers without code review
- −Don't ignore error messages—investigate root cause
💡 Pro Tips
- ★Combine multiple MCP servers for powerful workflows
- ★Create custom MCP servers for your specific needs
- ★Share successful configurations with team
- ★Use MCP inspector for debugging
- ★Join MCP community for tips and troubleshooting
Technical Details▌
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
- Model Context Protocol (MCP)
- JSON-RPC 2.0
- stdio or HTTP transport
Compatibility
- Claude Desktop
- Cursor IDE
- Custom MCP clients
When to Use This▌
✓ Use When
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid When
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.
Integration▌
- →Tool composition: Chain multiple MCP tools in workflows
- →Context augmentation: Provide AI with relevant external data
- →Action delegation: Let AI execute tasks on external systems
- →Bidirectional sync: Keep AI context and external systems in sync
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.7★★★★★62 reviews- ★★★★★Kofi Sethi· Dec 20, 2024
Gemini Nanobanana (Image Generation) has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Liam Park· Dec 16, 2024
Gemini Nanobanana (Image Generation) reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Kofi Huang· Dec 12, 2024
We wired Gemini Nanobanana (Image Generation) into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Layla Park· Dec 8, 2024
According to our notes, Gemini Nanobanana (Image Generation) benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Advait Thompson· Nov 27, 2024
Gemini Nanobanana (Image Generation) is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Amina Farah· Nov 19, 2024
We wired Gemini Nanobanana (Image Generation) into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Hiroshi Johnson· Nov 11, 2024
Gemini Nanobanana (Image Generation) reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Layla Brown· Nov 7, 2024
Gemini Nanobanana (Image Generation) has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Layla Choi· Nov 7, 2024
We wired Gemini Nanobanana (Image Generation) into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Olivia Brown· Oct 26, 2024
Strong directory entry: Gemini Nanobanana (Image Generation) surfaces stars and publisher context so we could sanity-check maintenance before adopting.
showing 1-10 of 62