Gemini CLI Integration with NanoBanana MCP

📘 Complete Guide: Using Ace Data Cloud MCP in Gemini CLI →

Based on Gemini's multimodal image model, it excels at understanding complex instructions, fine editing, and coherent character portrayal. After integrating MCP with Gemini CLI, you can directly invoke it in conversations without switching windows or copying and pasting.

Obtain API Token

Register an account at the Ace Data Cloud platform and copy the API Token from the homepage—one Token is sufficient to use all MCP Servers. For detailed steps, see the Complete Guide.

Obtain Ace Data Cloud API Key

Configuration

Edit configuration: one-click addition via command line (recommended)

gemini mcp add nanobanana \
  --transport http \
  https://nanobanana.mcp.acedata.cloud/mcp \
  --header "Authorization: Bearer yourToken"

Or manually edit ~/.gemini/settings.json:

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

The tool will be available in the next gemini session.

Usage Examples

Generate an orange cat in a spacesuit eating a hamburger on the moon with NanoBanana.

Transform this portrait (link xxx) into an ink wash painting while retaining the character's features.

Generate a product image: a steaming cup of coffee, backlit, on a wooden table, with a film texture.

Tools

Tool Description
nano_banana_generate Text-to-image (nano-banana / 2 / pro)
nano_banana_edit Image editing