devdocs-mcp
An MCP server that provides version-pinned, deterministic documentation sourced from DevDocs.io to AI assistants (Claude, RooCode, Cline, Copilot etc.) and also via offline mode. Not via Scraping! But using the supported downloading option from devdocs.
README
DevDocs-MCP: Documentation Authority for AI Agents
<table width="100%"> <tbody width="100%" style="margin: 0 auto;"> <tr> <td width="50%" align="center"> <a href="https://glama.ai/mcp/servers/@madhan-g-p/devdocs-mcp"> <img height="180" src="https://glama.ai/mcp/servers/@madhan-g-p/devdocs-mcp/badge" /> </a> </td> <td width="50%" align="center"> <a href="https://registry.modelcontextprotocol.io/?q=io.github.madhan-g-p%2Fdevdocs-mcp"> <img height="180" src="./mcp_registry.png" /> </a> </td> </tr> </tbody> </table>
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
🎯 Overview
<details> <summary><b>What This Project Is</b></summary>
- 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.jsonversions.
</details>
<details> <summary><b>What This Project Is NOT</b></summary>
- ❌ 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).
</details>
<details> <summary><b>Why This Exists (The Problem)</b></summary>
Modern AI coding agents face three major hurdles:
- Hallucination: Guessing API signatures or using deprecated methods.
- Latency: Fetching live web docs for every query is slow.
- 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. </details>
<details> <summary><b>Mental Model</b></summary>
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]
</details>
🚀 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.jsfor zero-native dependencies (no Python/C++ build steps). - Structured Outputs: Returns clean, LLM-optimized content.
⚡ Quickstart
- Clone & Install
git clone https://github.com/madhan-g-p/DevDocs-MCP.git
cd DevDocs-MCP
pnpm install
- Configure Environment
cp .env.example .env
# Edit .env: Set DEVDOCS_DATA_PATH to where you want to store docs.
- Build & Run
pnpm build
pnpm start:prod
Note: Strictly use
pnpmfor 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).
🐳 Docker Usage
Each user's documentation data is persistent and stored locally on their machine.
-
Run the Server (SSE Mode):
docker run -d -p 3000:3000 \ -v "$(pwd)/data:/app/data" \ -e PORT=3000 \ madhandock1/devdocs-mcp:latestThis maps your local
./datafolder to the container, ensuring your downloaded docs are saved. -
Configure Agent:
- SSE URL:
http://localhost:3000/mcp/sse
- SSE URL:
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.<br/> 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.envand use theDEVDOCS_DATA_PATHandMCP_DB_PATHyou've defined there (e.g.,./dataormcp.db), making the setup portable!
Remote / Web Clients (HTTP SSE)
If you need to expose the server via a port (for production/remote setups):
- Start the server with a port flag:
node dist/main.js --port 3000 - Configure your client:
- SSE URL:
http://your-server:3000/mcp/sse - Type:
SSE(Supported by most MCP clients, atleast I guess so)
- SSE URL:
📖 Further Reading
- System Architecture: Deep dive into the data flow, schema, and
sql.jsinternals. - Contributor Guidelines: Workflow, coding standards, and PR requirements.
- LICENSE: MIT License.
Inspired from this project devdocs-local , devdocs-local-demo by @Nathaniel Whiteinge
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。