McpDocServer
by ruan11223344
McpDocServer is a development documentation server based on the MCP protocol, designed specifically for various development framework documentation. It offers features like multi-threaded document crawling, local document loading, keyword search, and document detail retrieval.
Last updated: N/A
What is McpDocServer?
McpDocServer is a server that provides accurate documentation retrieval capabilities, especially useful for addressing the 'hallucination' problem in AI tools like Cursor when working with development frameworks. It retrieves the latest and most accurate API information directly from official documentation sources.
How to use McpDocServer?
- Install dependencies using
npm install
. 2. Configure document sources inconfig/doc-sources.js
. 3. Run the crawler usingnpm run crawl
. 4. Start the server usingnpm start
. 5. Configure Cursor with the server's absolute path inmcp.json
.
Key features of McpDocServer
Loads framework documentation data from local JSON files
Provides powerful document search functionality
Offers document detail query
Automatically identifies available document sources
Supports targeted queries for specific document sources
Crawls external documents and automatically converts them to a locally usable format
Supports reloading documents (triggered by searching for 'reload')
Use cases of McpDocServer
Improving the accuracy of AI code completion tools like Cursor
Providing precise API documentation for developers
Creating a centralized documentation repository for multiple frameworks
Offline access to documentation
Quickly searching and retrieving information from large documentation sets
FAQ from McpDocServer
How do I configure the document sources?
How do I configure the document sources?
Create or modify the config/doc-sources.js
file to define the URLs and patterns for the documentation websites you want to crawl.
How do I run the document crawler?
How do I run the document crawler?
After configuring the document sources, run the command npm run crawl
to start the crawler.
How do I start the MCP server?
How do I start the MCP server?
Run the command npm start
to start the server. It will automatically load the documentation files from the docs
directory.
How do I configure Cursor to use this server?
How do I configure Cursor to use this server?
Add a new MCP server configuration to your mcp.json
file, specifying the absolute path to the server.js
file.
How do I reload the documentation without restarting the server?
How do I reload the documentation without restarting the server?
Use the search_docs
tool with the query 'reload'. This will trigger a reload of the documentation files.