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

@praveenc/mcp-docs-server

v0.1.0

Published

MCP server for searching MCP protocol documentation

Readme

MCP Server Builder

A Model Context Protocol (MCP) server for searching MCP protocol documentation. Built with TypeScript using the official MCP SDK.

Features

  • BM25 Search - High-quality ranked search using BM25 algorithm with Porter stemming
  • Fast Startup - Indexes document titles at startup, fetches content on-demand
  • Markdown Aware - Weights headers, code blocks, and links for better relevance
  • stdio Transport - Runs as a local process for easy integration

Installation

npm install
npm run build

Usage

Testing with MCP Inspector

The easiest way to test the server is with the MCP Inspector:

# Build first
npm run build

# Run inspector with compiled JS
npx @modelcontextprotocol/inspector node dist/index.js

# Or run with tsx for development (no build needed)
npx @modelcontextprotocol/inspector npx tsx src/index.ts

As an MCP Server

Add to your MCP client configuration (e.g., Claude Desktop, Kiro):

{
  "mcpServers": {
    "mcp-server-builder": {
      "command": "node",
      "args": ["/path/to/mcp-builder-ts/dist/index.js"]
    }
  }
}

Or using tsx for development:

{
  "mcpServers": {
    "mcp-server-builder": {
      "command": "npx",
      "args": ["tsx", "/path/to/mcp-builder-ts/src/index.ts"]
    }
  }
}

Development

# Run in development mode
npm run dev

# Run tests
npm test

# Type check
npm run typecheck

# Build
npm run build

# Test with MCP Inspector (after build)
npm run inspect

# Test with MCP Inspector (development, no build needed)
npm run inspect:dev

Tools

search_mcp_docs

Search MCP protocol documentation with ranked results.

Parameters:

  • query (string, required): Search query string
  • k (number, optional): Maximum results to return (default: 5). Returns fewer if fewer documents match.

Example:

{
  "query": "transports",
  "k": 5
}

Returns:

[
  {
    "url": "https://modelcontextprotocol.io/specification/2025-11-25/basic/transports.md",
    "title": "Transports",
    "score": 15.725,
    "snippet": "MCP uses JSON-RPC to encode messages..."
  }
]

fetch_mcp_doc

Fetch full document content by URL.

Parameters:

  • uri (string, required): Document URL from modelcontextprotocol.io

Example:

{
  "uri": "https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md"
}

Returns:

{
  "url": "https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md",
  "title": "Tools",
  "content": "# Tools\n\nTools enable servers to expose executable functionality..."
}

Architecture

src/
├── index.ts          # MCP server entry point
├── config.ts         # Configuration
├── tools/
│   └── docs.ts       # search_mcp_docs, fetch_mcp_doc
└── utils/
    ├── cache.ts      # Document caching
    ├── doc-fetcher.ts # HTTP fetching & HTML parsing
    ├── indexer.ts    # BM25 search index
    ├── logger.ts     # Logging utilities
    ├── stopwords.ts  # Stop words list
    ├── text-processor.ts # Text utilities
    └── url-validator.ts  # URL validation

Search Algorithm

The search uses BM25 (Best Matching 25) with enhancements:

  • Porter Stemming - Matches word variants (e.g., "running" → "run")
  • Bigrams - Captures phrase matches (e.g., "tool input")
  • Weighted Scoring:
    • Title matches: 3-8x boost
    • Header matches: 4x weight
    • Code blocks: 2x weight
    • Link text: 2x weight
  • Domain Term Preservation - Technical terms like "mcp", "json", "stdio" are not stemmed

License

MIT