io.github.madhan-g-p/devdocs-mcp
编码与调试by madhan-g-p
本地部署的 DevDocs MCP Server,可查询开发者文档,并具备项目级上下文感知能力。
什么是 io.github.madhan-g-p/devdocs-mcp?
本地部署的 DevDocs MCP Server,可查询开发者文档,并具备项目级上下文感知能力。
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="130" 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.
- ❌ 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:
- 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]
🚀 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
DevDocs-MCP is designed to be lightweight and persistent. Since it downloads and caches large documentation datasets, managing your data volumes correctly is essential.
Method A: Docker Compose (Dynamic & Persistent)
This is the recommended way. It supports 3 storage modes via the DEVDOCS_VOLUME_SOURCE variable in your .env file.
-
Configure your preferred storage in
.env:bash# Mode 1: Named volume (Default - Docker manages it) DEVDOCS_VOLUME_SOURCE=devdocs_data # Mode 2: Host Path (Outside Docker - Local folder) # DEVDOCS_VOLUME_SOURCE=./my-docs-storage -
Start the server:
bashdocker compose up -d
Flexibility: Every time you start the container, you can point to a new volume (to start fresh) or an existing volume (to keep your data) just by changing the
DEVDOCS_VOLUME_SOURCEin your.envfile. Both themcp.db(database library) and thedata/(documentation downloads) are stored inside this volume.
Method B: Docker Run (Manual)
If you just want to run the public image directly from Docker Hub:
docker run -d -p 3000:3000 \
-v "devdocs_data:/app/data" \
--name devdocs-mcp \
madhandock1/devdocs-mcp:latest
💾 Data Strategy
The project uses a single mount point at /app/data which contains:
/app/data/mcp.db: The SQLite registry./app/data/docs/: The cached documentation files. This unified structure makes it easy to backup or move your entire documentation authority by simply moving one folder or volume.
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:
bash
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
常见问题
io.github.madhan-g-p/devdocs-mcp 是什么?
本地部署的 DevDocs MCP Server,可查询开发者文档,并具备项目级上下文感知能力。
相关 Skills
前端设计
by anthropics
面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。
✎ 想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。
网页构建器
by anthropics
面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。
✎ 在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。
网页应用测试
by anthropics
用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。
✎ 借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。
相关 MCP Server
GitHub
编辑精选by GitHub
GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。
✎ 这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。
Context7 文档查询
编辑精选by Context7
Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。
✎ 它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。
by tldraw
tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。
✎ 这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。