How to Use NanoBanana MCP in Claude Code for Terminal-Based Image Workflows

When you are already working inside Claude Code, switching to a separate image tool just to create a page illustration, clean up a screenshot, or combine two reference images breaks the flow. The NanoBanana MCP setup described here lets you keep that image workflow inside the terminal, where Claude Code can call the image tools directly from a natural-language request.
What you can do
The source documentation describes NanoBanana as an MCP server for image generation and image editing, backed by Google Gemini image understanding. In practical terms, that means you can ask Claude Code to do work such as:
- Generate a new illustration from text, for example a small dinosaur illustration for a 404 page.
- Edit an existing image, such as removing unwanted text from a screenshot and filling the background.
- Compose multiple images, such as taking an object from one image and placing it naturally into the scene of another image.
The documented tool list is intentionally small: nanobanana_generate_image for text-to-image generation, and nanobanana_edit_image for image editing with multi-image input support. That limited surface area is useful: most day-to-day image tasks become either “make a new image” or “change these image inputs.”
How it works
Claude Code connects to NanoBanana through an MCP server endpoint. Once the server is registered, Claude Code can route natural-language requests to the relevant NanoBanana tool. The documented endpoint is:
https://nanobanana.mcp.acedata.cloud/mcp
The MCP server is added with claude mcp add, using HTTP transport and an authorization header. The important detail in the documentation is that -H must be uppercase. Lowercase -h is interpreted as --help, not as a header flag.
Configure NanoBanana in Claude Code
Run the documented command in your terminal, replacing the token placeholder with your Ace Data Cloud API token:
claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_TOKEN"
If you omit a scope flag, Claude Code uses the default local scope, which only applies in the directory where you run the command. The documentation also describes two explicit scopes that are worth choosing deliberately:
local: no-sflag, or-s local. The config is stored in~/.claude.jsonand applies to the current project directory.user: use-s user. The config is stored in~/.claude.jsonand is available across all projects.project: use-s project. The config is written to.mcp.jsonin the project root, so it can be shared with a team.
For a personal setup, -s user is convenient. For a team repository, -s project makes the integration visible to collaborators. The documentation warns not to commit real tokens to public repositories; use environment-variable placeholders instead.
Verify the connection before asking for images
After adding the server, verify that Claude Code can see it:
claude mcp list
The expected result is that nanobanana appears as connected. This small check saves time: if the MCP server is not connected, your image request will fail before it reaches the actual generation or editing step.
Use case 1: generate a page illustration
For UI and web projects, the fastest win is usually a simple illustration that matches the state of the page. In a Claude Code session, you can ask for something like:
Generate an illustration of a small dinosaur crouching next to a crack in the ground looking down, for use on a 404 page
Claude Code can route this to nanobanana_generate_image. The value is not just the generated image; it is that the prompt can be written while you are already editing the page that will use it.
Use case 2: edit a screenshot without leaving the terminal
The documentation gives a common editing case: removing unwanted text from an image and filling the background. A request can be phrased naturally:
Edit this image to remove the text watermark in the bottom right corner, filling the background
This maps to nanobanana_edit_image. For builders, this is useful for documentation screenshots, landing-page mockups, and quick internal assets where opening a full design tool would be slower than describing the edit.
Use case 3: compose multiple reference images
The more interesting workflow is multi-image composition. The documentation notes that nanobanana_edit_image supports multiple image URLs as input, and that Gemini can understand relationships between images. A practical request might be:
Put the phone from the first image onto the desk in the second image, adjusting angle and lighting to make it look natural
This is the kind of task where image understanding matters. You are not only applying a filter; you are asking the model to identify an object, understand a target scene, and blend the result with plausible angle and lighting.
A simple builder workflow
- Add the NanoBanana MCP server with
claude mcp add nanobanana. - Choose the right scope:
userfor your own machine,projectfor a shared repo. - Run
claude mcp listand confirm thatnanobananais connected. - Ask Claude Code for either a new image or an edit to one or more image URLs.
- Use the output directly in your documentation, UI prototype, or content workflow.
That is the main reason this integration is useful: it turns image generation and editing into part of the same terminal loop where you already plan, code, and revise.
If you want the exact setup reference, read the original Ace Data Cloud documentation for Claude Code integration with NanoBanana MCP.
Comments
Post a Comment