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

@madhan-g-p/devdocs-mcp-server

v1.0.1

Published

Local DevDocs MCP Server (Developer Docs with project specific context awareness)

Readme

DevDocs-MCP: Documentation Authority for AI Agents

Eliminate AI hallucinations with local, version-aware, and authoritative documentation.

DevDocs-MCP is a Model Context Protocol (MCP) server that provides version-pinned, deterministic documentation sourced from DevDocs.io to AI assistants (Claude, RooCode, Cline, Copilot etc.). It acts as a local Documentation Intelligence Layer, ensuring your agent always has the correct API context without network latency or training data drift.

This server follows the proposed MCP server standard defined by the MCP , which is being adopted by AI tools and agents across the ecosystem, including those from providers such as Anthropic, OpenAI, and Google.


⚠️ Project Status Notice ⚠️ This project is under active and heavy development. Still need to test existing features and implement more new features like optimal caching , update latest doc automatically and also on request basis , optimal querying and more... Design decisions, APIs, and structure are expected to evolve based on strong opinions, reviews, and feedback from the developer community. I warmly welcome discussions, critiques, and contributions to help shape this project in the right direction.


📑 Table of Contents

  1. Overview
  2. Key Capabilities
  3. Quickstart
  4. Installation & Setup
  5. AI Agent Configuration
  6. Further Reading

🎯 Overview

  • A local MCP server written in NestJS (TypeScript).
  • A deterministic authority for documentation metadata and content.
  • A lazy-ingestion engine that caches DevDocs offline.
  • A project-aware context manager that pins docs to your package.json versions.
  • ❌ An AI agent or code generator.
  • ❌ A web scraper (it uses structured DevDocs datasets).
  • ❌ A DevDocs UI replacement.
  • ❌ A hosted SaaS (it runs 100% locally).

Modern AI coding agents face three major hurdles:

  1. Hallucination: Guessing API signatures or using deprecated methods.
  2. Latency: Fetching live web docs for every query is slow.
  3. Version Drift: Mixing up React 18 with React 19 features.

The Solution: DevDocs-MCP provides "Just-in-Time" documentation retrieved from local storage, filtered by your project's specific dependency versions.

DevDocs-MCP acts as a middleware between your IDE Agent and the documentation source.

graph TD
    Agent["AI Agents"] -->|MCP Search/Explain| Server["DevDocs-MCP Server"]
    Server -->|Metadata| DB[(SQLite - sql.js)]
    Server -->|Content| FS[Local Disk - JSON Cache]
    Server -.->|Lazy Fetch| Web[DevDocs.io API]

🚀 Key Capabilities

  • Offline-First: Documentation is cached locally; no internet is needed after ingestion.
  • Ranked Fuzzy Search: Instantly find relevant entries (e.g., "intersection observer").
  • Version Awareness: Automatically maps to specific library versions in your project.
  • Node-Only Architecture: Uses sql.js for zero-native dependencies (no Python/C++ build steps).
  • Structured Outputs: Returns clean, LLM-optimized content.

⚡ Quickstart

  1. Clone & Install
git clone https://github.com/madhan-g-p/DevDocs-MCP.git
cd DevDocs-MCP
pnpm install
  1. Configure Environment
cp .env.example .env
# Edit .env: Set DEVDOCS_DATA_PATH to where you want to store docs.
  1. Build & Run
pnpm build
pnpm start:prod

Note: Strictly use pnpm for development and contributions.


🛠️ Installation & Setup

DevDocs-MCP is optimized for zero-fuss setup with pnpm. It is a Node-only project.

Prerequisites

  • Node.js 18+ (tested on 18.x and 20.x).

Configuration (.env)

| Variable | Description | Default | | :--- | :--- | :--- | | DEVDOCS_DATA_PATH | Path to store downloaded documentation JSONs. | ./data | | MCP_DB_PATH | Path to the SQLite metadata database. | mcp.db | | LOG_LEVEL | Verbosity (debug, info, warn, error). | info |

Ingesting Documentation

Once the server is connected to your agent, use the ingest tool to download documentation for your specific stack: Agent will take care of it once the server is up and running , it is supposed to list the available to tools and take decision accordingly.

{
  "dependencies": {
    "react": "18.2.0",
    "typescript": "5.0.0"
  }
}

Note: The Devdocs fetch url required to be used for ingestion is defined in src/config/constants.ts. This URL currently points to the correct and officially supported path. If the devdocs community changes this path in future, the configuration may need to be updated accordingly. This approach does not involve web scraping. It follows the same supported mechanism used by DevDocs to provide documentation for offline use, similar to how users download documentation within DevDocs itself.


🤖 AI Agent Configuration

RooCode / Cline / Claude Desktop (Recommended: STDIO)

Add this to your mcp_settings.json. By setting the cwd (Current Working Directory), the server will automatically load configuration from your .env file, allowing you to use relative paths for data storage.

{
  "mcpServers": {
    "devdocs": {
      "command": "node",
      "args": ["dist/main.js"],
      "cwd": "file://path/to/your/DevDocs-MCP"
    }
  }
}

Pro Tip: Use the absolute path to the project in cwd. The server will then find your .env and use the DEVDOCS_DATA_PATH and MCP_DB_PATH you've defined there (e.g., ./data or mcp.db), making the setup portable!

Remote / Web Clients (HTTP SSE)

If you need to expose the server via a port (for production/remote setups):

  1. Start the server with a port flag:
    node dist/main.js --port 3000
  2. Configure your client:
    • SSE URL: http://your-server:3000/mcp/sse
    • Type: SSE (Supported by most MCP clients, atleast I guess so)

📖 Further Reading


Inspired from this project devdocs-local , devdocs-local-demo by @Nathaniel Whiteinge