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

@iflow-mcp/charlesdove977-nanobanana-mcp

v2.0.0

Published

MCP server for Google Gemini image generation with configurable model support

Downloads

65

Readme


What is this?

A fork of nano-banana-mcp with one critical upgrade: configurable model selection via environment variable.

The original package hardcodes gemini-2.5-flash-image-preview (shut down January 2026). This fork defaults to gemini-3.1-flash-image-preview and lets you swap models without touching code.

Features

  • Generate images from text prompts
  • Edit existing images with natural language
  • Iterative editing (continue refining the last image)
  • Multi-image reference support (style transfer, combining elements)
  • Configurable aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 4:5, 5:4, 21:9, and more)
  • Configurable Gemini model via GEMINI_MODEL env var

Setup

Claude Code / Cursor

Add to your .mcp.json:

{
  "mcpServers": {
    "nano-banana": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/nanobanana-mcp/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here",
        "GEMINI_MODEL": "gemini-3.1-flash-image-preview"
      }
    }
  }
}

Install Dependencies

git clone https://github.com/charlesdove977/nanobanana-mcp.git
cd nanobanana-mcp
npm install

Get a Gemini API Key

  1. Go to Google AI Studio
  2. Create a new API key
  3. Add it to your MCP config as GEMINI_API_KEY

Models

Set GEMINI_MODEL in your env to any of these (or omit it to use the default):

| Model ID | Tier | Price | Best For | |---|---|---|---| | gemini-3.1-flash-image-preview | Flash (default) | ~$0.045/img | Speed + quality balance | | gemini-3-pro-image-preview | Pro | ~$0.134/img | Highest quality, best text rendering | | gemini-2.5-flash-image | Legacy Flash | ~$0.039/img | Budget, high-volume |

All models support both generation and editing through the same API.

Tools

| Tool | Description | |---|---| | generate_image | Create a new image from a text prompt (optional aspectRatio) | | edit_image | Modify an existing image file with a prompt (optional aspectRatio) | | continue_editing | Keep refining the last generated/edited image (optional aspectRatio) | | get_last_image_info | Check the path and size of the last image | | configure_gemini_token | Set API key at runtime | | get_configuration_status | Check if API key is configured |

Aspect Ratios

All image tools accept an optional aspectRatio parameter. Supported values:

1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 1:4 1:8 4:1 8:1

Examples

Generate (default 1:1):

"A futuristic city skyline at sunset with flying cars"

Generate (16:9 widescreen):

prompt: "A futuristic city skyline at sunset with flying cars", aspectRatio: "16:9"

Edit:

Edit photo.png: "Remove the background and replace with a gradient"

Continue editing:

"Make the colors more vibrant and add lens flare"

Image Storage

Generated images are saved to ./generated_imgs/ in your working directory (macOS/Linux) or ~/Documents/nano-banana-images/ (Windows).

Credits

Forked from ConechoAI/Nano-Banana-MCP. Updated with configurable model support and latest Gemini models.

License

MIT