MCP server

Connect Claude, Cursor, VS Code, Codex and other AI clients to generate images and videos over MCP.

Connect your AI assistant to Nano Banana over the Model Context Protocol. It can then generate images and videos, check tasks and read your balance on your behalf.

Server URL

The server uses the Streamable HTTP transport. Add this URL to your client:

URL
https://nanobanana0.com/api/mcp

Authorization

Most clients sign in with OAuth: when you add the server, a browser window opens, you sign in to Nano Banana and approve the client. Nothing else to configure.

Clients without OAuth can send an API key in the Authorization header instead. Turn on "Allow MCP" for that key. Manage API keys

Client setup

Claude Code

Terminal
claude mcp add --transport http nano-banana https://nanobanana0.com/api/mcp

With an API key instead of OAuth:

Terminal
claude mcp add --transport http nano-banana https://nanobanana0.com/api/mcp \
  --header "Authorization: Bearer nb0_..."

Claude Desktop / claude.ai

Open Settings, then Connectors, choose Add custom connector and paste the server URL. You will be asked to sign in and approve.

URL
https://nanobanana0.com/api/mcp

Cursor

Add to ~/.cursor/mcp.json

JSON
{
  "mcpServers": {
    "nano-banana": {
      "url": "https://nanobanana0.com/api/mcp"
    }
  }
}

With an API key instead of OAuth:

JSON
{
  "mcpServers": {
    "nano-banana": {
      "url": "https://nanobanana0.com/api/mcp",
      "headers": { "Authorization": "Bearer nb0_..." }
    }
  }
}

VS Code

Add to .vscode/mcp.json

JSON
{
  "servers": {
    "nano-banana": {
      "type": "http",
      "url": "https://nanobanana0.com/api/mcp"
    }
  }
}

Codex

Add to ~/.codex/config.toml

TOML
[mcp_servers.nano-banana]
url = "https://nanobanana0.com/api/mcp"

Then sign in with OAuth:

Terminal
codex mcp login nano-banana

With an API key instead of OAuth:

TOML
[mcp_servers.nano-banana]
url = "https://nanobanana0.com/api/mcp"
bearer_token_env_var = "NB_API_KEY"

Other clients

Any client that supports remote MCP servers over HTTP works. Use the server URL, and either OAuth or this header:

HTTP
URL: https://nanobanana0.com/api/mcp
Authorization: Bearer nb0_...

Tools

ToolDescription
nb_generate_imageStart an image generation and return a task.
nb_generate_videoStart a video generation and return a task.
nb_get_taskStatus and output URLs of a task.
nb_list_modelsModels with their parameters and credit prices.
nb_get_balanceYour credit balance.
nb_quotePrice a generation without spending credits.

Credits

Generation tools spend credits from your account at the same prices as the website. Credits for failed outputs are refunded. Ask your assistant to quote first when the cost matters.

Skill file

The Skill file teaches agents such as Claude Code how to call the Nano Banana API and MCP tools. Download it and place it in your skills folder.

Download SKILL.mdREST API reference