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

@nanobanana/mcp

v0.1.2

Published

Lean MCP server for Google's Nano Banana (Gemini) image models. Generates and edits images, returns file paths.

Downloads

194

Readme

@nanobanana/mcp 🍌

A lean MCP server for Google's Nano Banana (Gemini) image models. It generates and edits images from any MCP client (Claude Code, Claude Desktop, Cursor) and hands back file paths instead of base64, so your agent's context stays small.

  • Three tools and nothing else: generate_image, edit_image, list_models
  • Defaults to Nano Banana 2 (gemini-3.1-flash-image). Switch models per call or via env. If a pinned model id ever goes stale, list_models shows what your key can actually use.
  • Multi-image editing: pass reference images for style transfer, characters, or compositing
  • Control over aspect ratio (1:1 up to 21:9) and resolution (1K, 2K, 4K)
  • Google Search grounding for images that need real-world accuracy, like infographics
  • Safe output paths. The server never writes to / when a desktop MCP client spawns it there.
  • Auth lives in env vars only, so your API key never passes through chat context

Quick start

Get a free Gemini API key at aistudio.google.com/apikey.

Claude Code

claude mcp add nanobanana -e GEMINI_API_KEY=your_key -- npx -y @nanobanana/mcp

Also listed in the MCP Registry as io.github.getjoystick/nanobanana-mcp.

Claude Desktop / Cursor: add this to claude_desktop_config.json or .cursor/mcp.json:

{
  "mcpServers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@nanobanana/mcp"],
      "env": { "GEMINI_API_KEY": "your_key" }
    }
  }
}

Tools

generate_image

| Param | Required | Description | |---|---|---| | prompt | ✅ | Image description | | model | | Gemini image model id (default gemini-3.1-flash-image) | | aspectRatio | | 1:1, 16:9, 9:16, 4:3, 21:9, and similar | | size | | 1K, 2K, or 4K | | grounding | | Ground with Google Search for factual accuracy | | outputDir | | Save directory (default ./nano-banana) | | filename | | Base filename without extension |

edit_image

Same params, plus:

| Param | Required | Description | |---|---|---| | images | ✅ | Input image path(s). The first is the base; the rest are references. |

Both tools save to disk and return the file path.

list_models

Takes no params. Lists the image model ids your API key can use. Handy when a pinned model id stops working, which is how earlier Nano Banana servers broke.

Configuration

| Env var | Description | |---|---| | GEMINI_API_KEY | Required. Gemini API key (GOOGLE_API_KEY also works) | | NANOBANANA_MODEL | Default model override | | NANOBANANA_OUTPUT_DIR | Default output directory override |

Models

| Model id | Notes | |---|---| | gemini-3.1-flash-image | Default. Nano Banana 2: 4K output, strong text rendering | | gemini-3-pro-image | Nano Banana Pro, for complex scenes that need deeper reasoning | | gemini-2.5-flash-image | The original Nano Banana (legacy; Google retires it 2026-10-02) |

Development

npm install
npm run build
GEMINI_API_KEY=your_key npm run smoke   # end-to-end test against the live API

Acknowledgements

Inspired by other Nano Banana MCPs. Built with Claude Code.

License

MIT