An MCP server for Nano Banana image generation through the Polza AI media API
Project description
Nano Banana 2 Polza AI MCP Server
mcp-name: io.github.ivanantigravity-lgtm/nanobanana-2-polzaia-mcp-server
MCP server for image generation and editing through Polza AI, using:
google/gemini-3.1-flash-image-previewas the default Nano Banana 2 modelgoogle/gemini-3-pro-image-previewfor higher-quality compositionsgoogle/gemini-2.5-flash-imagefor faster draft generation
This project exposes MCP tools like:
generate_imageupload_fileoutput_statsmaintenance
What Users Need
Claude Codeor another MCP clientuvPython 3.11+- a
POLZA_AI_API_KEY
Local Development
git clone https://github.com/ivanantigravity-lgtm/nanobanana-2-polzaia-mcp-server.git
cd nanobanana-2-polzaia-mcp-server
uv sync
cp .env.example .env
Set at minimum:
POLZA_AI_API_KEY=your_polza_api_key
POLZA_BASE_URL=https://polza.ai/api
IMAGE_OUTPUT_DIR=/absolute/path/to/output
Run locally:
uv run python -m nanobanana_mcp_server.server
Claude Code / VS Code
If the package is published to PyPI, the easy install path is a project-level .mcp.json:
{
"mcpServers": {
"nanobanana-polza": {
"command": "uvx",
"args": ["nanobanana-2-polzaia-mcp-server@latest"],
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here",
"POLZA_BASE_URL": "https://polza.ai/api",
"IMAGE_OUTPUT_DIR": "/Users/demo/Documents/nanobanana"
}
}
}
}
If the user runs from source instead of a published package:
{
"mcpServers": {
"nanobanana-polza-local": {
"command": "uv",
"args": ["run", "python", "-m", "nanobanana_mcp_server.server"],
"cwd": "/absolute/path/to/nanobanana-2-polzaia-mcp-server",
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here",
"POLZA_BASE_URL": "https://polza.ai/api",
"IMAGE_OUTPUT_DIR": "/absolute/path/to/output"
}
}
}
}
Claude Desktop
On macOS, add the same server to:
~/Library/Application Support/Claude/claude_desktop_config.json
Example:
{
"mcpServers": {
"nanobanana-polza": {
"command": "uvx",
"args": ["nanobanana-2-polzaia-mcp-server@latest"],
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here",
"POLZA_BASE_URL": "https://polza.ai/api",
"IMAGE_OUTPUT_DIR": "/Users/demo/Documents/nanobanana"
}
}
}
}
What Still Needs To Be Published
To make installation as easy as the screenshot flow:
- Publish the Python package to
PyPI - Update repository URLs in
pyproject.tomlandserver.json - Publish
server.jsonto theMCP Registry
The registry only stores metadata. The actual package still needs to exist on PyPI.
Publish Checklist
Before publishing:
- Create the GitHub repo
ivanantigravity-lgtm/nanobanana-2-polzaia-mcp-server - Bump the version
- Build and test:
PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m compileall nanobanana_mcp_server tests
uv build
- Publish to PyPI
uv publish
- Publish
server.jsonwithmcp-publisher
brew install mcp-publisher
mcp-publisher login
mcp-publisher publish
Backend Notes
This server uses:
POST /v1/mediaGET /v1/media/{id}POST /v1/storage/uploadGET /v1/storage/files/{id}DELETE /v1/storage/files/{id}
through the Polza AI API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nanobanana_2_polzaia_mcp_server-0.4.5.tar.gz.
File metadata
- Download URL: nanobanana_2_polzaia_mcp_server-0.4.5.tar.gz
- Upload date:
- Size: 261.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee1b5a9935cda6118ff9258316cd399cbe63bf5e31561183062cb1609a52a2a0
|
|
| MD5 |
290b81ec7b3ea746d3d561b08d84c871
|
|
| BLAKE2b-256 |
cb9ed33d86b7e51a78fe74777ae6f7ee58db998b1a98611b94fcdea2dbee415c
|
File details
Details for the file nanobanana_2_polzaia_mcp_server-0.4.5-py3-none-any.whl.
File metadata
- Download URL: nanobanana_2_polzaia_mcp_server-0.4.5-py3-none-any.whl
- Upload date:
- Size: 86.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45300296d61633e6e334c0cee14f0c3aad678f8c875063ccd079a4a577403b73
|
|
| MD5 |
f37f83afbb0f3342e9a775aeb98bfc5a
|
|
| BLAKE2b-256 |
33cf7b0b9d2bd2109d9234560e0e0c03e4c44b03a2d5b10536ef00001f98daa4
|