gemini-image-mcp
Provides tools to upload, list, and delete files via the Gemini Files API so they can be managed and used as references for image generation.
Enables AI image generation using Gemini Flash and Pro models, with automatic model selection, aspect ratio control, thinking level, Google Search grounding, safety settings, seed reproducibility, and output file saving.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gemini-image-mcp
MCP server for AI-powered image generation using Google Gemini models.
Also known as "Nano Banana" - the friendly name for this image generation server.
Features
Dual Model Support: Flash (2-3s, 1024px) and Pro (4K quality)
Smart Model Selection: Auto-selects based on prompt keywords
Aspect Ratio Control: 1:1, 16:9, 9:16, 21:9, 4:3, 3:4, 2:1
Google Search Grounding: Factually accurate images (Pro only)
File Management: Upload, list, and delete files via Gemini Files API
Reproducible Generation: Seed support for consistent results
Related MCP server: Nano Banana
Installation
Via uvx (Recommended)
No installation needed - runs directly:
uvx gemini-image-mcpVia pip
pip install gemini-image-mcpVia pipx
pipx install gemini-image-mcpConfiguration
Environment Variable
Get your free API key from Google AI Studio.
export GEMINI_API_KEY="your-api-key-here"Claude Code Integration
Add to your .mcp.json:
{
"mcpServers": {
"nano-banana": {
"command": "uvx",
"args": ["gemini-image-mcp"]
}
}
}Or configure in ~/.claude/settings.json:
{
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}Tools
generate_image
Generate images with automatic model selection.
mcp__nano-banana__generate_imageParameters:
prompt(required): Image descriptionmodel_tier: "flash", "pro", or "auto" (default: auto)aspect_ratio: "1:1", "16:9", "9:16", etc. (default: 1:1)thinking_level: "LOW" or "HIGH" (Pro only)use_grounding: Enable Google Search grounding (Pro only)safety_level: "STRICT", "MODERATE", "PERMISSIVE", "OFF"seed: Integer for reproducible resultsoutput_path: File path to save image
list_files
List uploaded files.
mcp__nano-banana__list_filesupload_file
Upload a file for use as reference.
mcp__nano-banana__upload_filedelete_file
Delete an uploaded file.
mcp__nano-banana__delete_fileModel Selection
Pro model auto-selects for prompts containing:
professional, 4k, high quality, detailed, photorealistic
ultra, premium, studio, commercial, product photo
Flash model auto-selects for prompts containing:
quick, fast, sketch, draft, concept, rough
preview, test, iterate, simple, basic
Development
# Clone and setup
git clone https://github.com/channel47/nano-banana-mcp.git
cd nano-banana-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Format code
ruff format src/ tests/
ruff check src/ tests/License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate and upscale AI images, video and audio with leading models, right from your AI chat.
Upload, generate, organize, search, and transform images, videos, and files with AI-powered tools.
Upload, generate, organize, search, and transform images, videos, and files with AI-powered tools.
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate high-quality images using Google's Gemini and Imagen models with support for multiple aspect ratios, dynamic model selection, and direct file saving capabilities.MIT
- AlicenseBqualityDmaintenanceEnables image generation using Google Gemini models like Gemini 2.0 Flash and Imagen 3.0 with support for custom aspect ratios and negative prompts. It also allows users to list and manage generated images stored in local directories.2MIT
- FlicenseNot gradedqualityCmaintenanceEnables image generation and editing using Google's Gemini models with support for model selection and custom aspect ratios. Users can generate high-quality images or modify existing ones through natural language prompts while controlling specific parameters like quality and dimensions.-
- FlicenseNot gradedqualityDmaintenanceEnables image generation using Google Gemini models (flash/pro) with support for multiple sizes, reference images, and access control via Google OAuth and email allow-lists.1-