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

@vulhdev/knowledge-base

v1.5.5

Published

MCP server for persistent document storage with full-text search

Readme

An MCP server for Claude Code that provides persistent document storage using SQLite. Organize your ideas, specs, plans, and feature documentation in a structured three-level hierarchy.

workspace → feature → content (idea | spec | plan | digest | doc)

Features

  • Persistent storage — all content survives across Claude Code sessions
  • Five content typesidea, spec, plan, doc (current-state feature docs), plus digest for summaries
  • Optional title field — short label on any document for easy scanning in list/search results
  • Full-text search — powered by SQLite FTS5 with BM25 relevance ranking
  • Zero external dependencies — uses Node.js built-in node:sqlite (no native compilation)
  • Claude Code skills — 11 slash commands for create, list, search, get, update, delete, import, export, explore, digest, and doc analysis

Requirements

  • Node.js 22.5 or later

Setup

1. Add the MCP server

Run this once in any terminal:

claude mcp add knowledge-base -- npx -y @vulhdev/knowledge-base

That's it. The server auto-creates a database at ~/.claude/knowledge-base.db on first run.

To use a custom database path, pass DB_PATH explicitly:

claude mcp add knowledge-base -e DB_PATH=/your/path/knowledge-base.db -- npx -y @vulhdev/knowledge-base

2. (Optional) Initialize a workspace

To link a Claude Code project to a specific workspace and install skills, run:

npx @vulhdev/knowledge-base init

The wizard will:

  1. Prompt you to select or create a workspace — writes KNOWLEDGE_BASE_WORKSPACE=<name> to CLAUDE.md
  2. Ask where to install Claude Code skills:
    • Global (~/.claude/skills/) — available in all projects
    • This project (./.claude/skills/) — current project only
    • Skip

After installing, restart Claude Code to pick up the new skills.

3. (Optional) Update skills

When a new version is released, update your installed skills with:

npx @vulhdev/knowledge-base update

Auto-detects skills installed in ~/.claude/skills/ and ./.claude/skills/, and overwrites them only if the version has changed. Warns if no installed skills are found (run init first).

4. (Optional) Browse with the GUI

To explore your knowledge base in a browser, run:

npx @vulhdev/knowledge-base gui

Opens a read-only web UI at http://localhost:3000 (override with PORT=<n>). Browse workspaces → features → documents, or search across all content.

Claude Code Skills

Skills use colon namespace notation — type the part after the colon to get autocomplete suggestions (e.g. /docknowledge-base:doc).

| Skill | When to use | |---|---| | /createknowledge-base:create | Save a spec, plan, idea, or doc from the current conversation | | /listknowledge-base:list | Browse all documents in a feature (no keyword needed) | | /searchknowledge-base:search | Full-text search when you know what to look for | | /getknowledge-base:get | Read the full body of a specific document by ID or description | | /updateknowledge-base:update | Merge new content into an existing document | | /deleteknowledge-base:delete | Permanently remove a document (with confirmation) | | /importknowledge-base:import | Import markdown files into the knowledge base | | /exportknowledge-base:export | Export documents to markdown files | | /exploreknowledge-base:explore | Proactively load feature context before starting work | | /digestknowledge-base:digest | Build a TL;DR + index summary for a feature | | /docknowledge-base:doc | Analyze a codebase feature and save structured docs (DB schema, backend flow, frontend) |

MCP Tools

Once registered, these tools are available to Claude:

create_content

Creates a document. Auto-creates the workspace and feature if they don't exist.

workspace  — top-level project or domain (e.g. "my-app")
feature    — capability or area (e.g. "auth")
type       — "idea" | "spec" | "plan" | "digest" | "doc"
title      — (optional) short label for easy identification in lists
body       — document text

get_content

Fetches a single document by its numeric ID. Returns all fields including title.

list_contents

Lists documents in a workspace, with optional filters for feature and/or type. Returns title on every row.

search_content

Full-text search across document bodies. Supports SQLite FTS5 MATCH syntax. Returns results ordered by BM25 relevance, including title on every result.

query      — search terms (FTS5 MATCH syntax supported)
workspace  — (optional) scope to a specific workspace
type       — (optional) filter by content type
limit      — max results, 1–50 (default 10)

update_content

Updates the body (and optionally the type and title) of an existing document by ID. Omitting title preserves the existing value.

id     — document ID
body   — new document body (replaces existing)
type   — (optional) new type, omit to keep existing
title  — (optional) new title, omit to keep existing

delete_content

Permanently deletes a document by its numeric ID. Returns the deleted document.

Database Schema

CREATE TABLE workspaces (
  id   INTEGER PRIMARY KEY,
  name TEXT UNIQUE NOT NULL
);

CREATE TABLE features (
  id           INTEGER PRIMARY KEY,
  workspace_id INTEGER NOT NULL REFERENCES workspaces(id),
  name         TEXT NOT NULL,
  UNIQUE(workspace_id, name)
);

CREATE TABLE contents (
  id         INTEGER PRIMARY KEY,
  feature_id INTEGER NOT NULL REFERENCES features(id),
  type       TEXT NOT NULL,   -- "idea" | "spec" | "plan" | "digest" | "doc"
  title      TEXT,            -- optional short label
  body       TEXT NOT NULL,
  created_at TEXT NOT NULL DEFAULT (datetime('now')),
  updated_at TEXT NOT NULL DEFAULT (datetime('now'))
);

Existing databases are automatically migrated on startup: the title column is added if missing, and the legacy CHECK constraint on type is removed (validation is enforced at the application layer via Zod).

Development

# Install dependencies
npm install

# Run the MCP server (no build step needed)
npm run dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Type-check
npm run lint

# Build for production
npm run build

License

MIT