How to Use NanoBanana MCP from Claude Code for Terminal-Based Image Editing

If your development workflow keeps jumping from terminal to browser just to prepare visuals, a hosted MCP image tool can keep more of that work inside Claude Code.
What you can do
The NanoBanana MCP integration for Claude Code is aimed at practical image tasks that benefit from image understanding, not just text-to-image generation. According to the Ace Data Cloud document, NanoBanana uses Google's Gemini model at its core, which makes it useful when the task depends on understanding relationships between images.
In a Claude Code session, the documented tools are:
nanobanana_generate_imagefor text-to-image generation.nanobanana_edit_imagefor image editing, including multiple image inputs.
That means you can ask Claude Code to generate a page illustration, remove unwanted text from an image, or combine multiple source images into a new composition while staying in the same terminal-driven workflow.
How it works
The integration uses a remote MCP Server hosted at https://nanobanana.mcp.acedata.cloud/mcp. Claude Code connects to that server over HTTP and sends an authorization header containing your Ace Data Cloud API token.
The important detail is that you are not installing an image model locally. You are adding an MCP server configuration to Claude Code, then letting Claude Code call the exposed tools when your natural-language request needs image generation or editing.
The document describes three configuration scopes: local, user, and project. Choosing the right one matters because it controls where Claude Code writes the MCP configuration and who can reuse it.
Start with a local project configuration
For a first test, use -s local. This binds the configuration to the project directory where you run the command. The documentation says Claude Code writes the record into the local ~/.claude.json, together with the current project path.
Use this when you want to confirm the handshake, try a few prompts, and avoid affecting every Claude Code project on your machine.
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s local
One small but easy-to-miss detail from the document: -H must be uppercase. The lowercase -h is interpreted as --help, so it will not set your authorization header.
Use user or project scope when the workflow is stable
Once the integration is part of your regular workflow, the documented user scope makes NanoBanana MCP available across projects opened with Claude Code:
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s user
For team projects, the document also supports -s project. This writes configuration into .mcp.json in the current project root. That can be useful for private repositories where teammates should share the same MCP server definition.
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s project
Do not commit a real token to a public repository. The document recommends using a placeholder such as YOUR_ACEDATACLOUD_API_KEY in examples, or having each person add their token locally. When Claude Code reads a project-level configuration for the first time, it may show Pending approval; approving trust for that project configuration is expected behavior.
Verify the MCP connection
After adding the server, verify the connection before trying an image task:
claude mcp list
If nanobanana shows ✓ Connected, the handshake is working. If it does not, check the token, the service URL, and the scope you used. The source document explicitly warns against relying on old client versions or fixed historical tool counts to judge the current status.
Try image editing prompts that need visual understanding
The most useful first test is not a generic poster prompt. Try something where the model needs to understand source images. For example, the document gives this style of composition request:
Place the phone from the first image onto the desk in the second image, adjusting the angle and lighting to make it look natural.
That is the kind of task where multi-image input matters: one image provides the object, another provides the scene, and nanobanana_edit_image handles the edit.
For cleanup work, you can ask Claude Code to remove unwanted text from an image:
Edit this image to remove the text watermark in the lower right corner, filling it with the background.
And for product or documentation pages, you can generate a small illustration directly from the terminal:
Generate an illustration of a small dinosaur squatting next to a crack in the ground looking down, to be used for a 404 page.
A practical workflow for builders
A simple workflow is: configure with -s local, run claude mcp list, test one image-generation prompt, then test one multi-image edit. If the results are useful across projects, re-add the same server with -s user. If the workflow belongs to a shared private repo, move to -s project and keep the real token out of committed files.
This keeps the product surface area small: Claude Code remains your working environment, while NanoBanana MCP becomes a callable image tool for the moments when code, docs, or product pages need visual assets.
Read the full source document here: Claude Code with Nano Banana MCP.
Comments
Post a Comment