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:
- Sign up or log in
- Navigate to Nano Banana Images API
- 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 promptnanobanana_edit_imageEdit or combine images with AInanobanana_get_taskQuery a single task statusnanobanana_get_tasks_batchQuery multiple tasks at onceEnvironment Variables
ACEDATACLOUD_API_TOKENrequiredAPI token from AceDataCloud PlatformConfiguration
{
"mcpServers": {
"nanobanana": {
"command": "mcp-nanobanana-pro",
"env": {
"ACEDATACLOUD_API_TOKEN": "your_api_token_here"
}
}
}
}