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

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

When an image task is part of a coding workflow, switching from terminal to browser to design tool breaks momentum. The Claude Code + NanoBanana MCP setup gives you a practical way to ask for image generation or image edits from the same terminal session where you are already building.

What you can do

NanoBanana MCP is useful when image work is close to development work: documentation illustrations, landing-page placeholders, product screenshots, UI assets, or quick visual experiments. The documented integration exposes two tools inside Claude Code:

  • nanobanana_generate_image for text-to-image generation.
  • nanobanana_edit_image for image editing, including workflows that use multiple image URLs as input.

The interesting part is not only generation. The guide describes NanoBanana as an image model with strong image comprehension, so you can ask it to understand relationships between images. For example, you can provide two images and ask it to place an object from one image into the scene of another while adjusting angle and lighting.

How it works

Claude Code can connect to external tools through MCP. In this setup, Claude Code talks to the NanoBanana MCP server over HTTP at https://nanobanana.mcp.acedata.cloud/mcp. Once connected, you can stay inside Claude Code and describe the image operation in natural language.

The documented command is a standard Claude Code MCP registration command. Replace YOUR_TOKEN with your Ace Data Cloud API token:

claude mcp add nanobanana --transport http https://nanobanana.mcp.acedata.cloud/mcp   -H "Authorization: Bearer YOUR_TOKEN"

One small but important detail: the header flag must be uppercase -H. Lowercase -h is interpreted as help, not as an HTTP header parameter.

Choose the right MCP scope

Claude Code supports different scopes for MCP configuration. If you omit -s, the default scope is local, which only applies in the directory where you run the command. That is fine for a quick trial, but it is not always what you want for a real project.

  • local: no -s or -s local; stored in ~/.claude.json; effective only for the current project directory.
  • user: use -s user; stored in ~/.claude.json; available globally across projects.
  • project: use -s project; stored in .mcp.json in the project root; can be shared with a team.

For a personal machine, -s user is often the simplest. For a team project, -s project makes the dependency visible in the repository. If you use project scope, do not commit real tokens to a public repo. Use an environment variable placeholder such as ${ENV_VAR} and let each developer provide their own secret locally.

Verify the connection

After adding the server, run:

claude mcp list

The documented success state is that nanobanana appears with ✓ Connected. If it does not connect, check the URL, the transport type, and whether the authorization header was passed with uppercase -H.

Use it for real image tasks

Once the MCP server is connected, the workflow becomes conversational. You can ask Claude Code to call NanoBanana while you are working on the surrounding project files. The guide gives a few useful patterns.

Compose multiple images

For multi-image composition, nanobanana_edit_image supports multiple image URLs. A practical prompt 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 helpful when you are creating a product mockup, a documentation hero image, or a feature screenshot that needs to combine existing assets.

Remove unwanted text from an image

If a screenshot contains unwanted text or a watermark-like element, you can ask for an edit that removes it and fills the background:

Edit this image to remove the text watermark in the bottom right corner, filling the background.

Use this kind of workflow carefully and only with images you have the right to modify. Technically, the useful part is that the edit request stays close to the development context where the asset is being used.

Generate page illustrations

For small product surfaces, you can generate an illustration directly from a prompt:

Generate an illustration of a small dinosaur crouching next to a crack in the ground looking down, for use on a 404 page.

That is a good fit for placeholder graphics, empty states, blog headers, or quick design directions before handing work to a designer.

A practical workflow I would use

  1. Add the MCP server with claude mcp add nanobanana --transport http.
  2. Use -s user for a personal setup or -s project for a repo-level setup.
  3. Run claude mcp list and confirm nanobanana is connected.
  4. Start with a narrow prompt: one asset, one edit, one target use case.
  5. If composing images, provide clear source image URLs and describe what should move from one image to the other.

The main benefit is not replacing a design workflow. It is reducing friction for the image tasks that appear while building: a 404 illustration, a cleaned-up screenshot, a quick mockup, or a visual draft for a feature page.

If you want the exact setup notes and tool list, read the original Claude Code + NanoBanana MCP guide.

Comments

Popular posts from this blog

Artistic QR Code API Integration Guidance

A Small Tip for Using AI Agents: Don’t Ask for the Plan Too Soon