Back to Browse

Nano Banana MCP Server

Developer ToolsModerate7.1MCP RegistryLocal
Free

Server data from the Official MCP Registry

AI image generation and editing with Google Gemini: Nano Banana 2.1, Pro and Lite models

About

AI image generation and editing with Google Gemini: Nano Banana 2.1, Pro and Lite models

Security Report

7.1
Moderate7.1Low Risk

This is a well-scoped Gemini image generation MCP server that reads user-specified image files within home, tmpdir, and cwd roots, sends them to the Google Gemini API, and saves results locally. Its network access to Google's API and file I/O match its purpose, and the API key is read from an environment variable or a 0600 config file. Minor observations: the config file stores the key in plaintext and the image path sandbox is broad (entire home directory), but no malicious patterns or dangerous injection vectors were found. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity). Package verification found 1 issue.

11 files analyzed · 7 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Gemini API key from Google AI Studio. Optional: it can also be set later with the configure_gemini_token tool.Required

Environment variable: GEMINI_API_KEY

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "nano-banana-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@fjacquet/nano-banana-mcp@3.3.0"
      ],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Nano-Banana MCP Server

CI Security Docs Release npm version npm downloads GitHub release MCP Registry Node.js >= 18 TypeScript License: MIT

An MCP server for AI image generation and editing using Google Gemini. Works with Claude Code, Cursor, and other MCP clients.

Independent project, forked from ConechoAI/Nano-Banana-MCP and since rewritten in TypeScript. It is published as @fjacquet/nano-banana-mcp, not as the upstream nano-banana-mcp package.

What differs from upstream

  • Five Gemini models (default Nano Banana 2.1) instead of Gemini 2.5 Flash Image only
  • Image options: aspect ratio, preset shapes, resolution, thinking level, Google Search grounding
  • Image path validation (allowed extensions, 20MB limit, allowed roots) with unit tests
  • Built on the MCP SDK McpServer with Zod-validated tool inputs
  • Automated CI, CodeQL and OSV security scans, docs site, and npm publishing with provenance via OIDC
  • Listed on the official MCP Registry

Documentation: https://fjacquet.github.io/Nano-Banana-MCP/

Models

Brand nameModel IDNotes
Nano Banana 2.1gemini-nano-banana-2.1Default — pro quality at Flash speed
Nano Banana Progemini-3-pro-imageHighest quality, advanced reasoning
Nano Banana 2gemini-3.1-flash-imagePrevious default
Nano Banana 2 Litegemini-3.1-flash-lite-imageFastest and cheapest — 1K output only, no Google Search grounding
Nano Bananagemini-2.5-flash-imageLegacy — shut down by Google on 2027-03-15

Quick Start

  1. Get a Gemini API key from Google AI Studio

  2. Add to your MCP client config (Claude Code example):

{
  "mcpServers": {
    "nano-banana": {
      "command": "npx",
      "args": ["-y", "@fjacquet/nano-banana-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-key-here"
      }
    }
  }
}

See docs/configuration.md for Cursor and other MCP clients.

  1. Use the tools:
Generate an image of a sunset over mountains
Edit this image to add some birds in the sky
Continue editing to make it more dramatic

Tools

ToolDescription
generate_imageCreate new images from text prompts
edit_imageModify existing images with optional reference images
continue_editingIteratively edit the last image
get_last_image_infoGet info about the last image
configure_gemini_tokenSet API key
get_configuration_statusCheck configuration

The three generation/editing tools accept these optional parameters:

OptionPurpose
modelPick one of the models above
aspectRatio / presetOutput shape; preset is web, phone, webconf, banner or square
imageSizeOutput resolution
useGoogleSearchGoogle Search grounding; the queries run are listed in the output
thinkingLevelReasoning effort

See docs/tools.md for the full API reference, docs/configuration.md for setup details, and docs/workflows.md for usage patterns.

Development

npm install
npm run dev          # Run with tsx
npm run build        # Compile TypeScript
npm test             # Jest unit tests
npm run lint         # Biome lint
npm run typecheck    # Type-check
npm run docs:dev     # VitePress docs

Requires Node.js >= 18.0.0 (CI runs Node 24).

CI/CD

Workflows in .github/workflows/ call shared workflows from fjacquet/ci.

WorkflowTriggerWhat it does
CIpush / PR to mainInstall, typecheck, lint, test, build
Securitypush / PR to main, weekly (Mon)CodeQL, OSV-Scanner dependency scan, SBOM
Docspush to mainBuild the VitePress site and deploy to GitHub Pages
Releasev* tagPublish to npm (OIDC trusted publishing, reviewer approval), then to the MCP Registry

Releases are cut by bumping package.json and server.json, updating CHANGELOG.md, and pushing an annotated vX.Y.Z tag.

License

MIT — see LICENSE.

Originally forked from ConechoAI/Nano-Banana-MCP; thanks to its authors for the starting point.

Reviews

No reviews yet

Be the first to review this server!