MCPNanoBanana is a Model Context Protocol (MCP) server for AI image generation and editing, which calls Google's Nano Banana model through the AceDataCloud API under the hood. You can use it to generate and edit images directly from Claude, VS Code, or any MCP-compatible client.
[Main capabilities]
- Image generation: create high-quality images based on text prompts.
- Image editing: modify existing images, or combine multiple images.
- Virtual try-on: put clothing onto a person in a photo.
- Product placement: place products into realistic scenes.
- Task tracking: monitor generation progress and retrieve results.
[Supported models] All five models support generation and editing: nano-banana, nano-banana-2-lite, nano-banana-2, nano-banana-pro, and nano-banana-2.1. The first four models also provide :official variants; Nano Banana 2.1 has no :official variant, and nano-banana-2.1 must be used exactly. When the model parameter is omitted, nano-banana is selected by default.
[Connection methods] Hosted endpoint:https://nanobanana.mcp.acedata.cloud/mcp MCP clients can choose one of the following access routes:
- Hosted OAuth: the hosted service provides OAuth metadata and Dynamic Client Registration (DCR). DCR registers the client application, not an API key. OAuth is used for login, and the client sends the obtained Bearer token. Browser login still requires an AceDataCloud account. The hosted service may charge based on usage; please check the current service documentation and displayed pricing before actual operation. Do not configure both OAuth login and a fixed Authorization header for the same server.
- Hosted API token: create or find a General application in Ace Data Cloud's Applications, copy the API Key, and note the expiration time, usage limits, and allowed APIs, enabling only the limits you need. Copy the token value itself, without quotes, spaces, or the Bearer prefix; the API Key / API Token field requires the raw value, and only a manually configured HTTP Authorization header requires the Bearer prefix. The platform-... account management token cannot replace a generation API key. Please store secrets in the client credential store or environment variables, and never put them into prompts, shared workflows, screenshots, or Git commits.
- Local stdio: install the package and provide an API token for the local process. Local execution still calls the AceDataCloud API.
[Client configuration examples (OAuth)]
- Claude and Claude Desktop chat: in Customize → Connectors → Add custom connector, add a remote custom connector, enter the hosted endpoint, choose login, and follow the prompts to automatically register the OAuth client and complete authorization.
- Claude Code: run claude mcp add --transport http --scope user nanobanana https://nanobanana.mcp.acedata.cloud/mcp,然后执行 claude mcp login nanobanana, and you can check with /mcp.
- Cursor: add a remote server containing only the hosted endpoint; for projects use <project>/.cursor/mcp.json, and for personal use ~/.cursor/mcp.json.
- VS Code / Copilot: run MCP: Add Server, select HTTP, enter the hosted endpoint, and complete browser login. Workspaces can use <project>/.mcp.json; for the VS Code-specific format use <project>/.vscode/mcp.json or the user configuration.
- Codex: run codex mcp add nanobanana --url https://nanobanana.mcp.acedata.cloud/mcp,然后执行 codex mcp login nanobanana.
[Available Tools and Key Call Points]
- nanobanana_generate_image: generate an image based on a prompt, or when editing an image you may pass in a reference image URL.
- nanobanana_get_task: query task progress using the returned task_id until it ultimately succeeds or fails. Generation and editing are submitted asynchronously: submitting alone does not mean the image is complete; you must keep the task_id and continue querying. When editing, if aspect_ratio is not passed, the aspect ratio of the first reference image is preserved; if resolution is not specified, the default is 1K. Before use, check the final image and pixel dimensions.
[Prompt Writing Suggestions] For best results, the prompt may include: subject (main focus), atmosphere (emotional tone), lighting (how the scene is lit), camera/lens (such as 85mm portrait, wide-angle, and other photographic styles), quality keywords (such as bokeh, film grain, HDR, and other technical descriptions).
[Typical Use Cases]
- Portrait enhancement: try different outfits for the same person.
- Product scene compositing: place a product on a white background into a real environment.
- Attribute replacement: change material, color, or variant.
- Quick poster editing: quickly change style or theme.
- 2D to 3D: convert an image into a 3D product mockup.
- Image restoration: repair old or damaged photos.
[Pre-Use Checks and Limitations]
- https://nanobanana.mcp.acedata.cloud/health Returning {"status":"ok"} only means the endpoint is reachable.
- Confirm that the MCP client has loaded the tools; the tool list shows MCP discovery and does not mean downstream API access or balance is normal.
- If a complete API check is needed, after reviewing the current service documentation and displayed pricing, call nanobanana_generate_image with your own valid input. If the result contains a task ID, use nanobanana_get_task to query the same ID until it ultimately succeeds or fails; do not resubmit the operation just to check progress.
- 401 means you need to check the authentication route used by the client and whether the token or OAuth session is valid; 403 may mean account permissions or content moderation failure, so read the returned error; insufficient balance and downstream service failure need to be diagnosed separately. Listed tools or submitted tasks do not prove that the result succeeded.
- Self-hosted HTTP uses mcp-nanobanana-pro --transport http --port 8000; expose it only with appropriate network and TLS controls.
[Other Information] This project is under the MIT license, and contributions are welcome: fork the repository, create a feature branch, commit changes, push the branch, and open a Pull Request. The hosted service may be billed by usage; actual billing and trial credits are subject to what is currently displayed in your account and the official service documentation. This material does not provide specific pricing.