Skip to main content
Glama

NanoBananaMCP

PyPI version PyPI downloads Python 3.10+ License: MIT MCP

Ein Model Context Protocol (MCP)-Server für KI-Bildgenerierung und -bearbeitung unter Verwendung von Googles Nano Banana-Modell über die AceDataCloud-API.

Generieren und bearbeiten Sie KI-Bilder direkt aus Claude, VS Code oder jedem anderen MCP-kompatiblen Client.

Funktionen

  • Bildgenerierung - Erstellen Sie hochwertige Bilder aus Text-Prompts

  • Bildbearbeitung - Ändern Sie vorhandene Bilder oder kombinieren Sie mehrere Bilder

  • Virtuelle Anprobe - Kleiden Sie Personen auf Fotos virtuell ein

  • Produktplatzierung - Platzieren Sie Produkte in realistischen Szenen

  • Aufgabenverfolgung - Überwachen Sie den Fortschritt der Generierung und rufen Sie Ergebnisse ab

Related MCP server: MCP Banana Image

Tool-Referenz

Tool

Beschreibung

nanobanana_generate_image

Generiert ein KI-Bild aus einem Text-Prompt unter Verwendung von Googles Nano Banana-Modell.

nanobanana_edit_image

Bearbeitet oder kombiniert Bilder mithilfe von KI basierend auf einem Text-Prompt.

nanobanana_get_task

Fragt den Status und das Ergebnis einer Bildgenerierungs- oder Bearbeitungsaufgabe ab.

nanobanana_get_tasks_batch

Fragt mehrere Bildgenerierungs-/Bearbeitungsaufgaben gleichzeitig ab.

Schnellstart

1. API-Token abrufen

  1. Registrieren Sie sich auf der AceDataCloud-Plattform

  2. Gehen Sie zur API-Dokumentationsseite

  3. Klicken Sie auf "Acquire", um Ihr API-Token zu erhalten

  4. Kopieren Sie das Token für die unten stehende Verwendung

2. Den gehosteten Server verwenden (Empfohlen)

AceDataCloud hostet einen verwalteten MCP-Server – keine lokale Installation erforderlich.

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

Alle Anfragen erfordern ein Bearer-Token. Verwenden Sie das API-Token aus Schritt 1.

Claude.ai

Verbinden Sie sich direkt auf Claude.ai mit OAuth – kein API-Token erforderlich:

  1. Gehen Sie in Claude.ai zu Einstellungen → Integrationen → Mehr hinzufügen

  2. Geben Sie die Server-URL ein: https://nanobanana.mcp.acedata.cloud/mcp

  3. Schließen Sie den OAuth-Anmeldevorgang ab

  4. Beginnen Sie mit der Nutzung der Tools in Ihrer Konversation

Claude Desktop

Fügen Sie dies Ihrer Konfiguration hinzu (~/Library/Application Support/Claude/claude_desktop_config.json unter macOS):

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

Cursor / Windsurf

Fügen Sie dies Ihrer MCP-Konfiguration hinzu (.cursor/mcp.json oder .windsurf/mcp.json):

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

VS Code (Copilot)

Fügen Sie dies Ihrer VS Code MCP-Konfiguration hinzu (.vscode/mcp.json):

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

Oder installieren Sie die Ace Data Cloud MCP-Erweiterung für VS Code, die alle 15 MCP-Server mit einer Ein-Klick-Einrichtung bündelt.

JetBrains IDEs

  1. Gehen Sie zu Einstellungen → Tools → AI Assistant → Model Context Protocol (MCP)

  2. Klicken Sie auf Hinzufügen → HTTP

  3. Einfügen:

{
  "mcpServers": {
    "nanobanana": {
      "url": "https://nanobanana.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Claude Code

Claude Code unterstützt MCP-Server nativ:

claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp \
  -h "Authorization: Bearer YOUR_API_TOKEN"

Oder fügen Sie es der .mcp.json Ihres Projekts hinzu:

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

Cline

Fügen Sie dies den MCP-Einstellungen von Cline hinzu (.cline/mcp_settings.json):

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

Amazon Q Developer

Fügen Sie dies Ihrer MCP-Konfiguration hinzu:

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

Roo Code

Fügen Sie dies den MCP-Einstellungen von Roo Code hinzu:

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

Continue.dev

Fügen Sie dies der .continue/config.yaml hinzu:

mcpServers:
  - name: nanobanana
    type: streamable-http
    url: https://nanobanana.mcp.acedata.cloud/mcp
    headers:
      Authorization: "Bearer YOUR_API_TOKEN"

Zed

Fügen Sie dies den Einstellungen von Zed hinzu (~/.config/zed/settings.json):

{
  "language_models": {
    "mcp_servers": {
      "nanobanana": {
        "url": "https://nanobanana.mcp.acedata.cloud/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  }
}

cURL-Test

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

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

3. Oder lokal ausführen (Alternative)

Wenn Sie den Server lieber auf Ihrem eigenen Rechner ausführen möchten:

# Install from PyPI
pip install mcp-nanobanana-pro
# or
uvx mcp-nanobanana-pro

# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"

# Run (stdio mode for Claude Desktop / local clients)
mcp-nanobanana-pro

# Run (HTTP mode for remote access)
mcp-nanobanana-pro --transport http --port 8000

Claude Desktop (Lokal)

{
  "mcpServers": {
    "nanobanana": {
      "command": "uvx",
      "args": ["mcp-nanobanana-pro"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_token_here"
      }
    }
  }
}

Docker (Self-Hosting)

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

Clients verbinden sich mit ihrem eigenen Bearer-Token – der Server extrahiert das Token aus dem Authorization-Header jeder Anfrage.

Verfügbare Tools

Bildgenerierung

Tool

Beschreibung

nanobanana_generate_image

Generiert ein Bild aus einem Text-Prompt

nanobanana_edit_image

Bearbeitet oder kombiniert Bilder mit KI

Aufgaben

Tool

Beschreibung

nanobanana_get_task

Fragt den Status einer einzelnen Aufgabe ab

nanobanana_get_tasks_batch

Fragt mehrere Aufgaben gleichzeitig ab

Anwendungsbeispiele

Bild aus Prompt generieren

User: Create an image of a sunset over mountains

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

Virtuelle Anprobe

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]

Produktfotografie

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

Claude: I'll create a product scene for you.
[Calls nanobanana_edit_image with scene description]

Tipps zum Schreiben von Prompts

Für beste Ergebnisse sollten Sie diese Elemente in Ihre Prompts aufnehmen:

  • Hauptmotiv: Was ist der primäre Fokus?

  • Atmosphäre: Welche Stimmung soll das Bild vermitteln?

  • Beleuchtung: Wie ist die Szene beleuchtet?

  • Kamera/Objektiv: Welcher fotografische Stil? (85mm Porträt, Weitwinkel, etc.)

  • Qualitäts-Keywords: Technische Deskriptoren (Bokeh, Filmkorn, HDR, etc.)

Beispiel-Prompt

A photorealistic close-up portrait of an elderly Japanese ceramicist
with deep wrinkles and a warm smile. Soft golden hour light streaming
through a window. Captured with an 85mm portrait lens, soft bokeh
background. Serene and masterful mood.

Konfiguration

Umgebungsvariablen

Variable

Beschreibung

Standardwert

ACEDATACLOUD_API_TOKEN

API-Token von AceDataCloud

Erforderlich

ACEDATACLOUD_API_BASE_URL

API-Basis-URL

https://api.acedata.cloud

ACEDATACLOUD_OAUTH_CLIENT_ID

OAuth-Client-ID (gehosteter Modus)

—

ACEDATACLOUD_PLATFORM_BASE_URL

Plattform-Basis-URL

https://platform.acedata.cloud

NANOBANANA_REQUEST_TIMEOUT

Anfrage-Timeout in Sekunden

1800

LOG_LEVEL

Logging-Level

INFO

Befehlszeilenoptionen

mcp-nanobanana-pro --help

Options:
  --version          Show version
  --transport        Transport mode: stdio (default) or http
  --port             Port for HTTP transport (default: 8000)

Entwicklung

Entwicklungsumgebung einrichten

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

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install with dev dependencies
pip install -e ".[dev,test]"

Tests ausführen

# Run unit tests
pytest

# Run with coverage
pytest --cov=core --cov=tools

# Run integration tests (requires API token)
pytest tests/test_integration.py -m integration

Code-Qualität

# Format code
ruff format .

# Lint code
ruff check .

# Type check
mypy core tools

Erstellen & Veröffentlichen

# Install build dependencies
pip install -e ".[release]"

# Build package
python -m build

# Upload to PyPI
twine upload dist/*

Projektstruktur

NanoBanana/
├── core/                   # Core modules
│   ├── __init__.py
│   ├── client.py          # HTTP client for NanoBanana API
│   ├── config.py          # Configuration management
│   ├── exceptions.py      # Custom exceptions
│   ├── server.py          # MCP server initialization
│   ├── types.py           # Type definitions
│   └── utils.py           # Utility functions
├── tools/                  # MCP tool definitions
│   ├── __init__.py
│   ├── image_tools.py     # Image generation/editing tools
│   └── task_tools.py      # Task query tools
├── prompts/                # MCP prompt templates
│   └── __init__.py
├── tests/                  # Test suite
├── deploy/                 # Deployment configs
│   └── production/
│       ├── deployment.yaml
│       ├── ingress.yaml
│       └── service.yaml
├── .env.example           # Environment template
├── .gitignore
├── Dockerfile             # Docker image for HTTP mode
├── docker-compose.yaml    # Docker Compose config
├── LICENSE
├── main.py                # Entry point
├── pyproject.toml         # Project configuration
└── README.md

API-Referenz

Dieser Server kapselt die AceDataCloud NanoBanana API:

Anwendungsfälle

  • Porträtverbesserung - Probieren Sie verschiedene Kleidung an derselben Person aus

  • Produkt-Szenenkomposition - Platzieren Sie Produkte mit weißem Hintergrund in realistischen Umgebungen

  • Attributersetzung - Ändern Sie Materialien, Farben oder Varianten

  • Schnelle Posterbearbeitung - Ändern Sie schnell Stile oder Themen

  • 2D-zu-3D-Konvertierung - Konvertieren Sie Bilder in 3D-Produkt-Mockups

  • Bildrestaurierung - Restaurieren Sie alte oder beschädigte Fotos

Mitwirken

Beiträge sind willkommen! Bitte:

  1. Forken Sie das Repository

  2. Erstellen Sie einen Feature-Branch (git checkout -b feature/amazing)

  3. Committen Sie Ihre Änderungen (git commit -m 'Add amazing feature')

  4. Pushen Sie auf den Branch (git push origin feature/amazing)

  5. Öffnen Sie einen Pull Request

Lizenz

MIT-Lizenz - siehe LICENSE für Details.


Mit Liebe gemacht von AceDataCloud

Available Tools

4 tools
nanobanana_edit_imageAInspect

Edit or combine images using AI based on a text prompt.

This allows you to modify existing images or combine multiple images together.
Perfect for virtual try-on, product placement, image enhancement, and more.

Use this when:
- You want to combine multiple images (e.g., person + clothing)
- You want to modify an existing image
- You need virtual try-on (putting clothes on a person)
- You want to place products in different scenes
- You need to change attributes (materials, colors, styles)

Common use cases:
- Portrait replacement: Try different clothing on same person
- Product scene composition: Place products in realistic environments
- Attribute replacement: Change materials, colors, or variants
- Poster editing: Rapidly change styles or themes
- 2D to 3D conversion: Convert images to 3D product mockups
- Image restoration: Restore old or damaged photos

Returns:
    Task ID, trace ID, and edited image URL.

Inputs: prompt (required), image_urls (required), callback_url. Returns: result

nanobanana_generate_imageAInspect

Generate an AI image from a text prompt using Google's Nano Banana model.

This creates high-quality images from detailed text descriptions. The more
descriptive your prompt, the better the results.

Use this when:
- You want to generate a new image from scratch
- You have a detailed description of the desired image
- You need photorealistic or artistic image generation

Prompt writing tips:
- Include: Main subject + Atmosphere + Lighting + Camera/Lens + Quality keywords
- Example: "Urban career woman, backlit sunlight, film grain, orange-gold tones, hopeful dawn"

Returns:
    Task ID, trace ID, and generated image URL.

Inputs: prompt (required), callback_url. Returns: result

nanobanana_get_taskAInspect

Query the status and result of an image generation or edit task.

Use this to check if a generation/edit is complete and retrieve the resulting
image URLs and metadata.

Use this when:
- You want to check if an image generation has completed
- You need to retrieve image URLs from a previous generation
- You want to get the full details of a generated/edited image

Returns:
    Task status and image information including URLs and prompts.

Inputs: task_id (required). Returns: result

nanobanana_get_tasks_batchAInspect

Query multiple image generation/edit tasks at once.

Efficiently check the status of multiple tasks in a single request.
More efficient than calling nanobanana_get_task multiple times.

Use this when:
- You have multiple pending generations to check
- You want to get status of several images at once
- You're tracking a batch of generations

Returns:
    Status and image information for all queried tasks.

Inputs: task_ids (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: generate_image creates new images from prompts, edit_image modifies or combines existing images, get_task retrieves single task results, and get_tasks_batch retrieves multiple task results. The descriptions reinforce these distinct roles, making tool selection unambiguous.

    Naming Consistency5/5

    All tools follow a consistent snake_case pattern with the prefix 'nanobanana_' followed by a clear verb_noun combination (edit_image, generate_image, get_task, get_tasks_batch). The naming convention is perfectly uniform across all four tools, making them predictable and easy to understand.

    Tool Count5/5

    Four tools is well-scoped for an image generation/editing server, covering core operations: generation, editing, and status retrieval (both single and batch). Each tool earns its place without redundancy, providing a complete yet manageable surface for the domain.

    Completeness4/5

    The tool set covers the essential lifecycle of image tasks: create (generate_image), modify (edit_image), and retrieve results (get_task and get_tasks_batch). A minor gap exists in lacking explicit deletion or management tools for tasks, but agents can work around this as the core workflows are fully supported.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers