Integrating NanoBanana MCP with Codex CLI

📘 Complete guide: Use Ace Data Cloud MCP in Codex CLI →

A Gemini-based multimodal image model that excels at understanding complex instructions, making precise edits, and maintaining consistent characters. After connecting it to Codex CLI through MCP, you can invoke it directly in conversations without switching windows or copying and pasting.

Get an API Token

Log in to the application list, open the General Application, and click the copy button to the right of API KEY. See the complete guide for detailed steps.

Get an Ace Data Cloud API Key

Configuration

Edit the configuration: ~/.codex/config.toml

[mcp_servers.nanobanana]
url = "https://nanobanana.mcp.acedata.cloud/mcp"
type = "http"

http_headers = { "Authorization" = "Bearer 你的Token" }

After saving, the tools will load automatically when the next codex session starts.

Usage Examples

Use NanoBanana to generate an orange cat wearing a spacesuit and eating a hamburger on the moon

Turn this portrait photo (link xxx) into an ink wash painting, preserving the person's features

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

Tools

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