An MCP enabled multi-format document reader supporting DOCX, PDF, TXT, and Excel files
Project description
MCP Document Reader
MCP (Model Context Protocol) Document Reader - A powerful MCP tool for reading documents in multiple formats, enabling AI agents to truly "read" your documents.
GitHub Repository: https://github.com/xt765/mcp_documents_reader Gitee Repository: https://gitee.com/xt765/mcp_documents_reader PyPI: https://pypi.org/project/mcp-documents-reader/ Official Registry: View on MCP Registry
Features
- Multi-format Support: Supports 4 mainstream document formats: Excel (XLSX/XLS), DOCX, PDF, and TXT
- MCP Protocol: Compliant with MCP standards, can be used as a tool for AI assistants like Trae IDE
- Easy Integration: Simple configuration for immediate use
- Reliable Performance: Successfully tested and running in Trae IDE
- File System Support: Reads documents directly from the file system
Supported Formats
| Format | Extensions | MIME Type | Features |
|---|---|---|---|
| Excel | .xlsx, .xls | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Sheet and cell data extraction |
| DOCX | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Text and structure extraction |
| application/pdf | Text extraction | ||
| Text | .txt | text/plain | Plain text reading |
Installation
Prerequisites
- Python 3.8 or higher
- MCP-enabled AI tool such as Trae IDE
Installation Steps
Option 1: Install from PyPI (Recommended)
pip install mcp-documents-reader
Option 2: Install from Source
# Clone the repository
git clone https://github.com/xt765/mcp_documents_reader.git
# or use Gitee
# git clone https://gitee.com/xt765/mcp_documents_reader.git
cd mcp_documents_reader
# Install dependencies
pip install -e .
Configuration
Using in Trae IDE
Add the following to your Trae IDE's MCP configuration:
Option 1: Using PyPI package (Recommended)
{
"mcpServers": {
"mcp-document-reader": {
"command": "uvx",
"args": [
"mcp-documents-reader"
]
}
}
}
Option 2: Using GitHub repository
{
"mcpServers": {
"mcp-document-reader": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/xt765/mcp_documents_reader",
"mcp_documents_reader"
]
}
}
}
Option 3: Using Gitee repository
{
"mcpServers": {
"mcp-document-reader": {
"command": "uvx",
"args": [
"--from",
"git+https://gitee.com/xt765/mcp_documents_reader",
"mcp_documents_reader"
]
}
}
}
Environment Variables
DOCUMENT_DIRECTORY- Directory where documents are stored (default: "./documents")
Usage
As an MCP Tool
After configuration, AI assistants can directly call the following tool:
read_document (Recommended)
Read any supported document type with a unified interface.
read_document(filename="example.docx")
read_document(filename="example.pdf")
read_document(filename="example.xlsx")
read_document(filename="example.txt")
Tool Interface Details
read_document
Read any supported document type.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string | ✅ | Document file path, supports absolute or relative paths |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_documents_reader-1.0.2.tar.gz.
File metadata
- Download URL: mcp_documents_reader-1.0.2.tar.gz
- Upload date:
- Size: 6.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c10e4b5b760618909ffd1cf147a8eecc39ce11089b74aa6fbdff8f02ef2ac5df
|
|
| MD5 |
991cdfcfba6628ad0fec9a2d2b2553c5
|
|
| BLAKE2b-256 |
7b9b0f65628bff725049955de157bcbd36595c978206fde8ade12a862cbb339b
|
File details
Details for the file mcp_documents_reader-1.0.2-py3-none-any.whl.
File metadata
- Download URL: mcp_documents_reader-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d55c3844d542edaf1737fcc351dc965edf349d4a16466447be4fb9abc0c052e
|
|
| MD5 |
1e4eb33d2605735c74c514f96e828ea4
|
|
| BLAKE2b-256 |
4b9ac6a4c21eef2a48979ce24032d40be269be4f6f04134278d8cbd3270c6a7b
|