MCP NanoBanana MCP Server

$pip install -e .
README.md

AI image generation and editing using Google's Nano Banana model

MCP NanoBanana

A Model Context Protocol (MCP) server for AI image generation and editing using Google's Nano Banana model through the AceDataCloud API.

Generate and edit AI images directly from Claude, VS Code, or any MCP-compatible client.

Features

  • Image Generation - Create high-quality images from text prompts
  • Image Editing - Modify existing images or combine multiple images
  • Virtual Try-On - Put clothing on people in photos
  • Product Placement - Place products in realistic scenes
  • Task Tracking - Monitor generation progress and retrieve results

Quick Start

1. Get API Token

Get your API token from AceDataCloud Platform:

  1. Sign up or log in
  2. Navigate to Nano Banana Images API
  3. Click "Acquire" to get your token

2. Install

# Clone the repository
git clone https://github.com/AceDataCloud/MCPNanoBanana.git
cd MCPNanoBanana

# Install with pip
pip install -e .

# Or with uv (recommended)
uv pip install -e .

3. Configure

# Copy example environment file
cp .env.example .env

# Edit with your API token
echo "ACEDATACLOUD_API_TOKEN=your_token_here" > .env

4. Run

# Run the server
mcp-nanobanana-pro

# Or with Python directly
python main.py

Claude Desktop Integration

Add to your Claude Desktop configuration:

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

{
  "mcpServers": {
    "nanobanana": {
      "command": "mcp-nanobanana-pro",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Or if using uv:

{
  "mcpServers": {
    "nanobanana": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/MCPNanoBanana", "mcp-nanobanana-pro"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Remote HTTP Mode (Hosted)

AceDataCloud hosts a managed MCP server that you can connect to directly — no local installation required.

Endpoint: https://nanobanana.mcp.acedata.cloud/mcp

All requests require a Bearer token in the Authorization header. Get your token from AceDataCloud Platform.

Claude Desktop (Remote)

{
  "mcpServers": {
    "nanobanana": {
      "type": "streamable-http",
      "url": "https://nanobanana.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer your_api_token_here"
      }
    }
  }
}

Cursor / VS Code

In your MCP client settings, add:

  • Type: streamable-http
  • URL: https://nanobanana.mcp.acedata.cloud/mcp
  • Headers: Authorization: Bearer your_api_token_here

cURL Test

# Health check (no auth required)
curl https://nanobanana.mcp.acedata.cloud/health

# MCP initialize (requires Bearer token)
curl -X POST https://nanobanana.mcp.acedata.cloud/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer your_api_token_here" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

Self-Hosting with Docker

docker pull ghcr.io/acedatacloud/mcp-nanobanana:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-nanobanana:latest

Clients connect with their own Bearer token — the server extracts the token from each request's Authorization header and uses it for upstream API calls.

Available Tools

Image Generation

Tool Description
nanobanana_generate_image Generate an image from a text prompt
nanobanana_edit_image Edit or combine images with AI

Tasks

Tool Description
nanobanana_get_task Query a single task status
nanobanana_get_tasks_batch Query multiple tasks at once

Usage Examples

Generate Image from Prompt

User: Create an image of a sunset over mountains

Claude: I'll generate that image for you.
[Calls nanobanana_generate_image with detailed prompt]

Virtual Try-On

User: Put this shirt on this model
[Provides two image URLs]

Claude: I'll combine these images.
[Calls nanobanana_edit_image with both image URLs]

Product Photography

User: Place this product in a modern kitchen scene
[Provides product image URL]

Claude: I'll create a

Tools (4)

nanobanana_generate_imageGenerate an image from a text prompt
nanobanana_edit_imageEdit or combine images with AI
nanobanana_get_taskQuery a single task status
nanobanana_get_tasks_batchQuery multiple tasks at once

Environment Variables

ACEDATACLOUD_API_TOKENrequiredAPI token from AceDataCloud Platform

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "nanobanana": {
      "command": "mcp-nanobanana-pro",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Try it

Create an image of a sunset over mountains
Put this shirt on this model using these two image URLs
Place this product in a modern kitchen scene
Check the status of my image generation task
Edit this image to add a futuristic city in the background

Frequently Asked Questions

What are the key features of MCP NanoBanana?

Image Generation - Create high-quality images from text prompts. Image Editing - Modify existing images or combine multiple images. Virtual Try-On - Put clothing on people in photos. Product Placement - Place products in realistic scenes. Task Tracking - Monitor generation progress and retrieve results.

What can I use MCP NanoBanana for?

E-commerce businesses performing virtual try-ons for clothing catalogs. Marketing teams creating realistic product placement shots in various environments. Content creators generating custom high-quality AI imagery from text prompts. Developers integrating Google's Nano Banana model into MCP-compatible workflows.

How do I install MCP NanoBanana?

Install MCP NanoBanana by running: pip install -e .

What MCP clients work with MCP NanoBanana?

MCP NanoBanana works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use MCP NanoBanana with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free