Skip to main content

Banana MCP - Gemini 2.5 Flash image generation server

Project description

Gemini MCP

A Model Context Protocol (MCP) server for generating images using Gemini 2.5 Flash.

Features

  • 🎨 Generate images using Gemini 2.5 Flash model
  • 🚀 Easy installation with uvx gemini-mcp
  • 🔧 Compatible with Claude, Cursor, and other MCP clients
  • 🛡️ Secure API key handling via environment variables
  • ⚡ Fast streaming responses

Installation

Using uvx (recommended)

uvx gemini-mcp

Using pip

pip install gemini-mcp

Usage

As MCP Server

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "gemini": {
      "command": "uvx",
      "args": ["gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Command Line

# Set your API key
export GEMINI_API_KEY="your-api-key-here"

# Run the MCP server
gemini-mcp

Configuration

Environment Variables

  • GEMINI_API_KEY: Your API key for the tu-zi.com service (required)

API Key

You can obtain an API key from tu-zi.com. The key should have access to the gemini-2.5-flash-image model.

Tools

generate_image

Generate an image from a text prompt using Gemini 2.5 Flash.

Parameters:

  • prompt (string, required): Detailed description of the image to generate
  • api_key (string, optional): API key override (uses environment variable if not provided)

Example:

{
  "name": "generate_image",
  "arguments": {
    "prompt": "A cute orange cat sitting under a cherry blossom tree, anime style, soft lighting"
  }
}

Examples

Using with Claude

Please use the generate_image tool to create a picture of a futuristic city at night with neon lights and flying cars.

Using with Cursor

Generate an image: minimalist office design with natural lighting and plants

Development

Local Development

git clone https://github.com/yourusername/gemini-mcp
cd gemini-mcp
pip install -e .

Testing

# Test the server
python -m gemini_mcp.server

# Or use the command directly
gemini-mcp

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

banana_mcp-1.0.3.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

banana_mcp-1.0.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file banana_mcp-1.0.3.tar.gz.

File metadata

  • Download URL: banana_mcp-1.0.3.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for banana_mcp-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4c79e0b4096c2ff8f7eb5aa40b535dc561e157e7d980cfe7b3c816fc26da1341
MD5 8d485f85d64a65e1ce3be41aede78dbf
BLAKE2b-256 ba1b9b53032fb4b8902c3268935cf97d64d4e588b5205854a6e18339e33f8e4a

See more details on using hashes here.

File details

Details for the file banana_mcp-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: banana_mcp-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for banana_mcp-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b451ebfd7a753cf95cb56266fd0c0969117dfa45a7b0006a118d8ded23cdba8
MD5 096c2daba13d609ea64cfafb2b1eceb5
BLAKE2b-256 fcf2938ab8a389af68f8fdbd492b9f6dcab2590382b962a0c89cb74083f0cc65

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