How to Edit Images from Claude Code with NanoBanana MCP

Image editing usually breaks the flow of a programming session: you leave the terminal, open a design tool, upload assets, copy results back, and then try to remember what you were building. NanoBanana MCP gives Claude Code a small but useful image arm, so image generation and image edits can become part of the same terminal workflow as code review, README updates, or release preparation.
What you can do
The NanoBanana MCP integration is focused on practical image work inside Claude Code. The documented server exposes two tools:
nanobanana_generate_imagefor text-to-image generation.nanobanana_edit_imagefor image editing, including multiple image inputs.
The important part is not only that it can create pictures. The source guide describes NanoBanana as an image-aware editing tool built around Gemini’s image understanding: you can provide two images and ask the model to move an object from one image into the scene of another, while adapting angle and lighting. That makes it useful for builder tasks such as product mockups, page illustrations, quick README visuals, and cleaning up unwanted text in screenshots.
How it works
Claude Code already knows how to read code, modify files, run commands, and explain errors. MCP extends that session with external tools. In this setup, Ace Data Cloud hosts the remote NanoBanana MCP server, and Claude Code connects to it over HTTP using an Ace Data Cloud API token. You do not configure a local image service; you add a remote MCP endpoint and let Claude Code call it when your prompt needs image generation or editing.
The NanoBanana MCP endpoint used in the documentation is:
https://nanobanana.mcp.acedata.cloud/mcp
The command uses claude mcp add, --transport http, an uppercase -H header flag, and a scope selected with -s. The uppercase -H matters: lowercase -h is help.
Step 1: Add NanoBanana MCP to the current project
For a first test, I would start with the local scope. It binds the configuration to the project directory where you run the command, while the record is written into your 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
Keep the real token private. The documentation uses the placeholder YOUR_ACEDATACLOUD_API_KEY and explicitly warns against pasting a complete token into public repositories, issues, screenshots, or chat records.
Step 2: Choose the right configuration scope
Once the local test works, choose a scope based on how you actually work:
-s local: best for trial use in one project directory.-s user: useful when you want NanoBanana MCP available across projects opened with Claude Code.-s project: useful for team projects because Claude Code writes the configuration to.mcp.jsonin the project root.
For a team repository, be careful with project scope. The source guide recommends not committing the real token to public repositories; use an environment-variable placeholder or have each person add credentials locally. The first time Claude Code reads a project-level MCP configuration, it may show Pending approval, which is a normal trust prompt for the project configuration.
Step 3: Verify the connection
After adding the server, verify the handshake from the terminal:
claude mcp list
If nanobanana shows ✓ Connected, the server is reachable and Claude Code can call the tools. If it fails, check the token, the service URL, and the selected scope. Avoid debugging from old screenshots or assumed tool counts; the live connection state is what matters.
Step 4: Use natural-language editing prompts
After configuration, you can stay in Claude Code and describe the edit you want. For composition, the guide 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 cleanup work, the documented example is direct:
Edit this image to remove the text watermark in the lower right corner, filling it with the background.
And for a lightweight product or website illustration:
Generate an illustration of a small dinosaur squatting next to a crack in the ground looking down, to be used for a 404 page.
In practice, I would pair these prompts with concrete project context: the target page, the dimensions you need, and the files where the image will be referenced. That lets Claude Code help with the asset and then continue with the surrounding implementation work.
A small builder workflow
- Open a project that needs a visual asset, such as a landing page, README, or 404 page.
- Add NanoBanana MCP with
-s localand verify it withclaude mcp list. - Ask Claude Code to generate or edit the image using
nanobanana_generate_imageornanobanana_edit_image. - Review the returned image, then ask Claude Code to wire it into the relevant page or documentation.
This is the main value of the integration: image work becomes a step in a development loop instead of a separate browser chore. For the full configuration reference, read the Claude Code with Nano Banana MCP guide.
Comments
Post a Comment