Get the FREE Ultimate OpenClaw Setup Guide →

mcp_documents_reader

Model Context Protocol (MCP) server exposes tools to read multiple document types including DOCX, PDF, Excel, and TXT. This has been tested on Trae Desktop.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio xt765-mcp_documents_reader uvx mcp-documents-reader \
  --env DOCUMENT_DIRECTORY="Directory where documents are stored"

How to use

This MCP server is a Python-based Document Reader that enables AI agents to read and extract text from multiple document formats (Excel, DOCX, PDF, TXT). It exposes a single tool called read_document that accepts a filename and returns the extracted text content. You can configure the server to be run via the MCP framework using the uvx launcher, which pulls the mcp-documents-reader package and launches the reader. After setup, you can call read_document with the path to any supported document, and the server will route the request to the appropriate format-specific reader (DOCX, PDF, Excel, or TXT) and return the concatenated text content for the AI to process.

How to install

Prerequisites:

  • Python 3.10 or newer installed on your system
  • Access to install Python packages from PyPI

Installation steps:

  1. Install the uvx launcher (if not already installed):
pip install uvx
  1. Install the MCP Documents Reader package:
pip install mcp-documents-reader
  1. (Optional) If you prefer installing from source, clone the repository and install in editable mode:
git clone https://github.com/xt765/mcp_documents_reader.git
cd mcp_documents_reader
pip install -e .
  1. Verify installation by running the reader via uvx (as described in the MCP configuration):
uvx mcp-documents-reader

Configuration for MCP usage is shown below in the mcp_config example.

Additional notes

Environment variable: DOCUMENT_DIRECTORY controls the directory where documents are stored. If not set, you can configure it to point to your documents folder (default described as ./documents in the documentation). The server supports reading from absolute or relative file paths. The package relies on python-docx, pypdf, and openpyxl for DOCX, PDF, and Excel formats respectively, so ensure these dependencies are installed as part of the package installation. When using Trae IDE or Claude Desktop, you can reference the mcp-document-reader via the provided MCP configuration examples (GitHub or Gitee sources). If you encounter network or China access issues, consider using the Gitee repository variant as shown in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers