gemini-image-mcp
MCP server for AI-powered image generation using Google Gemini models. Free API key, dual-model support, aspect ratio control.
Part of Channel 47, the open-source ecosystem of profession plugins for Claude Code. Get the newsletter for weekly skill breakdowns from production use.
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
Installation
Via uvx (Recommended)
No installation needed - runs directly:
uvx gemini-image-mcp
Via pip
pip install gemini-image-mcp
Via pipx
pipx install gemini-image-mcp
Configuration
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_image
Parameters:
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_files
upload_file
Upload a file for use as reference.
mcp__nano-banana__upload_file
delete_file
Delete an uploaded file.
mcp__nano-banana__delete_file
Model 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/mcps.git
cd mcps/nano-banana
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/
Links
- Channel 47 — open-source profession plugins for Claude Code
- Build Notes Newsletter — weekly skill breakdowns from production use
- PyPI Package
- GitHub Repository
License
MIT
Metadata
Release files for gemini-image-mcp 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gemini_image_mcp-1.1.1.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gemini_image_mcp-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / gemini_image_mcp-1.1.1.tar.gz
| Download URL | gemini_image_mcp-1.1.1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb21c1cafafb6539c11e37e9db26e773b43a20c30289eb0fcb55510c1b16b6be
|
|
BLAKE2b-256 checksum How to use checksums |
66a33fb5469a16f3303dc45b722fee90565f3c87d8b800780716274a0e29c2d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.
Transparency logRelease files / gemini_image_mcp-1.1.1-py3-none-any.whl
| Download URL | gemini_image_mcp-1.1.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a7a6032889a21177d9eb0ca94ec66e0a31af8dfde8a3b5ab7c83aa0207f4cc5
|
|
BLAKE2b-256 checksum How to use checksums |
08942f2237be21270daff857b28a90fcd688b49e3b79c65da0e9043b52510fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.
Transparency log