McpDocServer is an MCP server that indexes, crawls, and serves framework and library documentation directly to AI coding environments like Cursor. It connects local documentation JSON files and external technical documentation websites to Model Context Protocol clients. Software engineers and developers working with specific UI libraries and web frameworks use this server to eliminate LLM hallucinations regarding outdated methods, nonexistent APIs, and incorrect argument signatures. By leveraging a built-in Puppeteer crawler, McpDocServer scrapes documentation sites based on configurable path patterns, extracts structured content, and stores it locally. Once loaded, the server exposes dedicated search and lookup tools, allowing agents to execute targeted keyword queries or fetch the full markdown and text content of documentation pages. This ensures that coding agents access authoritative documentation and official code snippets in real time during software development.
Category: Developer Tools & Code Intelligence
Tags: crawling, documentation, frameworks, knowledge-retrieval
bash export PUPPETEER_SKIP_DOWNLOAD=true npm install 2. Configure your documentation sources in config/doc-sources.js and generate the documentation cache: bash npm run crawl 3. Add the server configuration to your Cursor mcp.json file, using the absolute path to your server.js file: json { "mcpServers": { "文档 MCP 服务器": { "command": "node", "args": ["/absolute/path/to/server.js"], "env": { "NODE_ENV": "development" } } } } 4. Restart Cursor or verify server execution by running npm test locally.Part of MCP Servers
McpDocServer crawls web documentation using Puppeteer and serves the collected content through MCP tools. It provides tools named search_docs and get_doc_detail, which allow AI assistants to search framework documentation by keyword, filter results by documentation source, reload cached indices, and retrieve complete page details.
McpDocServer is designed to work with Cursor through standard stdio configuration in mcp.json. Because it adheres to the standard Model Context Protocol, it also works with other MCP-compatible clients such as Claude Desktop by configuring node as the executable command pointing to server.js.
To add a framework, update config/doc-sources.js with your target framework name, the base documentation URL, and any include or exclude regular expression patterns. After saving the configuration, run npm run crawl to scrape the pages and save the structured JSON into the docs directory.
You can trigger a reload by using the search_docs tool with reload as the query parameter. When McpDocServer detects this specific search keyword, it automatically rescans and reloads all JSON documentation files stored in the docs folder without requiring a server reboot.