
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 分
請在儲存庫或註冊中心條目中宣告授權條款。