How to Use NanoBanana MCP in Claude Code for Practical Image Editing Workflows

Image work often becomes the awkward step in a developer workflow: you are already in the terminal writing docs, release notes, landing pages, or UI states, but editing a product image still sends you out to a browser and a separate tool. NanoBanana MCP gives Claude Code a way to call image generation and multi-image editing from the same terminal session.
What you can do
The Ace Data Cloud document describes NanoBanana as an MCP server for image generation, image editing, and image composition inside Claude Code. The interesting part is not only text-to-image generation, but image understanding: you can pass multiple image URLs and ask the model to reason about how objects, scenes, lighting, and layout should relate to each other.
In practical terms, this is useful when you want to:
- compose two images, such as placing an object from one image into the scene of another;
- remove unwanted text or a watermark-like visual element from a screenshot by filling the background;
- generate small page illustrations, such as a 404 page graphic, without leaving Claude Code;
- keep image tasks near the README, docs, or code changes that motivated them.
The documented tools exposed by the MCP server are nanobanana_generate_image for text-to-image generation and nanobanana_edit_image for image editing with support for multiple image inputs.
How it works
Claude Code can connect to an MCP server over HTTP. For NanoBanana, the server URL in the documentation is:
https://nanobanana.mcp.acedata.cloud/mcp
Authentication is provided through an HTTP header. The docs explicitly call out that -H must be uppercase in the Claude Code command, because lowercase -h means --help. The token should be kept out of public repositories, issues, screenshots, and chat logs; use a placeholder such as YOUR_ACEDATACLOUD_API_KEY in examples.
Choose the right configuration scope
The same server can be added at three scopes. The choice matters because it controls where Claude Code writes the configuration and who can reuse it.
Local scope for one project
Use -s local when you want to try NanoBanana only in the current project directory. The document says Claude Code writes this into the local ~/.claude.json together with the current project path.
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s local
User scope for repeated use
If you expect to use image editing across several repositories, use -s user. The document describes this as a user-level configuration in ~/.claude.json, so future projects opened with Claude Code can see the server.
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s user
Project scope for a team repository
Use -s project when a private project should carry the MCP configuration for teammates. The configuration is written into .mcp.json in the project root. The important operational rule is to avoid committing a real token to a public repository; keep only placeholders or ask each teammate to add credentials locally.
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s project
When Claude Code reads a project-level MCP configuration for the first time, it may show Pending approval. That is expected: you need to confirm trust for that project configuration inside the Claude Code session.
Verify the connection before asking for images
After adding the server, verify the handshake before you start debugging prompts. Run:
claude mcp list
If nanobanana shows ✓ Connected, the server is reachable. If it does not, the document recommends checking the token, the service URL, and the configuration scope. Avoid relying on old client screenshots or fixed tool counts; the current connection state is what matters.
Practical workflows to try
A good first task is image composition. In Claude Code, you can describe the relationship between two images rather than manually explaining layers. The documentation gives this style of 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.
For documentation cleanup, try an edit request that removes unwanted text from an image while preserving the background:
Edit this image to remove the text watermark in the lower right corner, filling it with the background.
For product pages or error states, you can also ask for 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.
The builder-friendly pattern is simple: keep the visual task next to the code or docs task that created it. If you are updating a README, Claude Code can understand the surrounding context, call nanobanana_generate_image or nanobanana_edit_image, then help you place the resulting asset in the right documentation section.
Where this fits
NanoBanana MCP is most useful when image work is part of a development loop rather than a standalone design session. You still need to review the output like any other generated artifact, but you no longer have to break context just to request a composition, cleanup, or small illustration.
For the original setup details, scopes, verification command, and documented tool names, read the Ace Data Cloud guide: Claude Code with Nano Banana MCP.
Comments
Post a Comment