Skip to main content

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-preview as the default Nano Banana 2 model
  • google/gemini-3-pro-image-preview for higher-quality compositions
  • google/gemini-2.5-flash-image for faster draft generation

This project exposes MCP tools like:

  • generate_image
  • upload_file
  • output_stats
  • maintenance

What Users Need

  • Claude Code or another MCP client
  • uv
  • Python 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:

  1. Publish the Python package to PyPI
  2. Update repository URLs in pyproject.toml and server.json
  3. Publish server.json to the MCP Registry

The registry only stores metadata. The actual package still needs to exist on PyPI.

Publish Checklist

Before publishing:

  1. Create the GitHub repo ivanantigravity-lgtm/nanobanana-2-polzaia-mcp-server
  2. Bump the version
  3. Build and test:
PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m compileall nanobanana_mcp_server tests
uv build
  1. Publish to PyPI
uv publish
  1. Publish server.json with mcp-publisher
brew install mcp-publisher
mcp-publisher login
mcp-publisher publish

Backend Notes

This server uses:

  • POST /v1/media
  • GET /v1/media/{id}
  • POST /v1/storage/upload
  • GET /v1/storage/files/{id}
  • DELETE /v1/storage/files/{id}

through the Polza AI API.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanobanana_2_polzaia_mcp_server-0.4.5.tar.gz (261.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanobanana_2_polzaia_mcp_server-0.4.5-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

Details for the file nanobanana_2_polzaia_mcp_server-0.4.5.tar.gz.

File metadata

File hashes

Hashes for nanobanana_2_polzaia_mcp_server-0.4.5.tar.gz
Algorithm Hash digest
SHA256 ee1b5a9935cda6118ff9258316cd399cbe63bf5e31561183062cb1609a52a2a0
MD5 290b81ec7b3ea746d3d561b08d84c871
BLAKE2b-256 cb9ed33d86b7e51a78fe74777ae6f7ee58db998b1a98611b94fcdea2dbee415c

See more details on using hashes here.

File details

Details for the file nanobanana_2_polzaia_mcp_server-0.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nanobanana_2_polzaia_mcp_server-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45300296d61633e6e334c0cee14f0c3aad678f8c875063ccd079a4a577403b73
MD5 f37f83afbb0f3342e9a775aeb98bfc5a
BLAKE2b-256 33cf7b0b9d2bd2109d9234560e0e0c03e4c44b03a2d5b10536ef00001f98daa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page