npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nano-banana-mcp-g3

v2.1.0

Published

MCP server for Google's Gemini 3 Pro Image generation API with 4K output, aspect ratio control, Google Search grounding, conversational editing, and image description/analysis

Readme

Nano-Banana MCP (Gemini 3 Pro Image)

A Model Context Protocol (MCP) server for AI image generation and editing using Google's Gemini 3 Pro Image model. Supports 4K output, aspect ratio control, Google Search grounding, and conversational multi-turn editing with thought signatures.

Fork of ConechoAI/Nano-Banana-MCP, upgraded from Gemini 2.5 Flash to Gemini 3 Pro Image.

Features

  • Generate images from text prompts with configurable aspect ratio and resolution (up to 4K)
  • Edit existing images by providing a file path and edit instructions
  • Conversational editing — multi-turn editing that preserves full context via Gemini 3 thought signatures
  • Google Search grounding — generate fact-based images using real-time web data
  • Cross-platform file management (macOS, Linux, Windows)

Quick Setup

Claude Code

claude mcp add nano-banana \
  -e GEMINI_API_KEY=your-api-key \
  -- npx -y nano-banana-mcp-g3

Manual (Claude Code / Cursor / other MCP clients)

Add to your MCP configuration:

{
  "nano-banana": {
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "nano-banana-mcp-g3"],
    "env": {
      "GEMINI_API_KEY": "your-api-key"
    }
  }
}

Restart your client after saving.

Package name: nano-banana-mcp-g3 (not nano-banana-mcp). The original nano-banana-mcp on npm is the upstream version using the older Gemini 2.5 model.

Available Tools

| Tool | Description | |------|-------------| | generate_image | Create a new image from a text prompt | | edit_image | Modify an existing image file with a text prompt | | continue_editing | Iterate on the last image (preserves context via thought signatures) | | get_last_image_info | Show file path and info for the last image | | configure_gemini_token | Set your Gemini API key | | get_configuration_status | Check if the API key is configured |

Generation Parameters

These optional parameters work with generate_image, edit_image, and continue_editing:

| Parameter | Values | Description | |-----------|--------|-------------| | aspectRatio | 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9 | Output aspect ratio. Default is model-chosen. | | imageSize | 1K, 2K, 4K | Output resolution. Default is 1K. | | useGoogleSearch | true / false | Enable Google Search grounding for fact-based images (generate_image only). |

Usage Examples

Ask your AI assistant naturally:

  • "Generate an image of a sunset over mountains"
  • "Generate a 16:9 widescreen banner for a tech blog in 2K resolution"
  • "Generate an infographic of today's weather in Tokyo" (uses Google Search grounding)
  • "Edit this image to add a rainbow" (provide file path)
  • "Make the background darker" (continues editing the last image)
  • "Now change the text to be gold colored" (multi-turn editing with context)

Conversational Editing

The continue_editing tool uses Gemini 3's thought signatures to maintain full context between turns. The model truly "remembers" the previous image — it doesn't just re-read the file. This enables coherent multi-turn editing:

Turn 1: "Generate a logo for Morning Ritual coffee shop"
Turn 2: "Make it dark background with gold text"       <- remembers the logo
Turn 3: "Add a coffee bean pattern in the background"   <- remembers logo + dark/gold scheme

Generated images are saved to ./generated_imgs/ in your current working directory.

Configuration Priority

The API key is loaded in this order:

  1. MCP config environment variables — set via "env": { "GEMINI_API_KEY": "..." } in your MCP config
  2. System environment variablesexport GEMINI_API_KEY="..."
  3. Local config file — created via the configure_gemini_token tool (stored as .nano-banana-config.json)

Proxy Support

If you need to route requests through a proxy (e.g., for geo-restricted regions), set the GOOGLE_GEMINI_BASE_URL environment variable:

{
  "nano-banana": {
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "nano-banana-mcp-g3"],
    "env": {
      "GEMINI_API_KEY": "your-api-key",
      "GOOGLE_GEMINI_BASE_URL": "https://your-proxy-url.example.com"
    }
  }
}

The @google/genai SDK reads this env var and routes all API calls through the specified URL.

Development

git clone https://github.com/mascotbot/nano-banana-mcp.git
cd nano-banana-mcp
npm install
npm run dev     # Development mode
npm run build   # Production build
npm run typecheck

Tech Stack

  • TypeScript, Node.js >= 20
  • @google/genai SDK (^1.41.0) — Gemini 3 Pro Image
  • @modelcontextprotocol/sdk — MCP protocol
  • Zod — schema validation

Requirements

  • Node.js 20.0.0 or higher
  • Gemini API key from Google AI Studio
  • Compatible with Claude Code, Cursor, and other MCP clients

License

MIT