- DocReader MCP Tool
DocReader MCP Tool
An MCP server that can read online documents to solve problems accordingly!
Content
DocReader MCP Tool
DocReader is a powerful tool for reading and searching documents, built on the Model Context Protocol (MCP). It enables LLMs to search, extract, and synthesize information from web-based documents, assisting AI assistants in answering questions accordingly.
Features
- Search for relevant pages across documentation websites
- Extract content from specific pages
- Aggregate and summarize discovered information
- Complete the document Q&A workflow in a single step
Installation
Requirements
- Python 3.7 or higher
- fastmcp
- beautifulsoup4
- requests
- openai
- python-dotenv
Installation Steps
-
Clone or download this repository.
-
Install the required dependencies:
pip install fastmcp beautifulsoup4 requests openai python-dotenv
- Create a
.envfile and add your API key, preferably a NetMind API key:
API_KEY=your_api_key_here
Usage
Run Directly
cd path/to/DocReaderMCP
python DocReader.py
Run with fastmcp CLI
cd path/to/DocReaderMCP
fastmcp run DocReader.py
Using with Cursor
Method 1: Temporary Addition
- In the Cursor interface, click the extensions/plugins icon in the left sidebar.
- Locate the MCP section or select "Add Tool".
- Choose "Add Local MCP Tool".
- Enter a tool name, such as "DocReader".
- Select the execution method (either point to the script path or connect via URL).
Method 2: Persistent Installation
cd path/to/DocReaderMCP
fastmcp install DocReader.py --name "DocReader" --with beautifulsoup4 requests openai python-dotenv
Toolset
DocReader MCP provides the following tool functions:
- search_docs: Search documentation pages to find those most relevant to your query.
- extract_content: Extract content from a specified URL.
- summarize_findings: Summarize the information collected.
- read_doc: Complete the entire workflow—search, extraction, and summarization—in one step.
Recommended Workflow
- Start by using
search_docsto find relevant pages on the documentation site. - Use
extract_contentto retrieve content from the most relevant pages. - Summarize your findings with
summarize_findings. - Alternatively, use
read_docto perform all these steps at once.
Example
See test_doc_reader.py for more examples of how to use each tool function.
A brief example:
from DocReader import search_docs, extract_content, summarize_findings, read_doc
doc_url = "https://flax.readthedocs.io/en/latest/index.html"
query = "How do I train a model with flax? Please help me write the training code and the inference code after training."
# 1. Search for relevant pages
results = search_docs(doc_url, query, depth=2, max_results=3)
# 2. Extract content
if results:
page_content = extract_content(results[0]['url'], query)
# 3. Summarize findings
summary = summarize_findings(query)
print(summary['summary'])
# 4. One-step workflow
final_answer = read_doc(doc_url, query)
print(final_answer)
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors