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:
https://nanobanana0.com/api/mcpAuthorization
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
claude mcp add --transport http nano-banana https://nanobanana0.com/api/mcpWith an API key instead of OAuth:
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.
https://nanobanana0.com/api/mcpCursor
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"nano-banana": {
"url": "https://nanobanana0.com/api/mcp"
}
}
}With an API key instead of OAuth:
{
"mcpServers": {
"nano-banana": {
"url": "https://nanobanana0.com/api/mcp",
"headers": { "Authorization": "Bearer nb0_..." }
}
}
}VS Code
Add to .vscode/mcp.json
{
"servers": {
"nano-banana": {
"type": "http",
"url": "https://nanobanana0.com/api/mcp"
}
}
}Codex
Add to ~/.codex/config.toml
[mcp_servers.nano-banana]
url = "https://nanobanana0.com/api/mcp"Then sign in with OAuth:
codex mcp login nano-bananaWith an API key instead of OAuth:
[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:
URL: https://nanobanana0.com/api/mcp
Authorization: Bearer nb0_...Tools
| Tool | Description |
|---|---|
nb_generate_image | Start an image generation and return a task. |
nb_generate_video | Start a video generation and return a task. |
nb_get_task | Status and output URLs of a task. |
nb_list_models | Models with their parameters and credit prices. |
nb_get_balance | Your credit balance. |
nb_quote | Price 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.