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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nanobanana-rules

v0.1.2

Published

Fetch Gemini Image Generation docs at request-time and return prompt-optimization rules (MCP server).

Downloads

14

Readme

ナノバナナルール (nanobanana-rules)

Gemini API の画像生成に関するガイドラインをライブ取得して抜粋し、JSON で返す Model Context Protocol (MCP) サーバーです。

概要 / 特徴 / 注意

  • 特徴: ai.google.dev のドキュメントを都度取得し、要点を抽出してテンプレート付きで返します。
  • 抜粋: SynthID 言及や inlineData 仕様など、実装に重要なキーワードを自動検出します。
  • 出典URL: 返却 JSON にドキュメント URL を含めます。
  • 非公式: Google/ai.google.dev 非公式の補助ツールです。内容の正確性や最新性は保証しません。

セットアップ

  • 前提: Node.js 18 以上(このサーバーは Node.js 18+ で動作確認済み。package.jsonengines>=18.17 を指定済み)
  • 依存関係のインストール: npm i
  • ビルド: npm run build
  • 実行 (stdio): npm start

インストール手順(クローンから起動まで)

git clone https://github.com/Takamasa045/nanobanana-rules.git
cd nanobanana-rules
npm install
npm run build
npm start

Quick use(npx で即起動)

npx nanobanana-rules
# Claude Code での登録(PATH に入っていればそのまま呼べます)
claude mcp add nanobanana-rules --scope user -- nanobanana-rules

Claude Code 連携(ローカル実行の指定パスで)

claude mcp add nanobanana-rules --scope user -- node $PWD/dist/server.js

ツール例

get_rules { "lang": "ja", "model": "gemini-2.5-flash-image-preview" }

免責

  • 取得元は ai.google.dev。各種規約・robots.txt を遵守します。
  • 永続キャッシュは行いません(短時間のメモリキャッシュのみ・既定TTL約90秒)。
  • 注意: 本プロジェクトは Google 非公式の補助ツールです。取得するコンテンツは Google に帰属します。利用者は Google Generative AI 利用規約 を必ず順守してください。

サンプルレスポンス(短縮)

{
  "version": "2025-09-02",
  "references": {
    "image_generation_doc": "https://ai.google.dev/gemini-api/docs/image-generation?hl=ja"
  },
  "policies": {
    "content_rights_required": true,
    "synthid_watermark_expected": true
  },
  "modes_supported": ["text_to_image", "image_edit"]
}

MCP Inspector(動作確認)

npx @modelcontextprotocol/inspector nanobanana-rules
# またはローカルビルドしたファイルを指定
# npx @modelcontextprotocol/inspector node dist/server.js

npm 公開(任意)

npm login
npm run build
npm publish --access public

公開後の利用:

npx nanobanana-rules
claude mcp add nanobanana-rules --scope user -- nanobanana-rules

プロジェクト構成

  • src/server.ts: MCP サーバー本体
  • dist/: ビルド成果物(git 追跡対象外)

ライセンス

MIT License を参照してください。