MCP Nano Banana
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.
- Create a file named
.envin the root of the project. - Add your API key to the
.envfile 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:
-
Update the version
Edit theversionfield inpyproject.tomlto the new version number. -
Build the package
Run:uv buildThis will create
.tar.gzand.whlfiles in thedist/directory. -
Upload to PyPI
uv publish -
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 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_nano_banana-0.3.3.tar.gz | 9.1 kB | Without provenance | Details for mcp_nano_banana-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_nano_banana-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for mcp_nano_banana-0.3.3-py3-none-any.whl |
Total release size: 18.0 kB
Release files / mcp_nano_banana-0.3.3.tar.gz
| Download URL | mcp_nano_banana-0.3.3.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
522da4f10eec9fd627d4f87034aeba3e95fb7d5f97f5eee0e81ab38c16eb8910
|
|
BLAKE2b-256 checksum How to use checksums |
cffdf88bc2034d7c2b4a5f3e045fa9f37a4e70fcd0b32223ec4ecd719ad50ee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.04","id":"plucky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcp_nano_banana-0.3.3-py3-none-any.whl
| Download URL | mcp_nano_banana-0.3.3-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8da7bdff09666bbcbe1817202f6bc38fe83b6b256cdd361a9944d27797741cca
|
|
BLAKE2b-256 checksum How to use checksums |
f3a18b4db0d3321eaab681cb5894d55ca986adb09fda3b20b1e2bd5a2afd9e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.04","id":"plucky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mcp-nano-banana 0.3.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.