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

docserver-mcp

v0.1.0

Published

Version-aware MCP documentation server with FTS5 search. Indexes docs from tools, skills, and CLIs into a searchable SQLite database.

Readme

DocServer

A version-aware MCP documentation server. Indexes docs from your tools, skills, and CLIs into a searchable SQLite database with full-text search (FTS5). Checks versions daily and only re-indexes when something changes.

What It Does

  • Tracks tool versions — knows when OpenClaw, skills, or CLIs get updated
  • Indexes documentation — markdown files, CLI help output, anything text-based
  • Full-text search — FTS5-powered search across all indexed docs
  • MCP protocol — exposes tools via Model Context Protocol (stdio transport)
  • Daily refresh — cron job checks for version changes and re-indexes as needed

Architecture

┌─────────────┐     stdio      ┌─────────────┐     SQLite/FTS5     ┌──────────┐
│  MCP Client │ ◄────────────► │  server.mjs │ ◄──────────────────► │ docs.db  │
│  (mcporter, │                │  (Node.js)  │                      │          │
│   agent,    │                └──────┬──────┘                      └──────────┘
│   Claude)   │                       │
└─────────────┘                       │ reads from
                                      ▼
                              ┌───────────────┐
                              │  Doc Sources   │
                              │  - local dirs  │
                              │  - CLI --help  │
                              │  - skill files │
                              └───────────────┘

Files

| File | Purpose | |---|---| | server.mjs | MCP server — handles all tool calls, DB operations, doc ingestion | | refresh.sh | Cron wrapper — runs a one-shot refresh and logs results |

| package.json | Node dependencies | | .gitignore | Excludes node_modules/ from version control |

Dependencies

  • Node.js >= 18
  • npm packages: @modelcontextprotocol/sdk, better-sqlite3, glob
  • No external services required — everything is local SQLite

Installation

# 1. Clone or copy the docserver directory
mkdir -p ~/docserver
cp server.mjs refresh.sh package.json ~/docserver/
cd ~/docserver

# 2. Install dependencies
npm install

# 3. Create the data directory (auto-created on first run too)
mkdir -p ~/.docserver

# 4. Run initial index
# This starts the server, seeds default tools, indexes everything, then exits
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"setup","version":"1.0"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"docs_refresh","arguments":{}}}\n' | node server.mjs

# 5. (Optional) Register with mcporter
mcporter config add docserver \
  --command node \
  --arg ~/docserver/server.mjs \
  --scope home \
  --description "Version-aware tool documentation server with FTS5 search"

# 6. Verify
mcporter call docserver.docs_list

MCP Tools

docs_list

List all tracked tools with versions, page counts, and last update times.

mcporter call docserver.docs_list

docs_search

Full-text search across all indexed documentation.

| Param | Type | Required | Description | |---|---|---|---| | query | string | yes | Search terms | | tool | string | no | Filter to one tool | | limit | number | no | Max results (default 10) |

mcporter call docserver.docs_search query="model config primary"
mcporter call docserver.docs_search query="heartbeat" tool="openclaw"

docs_get

Retrieve full documentation content for a tool.

| Param | Type | Required | Description | |---|---|---|---| | tool | string | yes | Tool name (e.g. openclaw, skill:discord, gh) | | section | string | no | Specific section (omit for all) |

mcporter call docserver.docs_get tool="openclaw" section="configuration"
mcporter call docserver.docs_get tool="gh"

docs_refresh

Check versions and re-index any tools that changed. Skips unchanged tools.

| Param | Type | Required | Description | |---|---|---|---| | tool | string | no | Refresh one tool (omit for all) |

mcporter call docserver.docs_refresh
mcporter call docserver.docs_refresh tool="openclaw"

docs_add

Register a new tool for tracking.

| Param | Type | Required | Description | |---|---|---|---| | name | string | yes | Unique tool identifier | | type | string | yes | openclaw, skill, cli, or api | | source | string | yes | Path to docs dir, or cmd:command for CLI help | | version_cmd | string | no | Shell command that outputs the version |

# Track a local docs directory
mcporter call docserver.docs_add \
  name="myapp" type="cli" \
  source="cmd:myapp --help" \
  version_cmd="myapp --version"

# Track a directory of markdown files
mcporter call docserver.docs_add \
  name="wiki" type="api" \
  source="/path/to/wiki/docs"

docs_remove

Remove a tool and all its indexed pages.

mcporter call docserver.docs_remove name="myapp"

Daily Cron Refresh

The refresh script runs the server in one-shot mode, calls docs_refresh, and logs a summary.

# Add to crontab (runs at 4:15 AM daily)
crontab -e
# Add this line:
15 4 * * * /home/pinchy/docserver/refresh.sh >> ~/.docserver/refresh.log 2>&1

Log output looks like:

[docserver refresh] 2026-03-02T04:15:01-05:00
  Total: 63 | Updated: 2 | Unchanged: 61
  ↻ openclaw → v2026.3.1 (654 pages)
  ↻ gh → v2.47.0 (1 pages)

CLI Wrapper (Optional)

A convenience script at ~/.local/bin/docserver:

docserver list              # Show all tracked tools
docserver search "query"    # Full-text search
docserver get openclaw      # Get all docs for a tool
docserver get openclaw gateway  # Get specific section
docserver refresh           # Run manual refresh

To install:

# Copy the wrapper (see below) to ~/.local/bin/docserver
chmod +x ~/.local/bin/docserver
# Make sure ~/.local/bin is in your PATH

How It Decides What to Index

On first run (docs_refresh):

  1. Seeds default tools — auto-detects OpenClaw install, all skills, common CLIs on PATH
  2. Runs version commands for each tool
  3. Ingests all docs (markdown files from directories, or --help output from CLIs)

On subsequent runs:

  1. Runs version commands again
  2. Compares to stored version
  3. Only re-indexes if version changed — skips everything else
  4. Skills without version commands always skip after first index (re-index manually with docs_refresh tool="skill:name")

Database

  • Location: ~/.docserver/docs.db (override with DOCSERVER_DATA env var)
  • Engine: SQLite with WAL mode
  • Tables:
    • tools — registered tools, versions, sources
    • doc_pages — individual doc pages with content
    • doc_fts — FTS5 virtual table for full-text search

What Gets Indexed (Current Defaults)

| Tool | Type | Source | Pages | |---|---|---|---| | openclaw | core | ~/.npm-global/lib/node_modules/openclaw/docs/ | ~654 | | skill:* | skill | Each skill's directory (SKILL.md + any .md files) | 1-7 each | | gh | cli | gh --help output | 1 | | git | cli | git --help output | 1 | | camsnap | cli | camsnap --help output | 1 | | mcporter | cli | mcporter --help output | 1 | | ffmpeg | cli | ffmpeg -h output (first 50 lines) | 1 |

Future Plans

  • HTTP/SSE transport — run as a network service, not just stdio
  • Docker container — host-independent, run anywhere
  • Remote doc sources — fetch from URLs, npm registries, GitHub releases, swagger endpoints
  • API docs — Home Assistant, Frigate, Portainer, Gitea swagger auto-import
  • Semantic search — RAGFlow integration alongside FTS5 keyword search