Skip to main content

MCP Nano Banana

PyPI Version

This project is an MCP (Model Context Protocol) server that generates images using the Google Gemini API.

Description

This server implements the Model Context Protocol to expose a single tool, generate_image, to a compatible AI model. The tool accepts a text prompt, uses the Google Gemini API to generate an image, saves the image to the public/ directory for auditing, and returns the raw image data as a base64-encoded string.

To use the server with Claude Desktop or other applications

You need a Google Gemini API key and ImgBB API key to use this server.

Access https://api.imgbb.com/ to generate a IMGBB API Key. This is used to store and host the image online.

{
  "mcpServers": {
    "mcp-nano-banana": {
        "command": "uvx",
        "args": [
            "mcp-nano-banana"
        ],
        "env": {
            "GEMINI_API_KEY": "YOUR_API_KEY_HERE",
            "IMGBB_API_KEY": "YOUR_API_KEY_HERE"
        }
    }
  }
}

Dev Setup

1. Dependencies

This project uses Python and its dependencies are defined in pyproject.toml. You can install them using pip:

pip install .
# Or
uv sync

This will install mcp, google-generativeai, and other required packages.

2. API Key

You need a Google Gemini API key and ImgBB API key to use this server.

Access https://api.imgbb.com/ to generate a IMGBB API Key. This is used to store and host the image online.

  1. Create a file named .env in the root of the project.
  2. Add your API key to the .env file in the following format:
    GEMINI_API_KEY="YOUR_API_KEY_HERE"
    IMGBB_API_KEY="YOUR_API_KEY_HERE"

Running the Server

This server is designed to be run as a subprocess by an MCP client or using the mcp command-line tool. The server listens for requests on stdio.

uvx --from git+https://github.com/GuilhermeAumo/mcp-nano-banana mcp-nano-banana

Publishing new pipy version

To publish a new version of this package to PyPI:

  1. Update the version
    Edit the version field in pyproject.toml to the new version number.

  2. Build the package
    Run:

    uv build
    

    This will create .tar.gz and .whl files in the dist/ directory.

  3. Upload to PyPI

    uv publish
    
  4. Tag the release (optional but recommended)
    Commit the changes to github first, then:

    git tag v<new-version>
    git push --tags
    

Note:

  • You need a PyPI account and must be listed as a maintainer of the project.

For more details, see the Python Packaging User Guide.

Metadata

Release files for iflow-mcp_guilhermeaumo-mcp-nano-banana 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_guilhermeaumo-mcp-nano-banana 0.3.3
File Size Uploaded
iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_guilhermeaumo-mcp-nano-banana 0.3.3
File Interpreter ABI Platform
iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3.tar.gz

Download URL iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b48a43edda6b03f5e12d5c143d462631cce2935d3077172ea8f858cd94c5ace9
BLAKE2b-256 checksum
How to use checksums
8c84cb9e52b23b911d710eb7e401ee0a3c4c4c66bd594815386ea18952c2c8ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3-py3-none-any.whl

Download URL iflow_mcp_guilhermeaumo_mcp_nano_banana-0.3.3-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56252a817f0a2e7db21eaf417609acf9ff61e5a5efbb1ad5057b6e359364e3d4
BLAKE2b-256 checksum
How to use checksums
86d590b114a67a5c6590d6b55b700a6ece5545cf091a642cb6bc957a647b5874
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page