Document Reader

Provides multi-format document reading, media extraction, diagram analysis, and link validation for MCP clients.
  • python

7

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "qitianfeng-document-reader-mcp": {
      "command": "python",
      "args": [
        "server.py"
      ],
      "env": {
        "PYTHONPATH": "D:\\path\\to\\module",
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

You use this MCP server to read and analyze documents across multiple formats, extract images, verify links, and understand charts and media within Word, PDF, Excel, and text documents. It’s designed for AI agents or tools to programmatically access document content and media for downstream tasks.

How to use

You connect to the MCP server from an MCP client or IDE by configuring a server entry that runs the local Python process. The server exposes tools for reading documents, listing supported formats, retrieving document information, and extracting media. Use the simplest workflow: first inspect the document with get_document_info, then read the document with read_document, and for full analysis including media use read_document_with_media.

Practical usage patterns you can perform include reading a Word document, previewing a PDF page range, extracting images and links from a document, and validating links automatically. Start with listing supported formats to confirm dependencies are ready, then proceed to read content or extract media as needed.

How to install

Prerequisites: you need Python installed on your system. Optional tooling includes a shell to run commands and an editor or IDE to configure MCP server entries.

# Method 1: install using the provided script (recommended)
python install_deps.py

# Method 2: manual install
pip install -r requirements.txt

Additional setup and usage notes

Start the MCP server locally using the command shown in the configuration examples. You will run a Python script that serves the MCP interface for document reading and media extraction.

Configure the MCP client in your IDE to point to the local server. You typically provide the Python command to run and the path to the server script, along with any working directory and environment variables. Two equivalent configurations are shown below. Use the one that matches your local path.

Configuration examples

{
  "mcpServers": {
    "document_reader": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "D:\\your-path\\document-reader-mcp",
      "env": {
        "PYTHONIOENCODING": "utf-8"
      },
      "disabled": false,
      "autoApprove": [
        "list_supported_formats",
        "get_document_info",
        "read_document",
        "read_document_with_media"
      ]
    }
  }
}

Troubleshooting and tips

If the server fails to connect, verify that the working directory exists and server.py is present. Ensure your Python environment is correctly set up and that the PYTHONIOENCODING variable is configured to display UTF-8 properly.

For test runs, you can exercise core features with the provided test utilities or example scripts to validate diagram reading, media extraction, and core functionality.

Available tools

read_document

Read a document and extract textual content from supported formats such as Word, PDF, Excel, and plain text.

read_document_with_media

Read a document while also extracting embedded media such as images and links and provide media-related information.

extract_document_media

Extract images and links from a document and optionally save images to local storage.

get_document_info

Retrieve metadata and basic information about a document, such as format, size, and page counts.

list_supported_formats

List all document formats that the MCP server can read and analyze.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Document Reader MCP Server - qitianfeng/document-reader-mcp | VeilStrat