Codex CLI Integration with NanoBanana MCP
📘 Complete Guide: Use Ace Data Cloud MCP in Codex CLI →
Based on Gemini’s multimodal image model, it excels at understanding complex instructions, precise editing, and coherent, consistent characters. After connecting to Codex CLI through MCP, you can call it directly in the conversation without switching windows or copying and pasting.
¶ Get API Token
Register an account on the Ace Data Cloud platform, and copy the API Token from the homepage—one Token is enough to use all MCP Servers. For detailed steps, see the Complete Guide.

¶ 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 be automatically loaded the next time a 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 while preserving the person’s features
Generate a product image: a steaming cup of coffee, backlit, wooden table, film texture
¶ Tools
| Tool | Description |
|---|---|
| nano_banana_generate | Text-to-image (nano-banana / 2 / pro) |
| nano_banana_edit | Image editing |
