DocReader MCP Tool

by NetMindAI-Open

2 stars
239 downloads
Not rated
GitHub

About

An MCP server that can read online documents to solve problems accordingly!

Details

Author
NetMindAI-Open
GitHub stars
2
Downloads
239
Categories
Other

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name DocReader MCP Tool
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.7+, then install dependencies: pip install fastmcp beautifulsoup4 requests openai python-dotenv. Create a .env file

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "docreader mcp tool": {
            "DocReaderMCP": {
                "command": "python",
                "args": [
                    "DocReader.py"
                ]
            }
        }
    }
}

McpServers

{
    "DocReaderMCP": {
        "command": "python",
        "args": [
            "DocReader.py"
        ]
    }
}

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

1. Clone or download this repository.

2. Install the required dependencies:

pip install fastmcp beautifulsoup4 requests openai python-dotenv

1. Create a .env file 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

1. In the Cursor interface, click the extensions/plugins icon in the left sidebar.
2. Locate the MCP section or select "Add Tool".
3. Choose "Add Local MCP Tool".
4. Enter a tool name, such as "DocReader".
5. 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:

1. search_docs: Search documentation pages to find those most relevant to your query.
2. extract_content: Extract content from a specified URL.
3. summarize_findings: Summarize the information collected.
4. read_doc: Complete the entire workflow—search, extraction, and summarization—in one step.

Recommended Workflow

1. Start by using search_docs to find relevant pages on the documentation site.
2. Use extract_content to retrieve content from the most relevant pages.
3. Summarize your findings with summarize_findings.
4. Alternatively, use read_doc to 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:

```python
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."

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.