
Devdocs Mcp
io.github.madhan-g-p由 GitHub 账号 madhan-g-p 发布v1.0.0更新于 Oct 24, 2026
Local DevDocs MCP Server (Developer Docs with project specific context awareness)
概览
一个本地 MCP 服务器,为 AI 助手提供与项目版本匹配、离线缓存的 DevDocs 文档。
- 可以做什么
- DevDocs-MCP 在本地运行,充当 AI 编程助手与 DevDocs.io 数据集之间的文档层。它会按你指定的依赖项抓取文档、缓存到磁盘,并对缓存内容提供排序模糊搜索。它会把文档映射到项目中声明的版本,使回答对应你实际使用的库版本,而不是训练数据。它不是智能体、代码生成器或网页爬虫。
- 适用场景
- 当助手总是猜错 API 签名或混淆库版本,且你希望文档查询无需网络延迟时适用。最适合使用 DevDocs 上已有文档的常见 JavaScript 与 TypeScript 技术栈的开发者。
- 运行要求
- 作为本地 Node.js 进程运行(需要 Node.js 18+,已在 18.x 和 20.x 测试)。可通过 npm 包 @madhan-g-p/devdocs-mcp-server 安装,或用 pnpm 从源码构建。配置使用 .env 文件中的 DEVDOCS_DATA_PATH、MCP_DB_PATH 和 LOG_LEVEL。仅在首次抓取文档时需要网络,之后可离线使用。Docker 为可选方式。
安装
在 SourceWeft 中
- 打开 控制台中的 Devdocs Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
🎯 Overview
What This Project Is
- 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.
What This Project Is NOT
- ❌ 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).
Why This Exists (The Problem)
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.
Mental Model
DevDocs-MCP acts as a middleware between your IDE Agent and the documentation source.
🚀 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
- Configure Environment
- Build & Run
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: -
Start the server:
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:
💾 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)
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.
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.
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:
- 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
来源:README.md,提交 ef64941
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。