Nano Banana × your AI assistant

Nano Banana MCP: generate images right inside your AI assistant

MCP is an open protocol that lets AI assistants call external tools. Connect Nano Banana to an MCP-capable assistant, describe what you need in plain words, and the assistant can look up models, submit a generation, track the task and fetch the image without you switching between tabs.

With Nano Banana MCP, go from one request to a usable image

Create while you discuss

Ask for cover art, product shots and illustrations in the same conversation where you write, plan or build a web page.

Let the assistant handle the steps

The assistant checks the current image models and parameters, submits the task and polls progress, so you can focus on the content and the result.

Keep your Nano Banana account

Uses your existing credits with the same per-image pricing as the website and OpenAPI, and failed generations are refunded. Connecting MCP never starts a generation by itself.

Comparing with Higgsfield? See our Higgsfield alternative comparison for prices, models and MCP sign-in side by side.

One-click setup: copy a prompt for your AI assistant

Pick your client and press the button. We create a dedicated API key, put it into a setup prompt and copy it; send it to your assistant and it configures Nano Banana MCP for you.

Choose a client
Manage keys

Each press creates a new dedicated key. Above 10 keys the oldest one-click key is revoked automatically (keys you created by hand are never touched); manage them on the API page. The prompt contains your key, so only send it to your own AI tools.

Set up Nano Banana MCP in three steps

You need a Nano Banana account that has made a purchase, a valid API key, and an MCP client that supports remote Streamable HTTP with custom request headers.

  1. 1.

    Prepare your account and key

    API and MCP access are available to paid accounts only; bonus credits alone cannot be used. Create a dedicated API key on the OpenAPI page and put it only in a trusted client's connection settings, never in a chat.

  2. 2.

    Add the Nano Banana MCP server

    In your AI tool's MCP settings, add a remote HTTP server with the URL and Authorization header below. Do not choose stdio mode, which only runs local commands.

  3. 3.

    Check the tools, then ask

    After connecting, ask the assistant to list the available models first. Once the three tools below appear, describe the image you want and explicitly allow it to spend credits.

Server URL
https://www.nano-banana.cn/api/mcp/
Header
Authorization: Bearer YOUR_NANO_BANANA_API_KEY

Replace YOUR_NANO_BANANA_API_KEY with your key. This page does not collect or store keys.

Connection examples

{
  "mcpServers": {
    "nano-banana": {
      "url": "https://www.nano-banana.cn/api/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_NANO_BANANA_API_KEY"
      }
    }
  }
}

The JSON example works for clients that accept url / headers; Claude Code uses a single command; the Codex example reads the key from an environment variable. Exact field names and config file locations follow each client's documentation.

Connect Nano Banana MCP from popular AI tools

MCP support does not guarantee support for this server's authentication. Make sure your client offers remote HTTP and a custom Authorization header.

Cursor

Remote HTTP + headers
  1. Add a custom server in MCP settings, or edit the MCP JSON config you use.
  2. Add the nano-banana url and headers from the JSON example above, replace the key placeholder locally and save.
  3. Enable the Nano Banana tools and list models first; confirm tool calls when the client asks during generation.

Never commit a config file that contains a real key to a code repository.

Official setup guide

Claude Code

One command
  1. Run the command from the Claude Code tab above in your terminal, replacing the key placeholder with your key.
  2. Type /mcp in Claude Code and check that nano-banana is connected with three tools.
  3. Ask it to list the available models, then describe the image you want.

The command stores the key in your local Claude Code config, so only run it on your own computer.

Official setup guide

Codex

Remote HTTP + environment variable
  1. Set NANO_BANANA_API_KEY in a trusted environment; do not write the key in chats or committed files.
  2. Add the Codex TOML example above to the Codex config file you use.
  3. Reload MCP connections, confirm the Nano Banana tools are available, then ask for images.

Remote or cloud sessions need this variable set in the environment that actually runs Codex.

Official setup guide

WorkBuddy

Check your version first
  1. Open WorkBuddy's MCP or tool management page and look for an option to add a custom remote server; menu names vary by version.
  2. If it supports HTTP / Streamable HTTP and custom headers, enter the server URL and Bearer header above, then save and enable it.
  3. Send "List the image models available on Nano Banana" to test the connection. If only stdio, legacy SSE or OAuth is offered, this setup cannot be used directly.

The JSON above is a reference for the connection fields, not a one-click import verified for every WorkBuddy version.

ChatGPT

Authentication is currently limited
  1. ChatGPT custom MCP apps have their own account, workspace and authentication requirements and are not the same as clients that accept arbitrary headers.
  2. Nano Banana currently supports API-key Bearer headers only and does not provide the OAuth authorization that ChatGPT's usual connection flow expects, so pasting the URL alone will not work.
  3. If your ChatGPT client explicitly lets you set a custom Authorization header, you can try the parameters above; otherwise use Cursor, Claude Code or Codex instead.

A ChatGPT subscription does not include Nano Banana generation credits.

Official setup guide

What to say after connecting

State the purpose, size and reference images first, then confirm the model and cost. These examples are prompts only; copying them does not start a generation.

Article cover

First list the image models available on Nano Banana, pick one that suits an article cover and tell me how many credits each image costs. Theme: "slow living in the city", landscape 16:9, natural light, no text. After I confirm, generate just 1 image and return the task ID and the image URL.

Edit from a reference

Here is a public link to my product photo: https://example.com/product.png . Check which Nano Banana models support image-to-image and their prices. After I confirm, generate 1 clean e-commerce shot on a white background that keeps the product's look.

Illustrations in a batch

I need images for a 5-section tutorial. First list a scene description and a recommended model for each section plus the total credits. After I confirm, submit them one by one, submit each only once, and query the same task ID until each image is ready.

Tools Nano Banana MCP provides

Nano Banana MCP currently offers image generation only. Reference images must be publicly accessible links; whether local files can be read or results saved depends on your AI client's own file and network permissions.

list_models
List available image models, parameter limits and credits per image.
generate_media
Submit one image generation (text-to-image or image-to-image), spending account credits.
query_task
Check progress and image URLs of an existing task without generating again.

Pricing, connection and task recovery

01

Does connecting Nano Banana MCP cost anything?

Connecting and listing models never submit a generation. Only generate_media spends credits, based on the chosen model and parameters, at the same price as the website and OpenAPI. Failures, timeouts and moderation rejections are refunded. Your AI tool's own subscription is billed separately.

02

Which accounts can use it?

Like the OpenAPI, it is open to paid accounts only: any past top-up, subscription or renewal counts. Accounts with bonus credits only receive a 403 message. No captcha is required when calling with an API key.

03

What if the connection fails or returns 401?

Make sure you use https://www.nano-banana.cn/api/mcp/, remote HTTP mode and a valid API key. The header must read Authorization: Bearer, a space, then the key. Never put the key in the URL. If your client cannot send custom headers or only supports OAuth, it cannot connect with this setup.

04

What if a generation times out or disconnects?

A network timeout does not mean the generation failed. Have the assistant keep the data.id returned by generate_media and query that same task at least 10 seconds apart instead of resubmitting. If you cannot tell whether a submission went through, check your task history on the website.

05

Are video or local file uploads supported?

Not yet. Like the OpenAPI, Nano Banana MCP exposes image models only. For reference images, provide public http(s) image links; the server copies them before generating.

06

How do I keep my API key safe?

Use a separate key for each tool and store it only in that tool's secure config. Never paste it into chats, public repositories, screenshots or logs. Send the key only to nano-banana.cn and never when downloading images. If it leaks, disable it in the console right away and create a new one.

Ready to let your AI assistant create images?

Create a dedicated API key, connect a supported client and start by listing models.