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

@willh/nano-banana-mcp

v1.1.2

Published

MCP server for Nano Banana extension

Downloads

361

Readme

@willh/nano-banana-mcp

MCP server for Nano Banana - 使用 Gemini 進行圖片生成與編修的 MCP 伺服器。

安裝與使用

npx @willh/nano-banana-mcp

環境變數設定

需設定下列任一 API Key 環境變數:

  • NANOBANANA_GEMINI_API_KEY(建議)
  • NANOBANANA_GOOGLE_API_KEY
  • GEMINI_API_KEY(備援)
  • GOOGLE_API_KEY(備援)

模型選擇

預設使用 gemini-2.5-flash-image。若要使用 Gemini 3 系列模型:

export NANOBANANA_MODEL=gemini-3.1-flash-image-preview

或:

export NANOBANANA_MODEL=gemini-3-pro-image-preview

MCP 工具

此 MCP server 提供以下工具:

| 工具 | 說明 | |------|------| | generate_image | 文字轉圖片生成(支援風格/變化選項) | | edit_image | 圖片編修 | | restore_image | 圖片修復 | | generate_icon | 生成多尺寸 App 圖示、Favicon、UI 元件 | | generate_pattern | 生成無縫拼接圖樣與材質 | | generate_story | 生成視覺故事或流程序列圖 | | generate_diagram | 生成技術圖表、流程圖、架構示意 |

MCP 設定範例

Claude Desktop

設定檔位置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

GitHub Copilot Chat (VS Code)

在專案根目錄建立 .vscode/mcp.json

{
  "servers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "${input:nanobanana-api-key}"
      }
    }
  },
  "inputs": [
    {
      "id": "nanobanana-api-key",
      "type": "promptString",
      "description": "Enter your Gemini API key",
      "password": true
    }
  ]
}

或透過 VS Code 設定檔 settings.json

{
  "chat.mcp.discovery.enabled": true,
  "mcp.servers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

命令列安裝:

code --add-mcp "{\"name\":\"nanobanana\",\"command\":\"npx\",\"args\":[\"-y\",\"@willh/nano-banana-mcp\"],\"env\":{\"NANOBANANA_GEMINI_API_KEY\":\"your-api-key\"}}"

Codex CLI

設定檔位置:~/.codex/config.toml

[mcp_servers.nanobanana]
command = "npx"
args = ["-y", "@willh/nano-banana-mcp"]

[mcp_servers.nanobanana.env]
NANOBANANA_GEMINI_API_KEY = "your-api-key"

命令列安裝:

codex mcp add nanobanana --env NANOBANANA_GEMINI_API_KEY=your-api-key -- npx -y @willh/nano-banana-mcp

Claude Code

命令列安裝:

claude mcp add nanobanana --env NANOBANANA_GEMINI_API_KEY=your-api-key -- npx -y @willh/nano-banana-mcp

或直接編輯設定檔 ~/.claude/settings.json

{
  "mcpServers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

在專案根目錄建立 .cursor/mcp.json

{
  "mcpServers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

設定檔位置:~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "nanobanana": {
      "command": "npx",
      "args": ["-y", "@willh/nano-banana-mcp"],
      "env": {
        "NANOBANANA_GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

搭配 Gemini CLI 使用

此套件也是 Nano Banana Gemini CLI 擴充套件 的一部分。

授權

Apache-2.0