mcp_documents_reader
An MCP enabled multi-format document reader supporting DOCX, PDF, TXT, and Excel files
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"mcp-documents-reader": {
"args": [
"mcp-documents-reader@1.0.3"
],
"command": "uvx"
}
}
}
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
tavily_search 14 个参数 需填 1 项
Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.
必填参数:query
tavily_extract 6 个参数 需填 1 项
Extract content from URLs. Returns raw page content in markdown or text format.
必填参数:urls
tavily_crawl 11 个参数 需填 1 项
Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.
必填参数:url
tavily_map 8 个参数 需填 1 项
Map a website's structure. Returns a list of URLs found starting from the base URL.
必填参数:url
tavily_research 2 个参数 需填 1 项
Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.
必填参数:input
服务介绍
MCP Document Reader
<!- - mcp-name: io.github.xt765/mcp_documents_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
# Architecture
graph TB
A[AI Assistant / User] - ->|Call read_document| B[MCP Document Reader]
B - ->|Detect file type| C{File Type?}
C - ->|.docx| D[DOCX Reader]
C - ->|.pdf| E[PDF Reader]
C - ->|.xlsx/.xls| F[Excel Reader]
C - ->|.txt| G[Text Reader]
D - ->|Extract text| H[Return Content]
E - ->|Extract text| H
F - ->|Extract text| H
G - ->|Extract text| H
H - ->|Text content| A
style A fill:# e1f5ff
style B fill:# fff4e1
style C fill:# f0f0f0
style D fill:# e8f5e9
style E fill:# e8f5e9
style F fill:# e8f5e9
style G fill:# e8f5e9
style H fill:# fff9c4
# 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 |
| PDF | .pdf | 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