nanobanana-pro-mcp
Detects Next.js projects and saves generated images to the appropriate directory (e.g., public/images/) with project-aware naming conventions.
Generates images using an OpenAI-compatible API, with configurable model and automatic aspect ratio detection.
Detects Python projects and saves generated images to assets/ or static/images/ depending on the project structure.
Detects React projects and saves generated images to src/assets/ with appropriate naming conventions.
Detects Unity projects and places generated images in Assets/Images/ with project-aware naming.
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., "@nanobanana-pro-mcpGenerate a modern app icon"
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 Image Generation for Claude Code
An MCP (Model Context Protocol) server that provides AI-powered image generation, format conversion, and smart asset placement for Claude Code.
Features
generate_image- Generate images from text prompts with automatic aspect ratio detectionconvert_image- Convert images between formats (PNG, JPG, WebP, ICO, ICNS)save_asset- Smart asset placement with project-aware naming conventions
Smart Detection
Aspect Ratio: Automatically detects the best size based on prompt keywords
"icon", "avatar", "logo" → 1:1 (1024x1024)
"banner", "hero", "header" → 16:9 (1280x720)
"mobile", "story", "splash" → 9:16 (720x1280)
"photo", "traditional" → 4:3 (1216x896)
Project Type: Detects your project framework and places assets accordingly
Next.js, React, Vue →
public/images/orsrc/assets/Unity →
Assets/Images/Godot →
assets/images/Python →
assets/orstatic/images/
Naming Convention: Matches your project's existing style
kebab-case, snake_case, PascalCase, camelCase
Related MCP server: PixelForge MCP
Installation
From PyPI (Recommended)
# Using uv (recommended)
uv pip install nanobanana-pro-mcp
# Or using pip
pip install nanobanana-pro-mcpPrerequisites
Python 3.10+
uv (recommended) or pip
Configure Claude Code
Add to your Claude Code MCP settings (~/.claude.json or project's .mcp.json):
{
"mcpServers": {
"nanobanana": {
"command": "uvx",
"args": [
"nanobanana-pro-mcp",
"--api-key=YOUR_API_KEY",
"--base-url=http://127.0.0.1:8045/v1"
]
}
}
}Configuration Options
Argument | Required | Description |
| Yes | Your API key for the image generation service |
| Yes | Base URL of the OpenAI-compatible image API |
| No | Model name (default: |
Usage Examples
Generate an Image
"Generate a futuristic city skyline at sunset"The MCP will:
Detect this should be a wide/banner image (16:9)
Generate the image via your configured API
Return a temporary file path and suggested filename
Convert Format
"Convert /tmp/futuristic-city.png to WebP"For icons:
"Convert /tmp/app-logo.png to ICO"This creates a proper Windows icon with all required sizes (16x16 through 256x256).
Save to Project
"Save /tmp/futuristic-city.png to my Next.js project at /home/user/my-app"The MCP will:
Detect it's a Next.js project
Find or create
public/images/Apply kebab-case naming (or match existing convention)
Save as
futuristic-city.png
Supported Formats
Format | Read | Write | Notes |
PNG | ✅ | ✅ | Default output format |
JPG/JPEG | ✅ | ✅ | Converts RGBA to RGB |
WebP | ✅ | ✅ | Great for web projects |
ICO | ✅ | ✅ | Multi-size Windows icons |
ICNS | ✅ | ✅ | macOS icons (basic support) |
Development
Local Setup
git clone https://github.com/rzgrozt/nanobanana-pro-mcp.git
cd nanobanana-pro-mcp
# Create virtual environment
uv venv
source .venv/bin/activate
# Install in development mode
uv pip install -e .Testing Locally
nanobanana-pro-mcp --api-key=test --base-url=http://localhost:8045/v1License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
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
- AlicenseDqualityCmaintenanceAn MCP server that allows Claude to use OpenAI's image generation capabilities (gpt-image-1) to create image assets for users, which is particularly useful for game and web development projects.1143MIT
- AlicenseBqualityBmaintenanceAn MCP server for AI-powered image generation, editing, analysis, and transformation using Google's Gemini and Imagen 4 models.192AGPL 3.0
- AlicenseAqualityDmaintenanceAn MCP server that turns Claude into a full image production studio, enabling creation, editing, resizing, and brand-consistent asset generation across multiple platforms.6MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that enables Claude Code to generate images using Google's Gemini image generation models.MIT
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for Midjourney AI image generation and editing
MCP server for Wan AI video generation
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/rzgrozt/nanobanana-pro-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server