Skip to main content
Glama

nanobanana-mcp-server

by zhongweili

Nano Banana MCP Server 🍌

A production-ready Model Context Protocol (MCP) server that provides AI-powered image generation capabilities through Google's Gemini 2.5 Flash Image model.

✨ Features

  • 🎨 AI Image Generation: Create high-quality images from detailed text prompts
  • 📋 Smart Templates: Pre-built prompt templates for photography, design, and editing
  • 📁 File Management: Upload and manage files via Gemini Files API
  • 🔍 Resource Discovery: Browse templates and file metadata through MCP resources
  • 🛡️ Production Ready: Comprehensive error handling, logging, and validation
  • High Performance: Optimized architecture with intelligent caching

🚀 Quick Start

Prerequisites

  1. Google Gemini API Key - Get one free here
  2. Python 3.11+ (for development only)

Installation

Install the package using uvx (recommended) or pip:

# Using uvx (recommended - no Python environment needed) uvx nanobanana-mcp-server@latest # Using pip pip install nanobanana-mcp-server

🔧 Configuration

Claude Desktop

Add to your claude_desktop_config.json:

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

Configuration file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Claude Code (VS Code Extension)

Install and configure in VS Code:

  1. Install the Claude Code extension
  2. Open Command Palette (Cmd/Ctrl + Shift + P)
  3. Run "Claude Code: Add MCP Server"
  4. Configure:
    { "name": "nanobanana", "command": "uvx", "args": ["nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } }

Cursor

Add to Cursor's MCP configuration:

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

Continue.dev (VS Code/JetBrains)

Add to your config.json:

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

Open WebUI

Configure in Open WebUI settings:

{ "mcp_servers": { "nanobanana": { "command": ["uvx", "nanobanana-mcp-server@latest"], "env": { "GEMINI_API_KEY": "your-gemini-api-key-here" } } } }

Gemini CLI / Generic MCP Client

# Set environment variable export GEMINI_API_KEY="your-gemini-api-key-here" # Run server in stdio mode uvx nanobanana-mcp-server@latest # Or with pip installation python -m nanobanana_mcp_server.server

⚙️ Environment Variables

Optional configuration:

# Required GEMINI_API_KEY=your-gemini-api-key-here # Optional IMAGE_OUTPUT_DIR=/path/to/image/directory # Default: ~/nanobanana-images LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR LOG_FORMAT=standard # standard, json, detailed

🐛 Troubleshooting

Common Issues

"GEMINI_API_KEY not set"

  • Add your API key to the MCP server configuration in your client
  • Get a free API key at Google AI Studio

"Server failed to start"

  • Ensure you're using the latest version: uvx nanobanana-mcp-server@latest
  • Check that your client supports MCP (Claude Desktop 0.10.0+)

"Permission denied" errors

  • The server creates images in ~/nanobanana-images by default
  • Ensure write permissions to your home directory

Development Setup

For local development:

# Clone repository git clone https://github.com/zhongweili/nanobanana-mcp-server.git cd nanobanana-mcp-server # Install with uv uv sync # Set environment export GEMINI_API_KEY=your-api-key-here # Run locally uv run python -m nanobanana_mcp_server.server

📄 License

MIT License - see LICENSE for details.

🆘 Support

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A MCP server that provides AI-powered image generation capabilities through Google's Gemini 2.5 Flash Image model.

  1. ✨ Features
    1. 🚀 Quick Start
      1. Prerequisites
      2. Installation
    2. 🔧 Configuration
      1. Claude Desktop
      2. Claude Code (VS Code Extension)
      3. Cursor
      4. Continue.dev (VS Code/JetBrains)
      5. Open WebUI
      6. Gemini CLI / Generic MCP Client
    3. ⚙️ Environment Variables
      1. 🐛 Troubleshooting
        1. Common Issues
        2. Development Setup
      2. 📄 License
        1. 🆘 Support

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.
            Last updated -
            13
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            A server that provides access to Google Gemini AI capabilities including text generation, image analysis, YouTube video analysis, and web search functionality through the MCP protocol.
            Last updated -
            6
            2
            4
            • Apple
          • A
            security
            A
            license
            A
            quality
            A dedicated server that wraps Google's Gemini AI models in a Model Context Protocol (MCP) interface, allowing other LLMs and MCP-compatible systems to access Gemini's capabilities like content generation, function calling, chat, and file handling through standardized tools.
            Last updated -
            16
            30
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            An MCP server that enables other AI models (like Claude) to use Google's Gemini models as tools for specific tasks through a standardized interface.
            Last updated -
            1
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhongweili/nanobanana-mcp-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server