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

kb-mcp-server

v0.1.0

Published

Portable knowledge management MCP server for Claude Code

Readme

kb-mcp-server

A portable knowledge management MCP server for Claude Code. Gives Claude persistent, searchable project knowledge that grows over time.

What it does

kb-mcp-server indexes your project's markdown documentation and makes it searchable via semantic (meaning-based) and keyword search. Claude Code uses this to:

  • Look up domain knowledge, architecture patterns, and gotchas before making changes
  • Capture new knowledge discovered during tasks
  • Track documentation health and coverage gaps

Search is multilingual — Dutch queries find English documents and vice versa.

Quick start

# Install globally
npm install -g kb-mcp-server

# In your project directory
kb-mcp init

# Restart Claude Code — the MCP server starts automatically

The init command creates:

  • kb/ directory with domain/, technical/, operational/ subdirectories
  • .kbrc.json configuration
  • .mcp.json entry so Claude Code starts the server automatically
  • .claude/skills/ with 5 Claude Code skills

On first startup, the embedding model (~120MB) downloads automatically and is cached for offline use.

Skills

After setup, these slash commands are available in Claude Code:

| Skill | Purpose | |-------|---------| | /kb-setup | Guided onboarding — scans your project and seeds the KB | | /kb-lookup | Search with context enrichment and confidence interpretation | | /kb-capture | Capture knowledge from the current task | | /kb-health | Review KB health metrics and coverage | | /kb-optimize | Improve document quality |

MCP Tools

The server exposes 8 tools via the MCP protocol:

| Tool | Description | |------|-------------| | kb-query | Semantic + keyword search with confidence scores | | kb-list-topics | List documented topics and categories | | kb-get-document | Retrieve a document's full content | | kb-add-document | Create a new KB document | | kb-update-document | Update an existing document | | kb-index-status | Index statistics (doc count, model status) | | kb-health-report | Coverage metrics, miss rate, stale docs | | kb-analyze-docs | Document quality analysis |

How search works

Three signals combined per query:

  1. Vector similarity (60%) — Embeds your query and finds semantically similar chunks using cosine similarity
  2. Chunk FTS (25%) — BM25 keyword matching on document sections
  3. Document FTS (15%) — Frontmatter keyword boost (title, summary, keywords)

Documents are split into chunks by H2/H3 headings. Each chunk carries its heading context for better relevance.

Configuration

All options in .kbrc.json:

{
  "docsPath": "./kb",
  "watchPaths": ["./kb"],
  "indexPath": "./.kb-data/kb.db",
  "model": "Xenova/paraphrase-multilingual-MiniLM-L12-v2",
  "debounceMs": 300,
  "chunkingThreshold": 50,
  "weights": { "vector": 0.6, "chunkFts": 0.25, "documentFts": 0.15 },
  "confidenceThresholds": { "high": 0.8, "low": 0.4 }
}

See docs/configuration.md for full reference.

Docker

docker build -t kb-mcp-server .

See docker-compose.example.yml for volume mounts and Claude Code integration via the stdio bridge script.

CLI commands

kb-mcp init             # Initialize KB in current directory
kb-mcp serve            # Start MCP server (usually done by Claude Code)
kb-mcp status           # Show index statistics
kb-mcp reindex          # Force full re-index
kb-mcp upgrade          # Update skills to latest version
kb-mcp download-model   # Pre-download embedding model

System requirements

| Resource | Requirement | |----------|-------------| | Node.js | 20+ | | RAM | ~300-400MB (embedding model) | | Disk | ~150MB (model cache) + KB database | | OS | macOS, Linux, Windows |

Documentation

Credits

This project is built on the work of these excellent open source projects:

| Project | Author | What it provides | |---------|--------|------------------| | Transformers.js | Hugging Face | Embedding model runtime (ONNX) | | paraphrase-multilingual-MiniLM-L12-v2 | Sentence-Transformers / Nils Reimers & Iryna Gurevych | Multilingual embedding model | | MCP SDK | Anthropic | Model Context Protocol implementation | | better-sqlite3 | Joshua Wise | Fast, synchronous SQLite bindings for Node.js | | sqlite-vec | Alex Garcia | Vector search extension for SQLite | | Chokidar | Paul Miller | Cross-platform file watching | | Commander.js | TJ Holowaychuk | CLI framework | | gray-matter | Jon Schlinkert | YAML frontmatter parsing | | Zod | Colin McDonnell | TypeScript schema validation |

License

MIT