MCP Document Reader
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Document Readerread the quarterly report PDF and summarize the key findings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Features
Read & Write Integration: Capable of both reading documents and generating Word / PowerPoint files based on structured parameters.
Wide Format Support: Supports TXT, CSV, Markdown, DOC, DOCX, PDF, PPT, PPTX, EPUB, XLSX, XLS.
Structured Writing: Supports generation of paragraphs, tables, title pages, bullet point pages, and presentation tables.
Legacy Format Export: Can export
.docand.pptwhen LibreOffice is installed.MCP Protocol: Compliant with MCP standards, usable as a tool for AI assistants (e.g., Trae IDE).
Easy Integration: Ready to use with simple configuration.
Reliable Performance: Automated testing covers reading, generation, conversion fallbacks, and tool interfaces.
File System Support: Read and write documents directly from the file system.
Related MCP server: MCP Documents
📚 Documentation Center
User Guide · API Reference · Contribution Guide · Changelog · License
Architecture
graph TB
A[AI Assistant / User<br/>AI 助手 / 用户] -->|Call MCP tools<br/>调用 MCP 工具| B[MCP Document Reader<br/>MCP 文档读取器]
B -->|Read<br/>读取| C[Document Readers<br/>文档读取器]
B -->|Generate<br/>生成| D[Document Writers<br/>文档生成器]
C -->|TXT / CSV / MD| E[Text-based Readers<br/>文本类读取器]
C -->|DOC / DOCX| F[Word Readers<br/>Word 读取器]
C -->|PPT / PPTX| G[Presentation Readers<br/>演示读取器]
C -->|PDF / EPUB / Excel| H[Structured Readers<br/>结构化读取器]
D -->|write_word_document| I[DOCX Builder<br/>DOCX 生成器]
D -->|write_presentation| J[PPTX Builder<br/>PPTX 生成器]
I -->|Optional conversion<br/>可选转换| K[LibreOffice -> DOC]
J -->|Optional conversion<br/>可选转换| L[LibreOffice -> PPT]
E --> M[Return text / metadata<br/>返回文本 / 元数据]
F --> M
G --> M
H --> M
K --> M
L --> M
M --> 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:#fff9c4Supported Formats
Capability | Format | Extension | Description |
Read | Text |
| Supports multi-encoding text extraction |
Read | CSV |
| Normalized to tab-separated text |
Read | Markdown |
| Direct Markdown text extraction |
Read | Word |
|
|
Read |
| Text extraction | |
Read | PowerPoint |
|
|
Read | EPUB |
| Chapter extraction based on spine order |
Read | Excel |
| Extract worksheet and cell content |
Generate | Word |
| Native generation, supports paragraphs and tables |
Generate | Word |
| Generated via |
Generate | PowerPoint |
| Native generation, supports titles, body, bullets, tables |
Generate | PowerPoint |
| Generated via |
Installation
Using pip (Recommended)
pip install mcp-documents-readerIf you need PowerPoint generation functionality, ensure python-pptx is available in your environment.
If you need to export legacy formats like .doc or .ppt, please install LibreOffice and ensure soffice or libreoffice is added to your PATH.
Install from Source
git clone https://github.com/xt765/mcp_documents_reader.git
cd mcp_documents_reader
pip install -e .MCP Tools
This server provides the following tools:
read_document
Read any supported document type using a unified interface.
Parameters:
filename(string, required): Document file path, supports absolute or relative paths.
extract_document_images
Extract embedded images from DOCX files and return structured JSON metadata.
Parameters:
filename(string, required): DOCX file path.output_dir(string, optional): Directory to export images.
write_word_document
Generate .docx Word documents, or export .doc via LibreOffice conversion.
Parameters:
filename(string, required): Output path, suffix must be.docxor.doc.title(string, optional): Document title.paragraphs(array of strings, optional): Paragraphs to write in order.tables(array of objects, optional): Table definitions, supportstitle,headers,rows.
write_presentation
Generate .pptx presentations, or export .ppt via LibreOffice conversion.
Parameters:
filename(string, required): Output path, suffix must be.pptxor.ppt.title(string, optional): Title page title.subtitle(string, optional): Title page subtitle.slides(array of objects, optional): Slide definitions, supportstitle,paragraphs,bullets,table.
Configuration
Using in Trae IDE / Claude Desktop
Add the following to your MCP configuration file:
Option 1: Using PyPI (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 (Faster for domestic access)
{
"mcpServers": {
"mcp-document-reader": {
"command": "uvx",
"args": [
"--from",
"git+https://gitee.com/xt765/mcp_documents_reader",
"mcp_documents_reader"
]
}
}
}Usage
As an MCP Tool
Once configured, the AI assistant can directly call the following tools:
# 读取 DOCX 文件
read_document(filename="example.docx")
# 读取演示文稿
read_document(filename="example.pptx")
# 生成 DOCX 报告
write_word_document(
filename="report.docx",
title="周报",
paragraphs=["本周总结", "下周计划"],
tables=[
{
"title": "指标表",
"headers": ["名称", "数值"],
"rows": [["线索", 42], ["成交", 8]],
}
],
)
# 生成 PPTX 汇报
write_presentation(
filename="briefing.pptx",
title="季度汇报",
subtitle="Q2",
slides=[
{
"title": "亮点",
"paragraphs": ["概述段落"],
"bullets": ["重点 A", "重点 B"],
}
],
)As a Python Library
from mcp_documents_reader import DocumentReaderFactory
# 使用工厂类(推荐)
reader = DocumentReaderFactory.get_reader("document.pdf")
content = reader.read("/path/to/document.pdf")
# 检查格式是否支持
if DocumentReaderFactory.is_supported("file.xlsx"):
reader = DocumentReaderFactory.get_reader("file.xlsx")
content = reader.read("/path/to/file.xlsx")Tool Interface Details
read_document
Read any supported document type.
Parameter | Type | Required | Description |
filename | string | ✅ | Document file path, supports absolute or relative paths |
Available Tools
4 toolsextract_document_imagesB
Extracts embedded images from a DOCX file and returns structured JSON metadata.
:param filename: Path to the DOCX document :param output_dir: Optional directory to save extracted images :return: JSON payload containing extracted image metadata and saved file paths
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| output_dir | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions the tool extracts images and returns JSON metadata, but lacks critical behavioral details: whether it modifies the original file, handles errors (e.g., invalid paths), requires specific permissions, or has performance constraints. For a file operation tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with three sentences: purpose, parameters, and return value. It's front-loaded with the core functionality. The parameter and return explanations are necessary given the lack of schema descriptions, though the structure could be slightly more polished (e.g., avoiding markdown-like syntax).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (file processing with two parameters), no annotations, and an output schema present (which handles return values), the description is minimally adequate. It covers purpose and parameters but lacks behavioral context like error handling or side effects. With output schema reducing the need to explain returns, a score of 3 reflects this partial completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explicitly documents both parameters: 'filename' as the path to the DOCX document and 'output_dir' as an optional directory for saving images. This adds clear meaning beyond the schema's generic titles. However, it doesn't detail parameter formats (e.g., absolute vs. relative paths) or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Extracts embedded images'), target resource ('from a DOCX file'), and output format ('returns structured JSON metadata'). It distinguishes itself from sibling tools like read_document, write_presentation, and write_word_document by focusing on image extraction rather than document reading or writing operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., file must exist, DOCX format required), compare with similar tools, or indicate scenarios where extraction might fail. The agent must infer usage from the purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_documentB
Reads and extracts text from a specified document file. Supports TXT, CSV, Markdown, DOC, DOCX, PDF, PPT, PPTX, EPUB, and Excel (XLSX, XLS) files.
:param filename: Path to the document file to read (supports absolute or relative paths) :return: Extracted text from the document
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions supported file formats and the return type ('Extracted text'), but lacks details on error handling (e.g., unsupported formats, file not found), performance (e.g., large file handling), or permissions required. For a read operation with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a concise list of supported formats and parameter details. Every sentence adds value without redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (single parameter, read-only operation) and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose, supported formats, and parameter semantics, but could improve by adding behavioral details like error handling or limitations, especially since no annotations are provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful context beyond the input schema, which has 0% description coverage. It explains that the 'filename' parameter is a 'Path to the document file to read (supports absolute or relative paths)', clarifying usage and format. With only one parameter, this compensates well for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Reads and extracts text from a specified document file.' It specifies the verb ('Reads and extracts'), resource ('document file'), and scope ('text'), but does not explicitly differentiate from sibling tools like 'extract_document_images' beyond the focus on text versus images.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It lists supported file formats but does not mention when to choose this over 'extract_document_images' for image extraction or other siblings for writing operations. Usage context is implied by the tool's name but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_presentationC
Generates a PowerPoint presentation in PPTX format, or PPT via LibreOffice conversion.
:param filename: Target output path ending with .pptx or .ppt :param title: Optional title slide title :param subtitle: Optional title slide subtitle :param slides: Optional slide definitions containing title, paragraphs, bullets, and table :return: JSON payload describing the generated file path and format
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| title | No | ||
| subtitle | No | ||
| slides | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool generates a presentation and describes the return value, but lacks critical details such as permissions required, file system impacts, error handling, or rate limits. For a write operation with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core functionality. Each sentence adds value, such as format details and parameter explanations, with no wasted text. The structure is clear, though it could be slightly more streamlined by integrating parameter details more cohesively.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a presentation generation tool with 4 parameters, 0% schema coverage, and no annotations, the description is moderately complete. It covers the basic operation and parameters but lacks depth in behavioral aspects and usage context. The presence of an output schema helps by documenting the return value, but overall completeness is adequate with clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining each parameter's purpose (e.g., 'Target output path ending with .pptx or .ppt' for filename, 'Optional title slide title' for title). However, it does not fully detail the structure of 'slides' (e.g., what 'slide definitions' entail) or provide examples, leaving some ambiguity. This partial compensation justifies a baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'Generates a PowerPoint presentation in PPTX format, or PPT via LibreOffice conversion,' which specifies the verb (generates) and resource (PowerPoint presentation). It distinguishes from siblings like write_word_document by specifying the output format, though it could be more explicit about the distinction. It's not tautological and provides a clear purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like write_word_document or other siblings. It mentions the output formats but does not specify scenarios, prerequisites, or exclusions for usage. This leaves the agent without contextual direction for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_word_documentB
Generates a Word document in DOCX format, or DOC via LibreOffice conversion.
:param filename: Target output path ending with .docx or .doc :param title: Optional document title :param paragraphs: Optional paragraph list written in order :param tables: Optional table definitions using title, headers, and rows :return: JSON payload describing the generated file path and format
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| title | No | ||
| paragraphs | No | ||
| tables | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool generates documents and returns a JSON payload, but lacks details on permissions, error handling, rate limits, or side effects. For a write operation with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose. Each sentence adds value: format details, parameter explanations, and return information. There's minimal waste, though the parameter list could be more integrated into the narrative flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, write operation) and no annotations, the description covers purpose, parameters, and return value. With an output schema present, it doesn't need to explain return values in detail. It's mostly complete but could improve on behavioral context and usage guidelines.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It lists all four parameters with brief explanations (e.g., 'Target output path ending with .docx or .doc'), adding meaning beyond the schema. However, it doesn't fully detail parameter constraints or formats, leaving gaps like table structure specifics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generates a Word document in DOCX format, or DOC via LibreOffice conversion.' It specifies the verb ('Generates'), resource ('Word document'), and format details, distinguishing it from sibling tools like extract_document_images (extraction), read_document (reading), and write_presentation (different document type).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like write_presentation for presentations or read_document for reading documents, nor does it specify prerequisites or contexts for choosing this tool. Usage is implied but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.4.0- First observed
extract_document_images - First observed
read_document - First observed
write_presentation - First observed
write_word_document
TDQS
Each tool has a clearly distinct purpose: extract_document_images extracts images from DOCX, read_document reads text from various file types, write_presentation creates PowerPoint files, and write_word_document creates Word documents. There is no overlap in functionality, making tool selection straightforward for an agent.
All tool names follow a consistent verb_noun pattern (e.g., extract_document_images, read_document, write_presentation, write_word_document). The naming is uniform and predictable, with no deviations or mixed conventions.
With 4 tools, the count is reasonable for a document reader server, covering reading, extraction, and writing for common document types. It is slightly lean but well-scoped, as each tool serves a distinct and useful function without redundancy.
The tool set covers reading and writing for key document formats (Word, PowerPoint, PDF, etc.) and image extraction, but there are notable gaps. For example, it lacks tools for updating or editing existing documents, converting between formats, or handling other common operations like document merging or metadata manipulation, which could limit agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
DocBase MCP server for AI agents
Related MCP Servers
- FlicenseBqualityDmaintenanceMCP server for Office document automation, enabling AI assistants to create, read, and clone Word/Excel/PPT templates while preserving formatting.41-
- AlicenseCqualityDmaintenanceA unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.100MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server for document analysis that provides 21 tools for reading, text analysis, summarization, and data statistics, enabling AI clients to process and understand documents efficiently.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that provides document conversion and processing tools, enabling AI assistants to handle document formats through natural language.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crispvibe/mcp-document-studio'
If you have feedback or need assistance with the MCP directory API, please join our Discord server