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

devdocs-mcp

v1.0.2

Published

MCP Server for fetching documentation from DevDocs

Readme

DevDocs MCP Server

A Model Context Protocol (MCP) server that provides API documentation from DevDocs.io to AI assistants.

Runtime Requirement: This server requires Bun >= 1.0.0.

Features

  • List Documentation - Browse all available documentation libraries
  • Fuzzy Search - Typo-tolerant search with relevance scoring powered by Fuse.js
  • Get Documentation Pages - Retrieve full documentation content in Markdown format
  • File-based Caching - Reduces API calls with configurable TTL
  • Version Support - Access specific library versions (e.g., react~18, python~3.12)

Installation

bun install

This server only supports Bun runtime.

Usage

Start the MCP Server

DEBUG=mcp:* bun start

Configure in Claude Desktop

After installing from npm, use bunx:

{
  "mcpServers": {
    "devdocs": {
      "command": "bunx",
      "args": ["devdocs-mcp"]
    }
  }
}

For local development:

{
  "mcpServers": {
    "devdocs": {
      "command": "bun",
      "args": ["run", "/path/to/devdocs-mcp/src/index.ts"]
    }
  }
}

Configure in Cursor

After installing from npm, use bunx:

{
  "mcpServers": {
    "devdocs": {
      "command": "bunx",
      "args": ["devdocs-mcp"]
    }
  }
}

For local development:

{
  "mcpServers": {
    "devdocs": {
      "command": "bun",
      "args": ["run", "/path/to/devdocs-mcp/src/index.ts"]
    }
  }
}

MCP Tools

list_available_docs

List all available documentation libraries from DevDocs.

Parameters:

  • filter (optional): Filter libraries by name (e.g., "react", "python")

Example:

List all React documentation
→ list_available_docs({ filter: "react" })

search_docs

Search within a library's documentation with fuzzy matching support.

Parameters:

  • library (required): Library slug (e.g., "react", "typescript", "python~3.12")
  • query (required): Search query
  • limit (optional): Maximum results (default: 10)
  • fuzzy (optional): Enable fuzzy search for typo-tolerant matching (default: true)
  • threshold (optional): Fuzzy search threshold from 0.0 (exact) to 1.0 (match anything) (default: 0.4)

Examples:

# Basic search (fuzzy enabled by default)
→ search_docs({ library: "react", query: "useState" })

# Search with typos - still finds "useState"
→ search_docs({ library: "react", query: "useStat" })

# Exact match only (disable fuzzy)
→ search_docs({ library: "react", query: "useState", fuzzy: false })

# Stricter fuzzy matching
→ search_docs({ library: "react", query: "useState", threshold: 0.2 })

get_doc_page

Get the content of a specific documentation page.

Parameters:

  • library (required): Library slug
  • path (required): Documentation path

Example:

Get React useState documentation
→ get_doc_page({ library: "react", path: "reference/react/usestate" })

Development

Run Tests

bun test

Run Linter

bun lint

CLI Test Script

A CLI script is provided for manual testing:

# List available docs (optionally filtered)
node scripts/test-cli.ts list react

# Search within a library
node scripts/test-cli.ts search react useState

# Get a specific doc page
node scripts/test-cli.ts get react reference/react/usestate

Project Structure

devdocs-mcp/
├── src/
│   ├── index.ts              # Entry point (stdio transport)
│   ├── server.ts             # MCP Server configuration
│   ├── services/
│   │   ├── file-cache.ts     # File-based cache with TTL
│   │   └── devdocs-client.ts # DevDocs API client
│   ├── tools/
│   │   └── index.ts          # MCP tool implementations
│   ├── utils/
│   │   └── html-to-markdown.ts
│   └── types/
│       └── devdocs.ts
├── test/                     # Test files (140 tests)
├── scripts/
│   └── test-cli.ts           # CLI test script
├── cache/                    # Cache directory (gitignored)
└── package.json

Technical Details

Dependencies

| Package | Version | Purpose | | --------------------------- | ------- | --------------------------- | | @modelcontextprotocol/sdk | ^1.25.3 | MCP protocol implementation | | zod | ^3.25.0 | Schema validation | | turndown | ^7.2.2 | HTML to Markdown conversion | | fuse.js | ^7.1.0 | Fuzzy search |

Cache TTL Settings

| Data Type | TTL | | ------------------- | -------- | | Documentation list | 24 hours | | Documentation index | 12 hours | | Documentation pages | 7 days |

DevDocs API Endpoints

| Endpoint | Purpose | | ------------------------------------------------- | ------------------ | | https://devdocs.io/docs.json | All available docs | | https://devdocs.io/docs/{slug}/index.json | Doc index | | https://documents.devdocs.io/{slug}/{path}.html | Doc content |

License

MIT