Skip to main content

Um servidor MCP que gera imagens usando a Google Gemini API.

Project description

MCP Image Generator

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": [
            "--from",
            "git+https://github.com/GuilhermeAumo/mcp-nano-banana",
            "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 .

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

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

mcp_nano_banana-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

mcp_nano_banana-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_nano_banana-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_nano_banana-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for mcp_nano_banana-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df7950aa578d08f105a71a99967049e8e131b1bff71f160b2cfc0778b83765d7
MD5 6250af779a6c5d91c3fb239d9eaf2f10
BLAKE2b-256 ab55b80fce118f6c8036e0f612cf4702189f0f5c89a8371b1c6f62817ab878ef

See more details on using hashes here.

File details

Details for the file mcp_nano_banana-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_nano_banana-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 620fea2d389f4f85cac739f416efdc9e448cabb0f73f2e36c3006b1c92902aef
MD5 0f93422d2ab23785256b8fcf31f370f8
BLAKE2b-256 cf731d20db862afcd42f7a3384b590aab6d87dd26ac17ec7d46f269982793f53

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