Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

nanobanana-mcp-server

MCP server by zhongweili Community

Generates and edits images through Google's Gemini models. Built for AI assistants such as Claude Desktop, Cursor and Codex.

  • Score 84
  • 408 stars
  • MIT
  • Updated

Install nanobanana-mcp-server

Built from the published package, never by AI.

claude mcp add nanobanana-mcp-server -e GEMINI_API_KEY=YOUR_GEMINI_API_KEY -- uvx nanobanana-mcp-server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install nanobanana-mcp-server in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the nanobanana-mcp-server block.

About

Nano Banana MCP Server is a Model Context Protocol server that generates images through Google's Gemini models. It offers three models: Nano Banana 2 (Gemini 3.1 Flash Image), which is the default, Gemini 3 Pro Image for deeper reasoning, and the legacy Gemini 2.5 Flash Image for fast drafts. In AUTO mode the server routes requests to NB2 unless Pro is clearly needed. Users can set an aspect ratio and an output path for saved files.

Authentication works with a Gemini API key or with Google Cloud Application Default Credentials through Vertex AI. The server can be installed with uvx or pip and configured in clients such as Claude Desktop, Claude Code, Cursor, OpenAI Codex, Continue.dev and Open WebUI. It also manages files through the Gemini Files API. The source describes it as production ready, with error handling and logging, for users who need images from an AI assistant.

Written from the project's README and checked against it.

Tools it gives your assistant

  • generate_imageCreates images from a prompt, with model_tier, resolution, aspect_ratio and output_path options.
  • edit_imageEdits images. The source names this tool without further detail.
  • upload_fileUploads files through the Gemini Files API.

What you need

  • Google Gemini API key
  • Python 3.11+ (for development only)
  • Google Cloud project with Vertex AI API enabled (Vertex AI option)
  • roles/aiplatform.user IAM role (Vertex AI option)
SettingNeededWhat it is
GEMINI_API_KEYEnvironment variable, secretRequiredYour Gemini API key
IMAGE_OUTPUT_DIREnvironment variableOptionalThe image output directory

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Generate a 16:9 YouTube thumbnail design of a coffee shop.
  • Edit this image to change the background to white.
  • Upload this reference photo to Gemini Files for later use.

Good to know

  • On Vertex AI, NB2 and Gemini 3 Pro Image require GCP_REGION=global. us-central1 is only for the legacy Flash model.
  • The legacy Gemini 2.5 Flash Image model outputs up to 1024px.
  • Vertex AI needs the aiplatform API enabled and the roles/aiplatform.user IAM role.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to nanobanana-mcp-server

All alternatives →
HyperFrames by HeyGen heygen-com
100

HyperFrames is HeyGen's open-source AI video editor for people and agents. It turns HTML, CSS, JavaScript and seekable animations into MP4 videos, and can be used from a desktop app, coding agents or chat.

AAA Remote 92k
Remocn: Remotion MCP server Remocn
96

Remocn is a hosted MCP server that helps AI assistants make Remotion videos from 935 MIT-licensed components. It searches components, reads their docs, plans a storyboard and previews results. It is for developers building videos with Remotion.

AAA Remote 2k
Agent-Native AssetsBuilderIO
94

Agent-Native Assets is the Assets agent from the Agent-Native framework, which creates and organizes on-brand media. It is for developers building agents that pair autonomous work with a purpose-built UI.

AAA Remote 7.8k
AIHOTKKKKhazix
94

Runs an open source engine for a news site that finds hot AI events and writes daily, weekly and monthly briefs. Built for people who want an industry hot-news site in their own field, with MCP access for AI agents.

AAA Remote 12k
openshortsmutonby
94

Turns long videos into captioned 9:16 shorts and can publish them to TikTok, Instagram, YouTube and other networks. It suits creators, marketing agencies and developers who want a self-hosted or hosted option.

AAA Remote 10k
Remove AI Watermarkswiltodelta
94

Remove AI Watermarks removes AI provenance marks from images, video, audio, and text that you generated yourself. It is aimed at developers and researchers working on AI provenance signals.

AAA Local 6.6k

Compare with HyperFrames by HeyGen, Remocn: Remotion MCP server or Agent-Native Assets

nanobanana-mcp-server: common questions

Which Gemini model does Nano Banana MCP Server use by default?

Nano Banana 2 (gemini-3.1-flash-image-preview) is the default model. AUTO mode routes to NB2 unless Pro's deeper reasoning is clearly needed.

How do I authenticate with Nano Banana MCP Server?

Set GEMINI_API_KEY for API key authentication. Set NANOBANANA_AUTH_METHOD to vertex_ai to use Google Cloud Application Default Credentials.

Which aspect ratios are supported?

The source lists 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, 2:3, 3:2, 4:5 and 5:4.

How do I install nanobanana-mcp-server?

In Claude Code run claude mcp add nanobanana-mcp-server -e GEMINI_API_KEY=YOUR_GEMINI_API_KEY -- uvx nanobanana-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is nanobanana-mcp-server the official server?

nanobanana-mcp-server is a community project by zhongweili, not verified by a company domain.

Is nanobanana-mcp-server free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is nanobanana-mcp-server safe to use?

It scores 84 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to nanobanana-mcp-server?

Similar MCP servers: HyperFrames by HeyGen, Remocn: Remotion MCP server, Agent-Native Assets, AIHOT.

Does nanobanana-mcp-server work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

nanobanana-mcp-server Install

Add to stack

Loading.