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

mcp-mozart

v0.0.1

Published

Recommender MCP server. Auto-discovers other MCPs registered in a Claude Code project and recommends which tools to consult per query, using local embeddings. No fan-out, no per-query LLM call.

Readme

mcp-mozart

Status: V1 ready except HTTP transport (deferred). 101 tests, ~83% statement coverage. Working: discovery, capability index, local embeddings, recommender, MCP stdio server, CLI (init, status, rescan, eval [--bootstrap], serve), chokidar watcher, optional Claude-powered description augmentation and CLAUDE.md routing-hint mining (both behind --augment and ANTHROPIC_API_KEY), gold-set eval scoring. Not yet implemented: HTTP transport for non-Claude-Code MCP clients (planned for V1.1). See MCP-MOZART-PLAN.md for the full plan.

A unified retrieval recommender MCP server. Auto-discovers other MCPs registered in your Claude Code project (or user-global config), embeds their tool descriptions locally, and recommends which tools to consult for any given query — with cosine-ranked scores and short reasons.

mcp-mozart does not call the recommended tools. It returns a ranked list; the consumer LLM (e.g. Claude Code) invokes them with proper typed parameters.

Why a recommender, not a router?

MCP tools have typed parameters (bug_fix_history(component, include_security), commits_touching_file(filename, limit)) that can't be derived from a raw user query without an LLM call. A recommender:

  • Keeps the contract honest — it doesn't pretend to call tools it can't parameterize
  • Latency stays at ~100ms (embedding only)
  • Cost stays at $0/query after setup
  • Matches how routing tables in CLAUDE.md files are already written: "use this tool for that question"

Install

As a Claude Code plugin (recommended)

claude plugin add gunesbizim/mcp-mozart

This clones the repo into ~/.claude/plugins/cache/, runs npm install (which builds dist/ via the prepare script), registers the mozart MCP server, and exposes the /mozart-init, /mozart-status, and /mozart-recommend slash commands. Update later with /plugin update mozart.

After install, run once to build the capability index:

/mozart-init

As a standalone npm package

npm install -g mcp-mozart
mozart init

Then register it manually in any project's .mcp.json:

{
  "mcpServers": {
    "mozart": {
      "command": "mozart",
      "args": ["serve"],
      "env": { "MOZART_SELF": "1" }
    }
  }
}

From source (development)

git clone https://github.com/gunesbizim/mcp-mozart.git
cd mcp-mozart
npm install     # runs `prepare` → builds dist/
node dist/cli/index.js init

CLI

mozart init                       # discover MCPs, embed tool descriptions, persist index
mozart init --augment             # also call Claude to enrich thin descriptions + mine CLAUDE.md
mozart status                     # print current state
mozart rescan                     # re-discover, only re-embed changed tools
mozart eval                       # replay gold set, report routing accuracy
mozart eval --bootstrap           # interactively build gold set (requires ANTHROPIC_API_KEY)
mozart serve                      # start the MCP server over stdio

mozart init flags:

  • --config <path> — explicit .mcp.json path instead of probing ./.mcp.json, ~/.claude.json, ~/.mcp.json.
  • --verbose — debug-level logging.
  • --augment — call Claude (requires ANTHROPIC_API_KEY) to expand thin tool descriptions and parse CLAUDE.md routing hints. Improves recommendation quality but costs API credits.

Tool surface

Once mozart is installed and mozart init has been run, any MCP client can call:

// tools/call mozart_recommend
{
  "query": "how does auth work?",
  "topK": 3,         // optional, default 3
  "threshold": 0.5   // optional, default 0.5
}

Response shape:

{
  "query": "how does auth work?",
  "recommendations": [
    {
      "server": "gitnexus",
      "tool": "query",
      "score": 0.84,
      "reason": "GitNexus tool answers 'how does X work' — code structure + call chains"
    }
  ],
  "meta": {
    "indexed_tools": 23,
    "considered": 23,
    "above_threshold": 1,
    "threshold": 0.5,
    "embedding_ms": 42,
    "scoring_ms": 3
  }
}

Architecture

┌──────────────────────────────────────────────────────────────┐
│ Claude Code (or any MCP client)                               │
│   1. calls mozart_recommend("…")                              │
│   2. receives ranked tool list                                │
│   3. invokes top tool(s) itself with proper params            │
└────────────────────────┬─────────────────────────────────────┘
                         │
            ┌────────────▼────────────┐
            │   mcp-mozart (stdio)    │
            │   • embed(query)        │
            │   • cosine top-k        │
            │   • threshold ≥ 0.5     │
            │   • attach reasons      │
            └─────────────────────────┘
                         ▲
                         │ load capability index
            ┌────────────┴────────────┐
            │  ~/.mozart/index.json   │
            └─────────────────────────┘
                         ▲
            ┌────────────┴────────────┐
            │  Discovery on init      │
            │  + chokidar watcher     │
            └─────────────────────────┘

Development

npm test                   # run vitest
npm run test:coverage      # with coverage gate (lines/branches/funcs ≥ 70%)
npm run typecheck          # tsc --noEmit
npm run build              # tsc → dist/

Test approach:

  • Unit tests use a deterministic stub embedder (sha256-derived) — no model load.
  • One integration test (tests/integration/stdio-server.test.ts) exercises the full path through the MCP SDK with InMemoryTransport.
  • Discovery is tested against in-process fake MCP servers; no real subprocess spawning.

License

MIT — see LICENSE.