Document Reader MCP Server
Click on "Deploy 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., "@Document Reader MCP Server search /docs/annual_report.pdf for revenue and show snippets"
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.
Document Reader MCP Server
An MCP (Model Context Protocol) server that lets AI assistants read PDF, Word, Excel, and PowerPoint files without blowing up the context window.
Why this exists
Most AI tools try to dump an entire document into the prompt at once. This server solves that with context-efficient reading by exposing tools that:
Get document metadata first (page count, sheet names)
Read one page / slide / sheet at a time
Search across the entire document and return only relevant snippets
This keeps your context window clean while still giving the AI access to large documents.
Related MCP server: MokuPDF
Supported File Types
Format | Extension(s) | How it's read |
| Page-by-page (native PDF pagination) | |
Word |
| Paragraph-aware chunking |
Excel |
| Sheet-by-sheet (full CSV per sheet) |
PowerPoint |
| Slide-by-slide (true slide extraction) |
Quick Start
Run instantly with npx (recommended)
npx -y pdf-ppt-mcpOr install globally
npm install -g pdf-ppt-mcp
mcp-document-serverOr clone and run locally
git clone https://github.com/abdo544445/pdf-ppt-mcp.git
cd pdf-ppt-mcp
npm install
npm run build
npm startIntegration Guide
VS Code (Cline / RooCode / Copilot MCP)
Add to your MCP config file (usually ~/.cline/mcp_settings.json or .vscode/mcp.json):
{
"mcpServers": {
"document-reader": {
"command": "npx",
"args": ["-y", "pdf-ppt-mcp"]
}
}
}Cursor
Open Settings -> MCP and add:
{
"mcpServers": {
"document-reader": {
"command": "npx",
"args": ["-y", "pdf-ppt-mcp"]
}
}
}Antigravity / Claude Desktop
In your claude_desktop_config.json:
{
"mcpServers": {
"document-reader": {
"command": "npx",
"args": ["-y", "pdf-ppt-mcp"]
}
}
}Local path (if you cloned the repo)
{
"mcpServers": {
"document-reader": {
"command": "node",
"args": ["/absolute/path/to/pdf-ppt-mcp/build/index.js"]
}
}
}Available MCP Tools
1. get_document_info
Always call this first. Returns metadata so the AI knows the document's size before trying to read it.
Input:
Parameter | Type | Description |
|
| Absolute path to the document |
Example output:
report.pdf — PDF document
Total pages: 42
data.xlsx — Excel workbook
Sheets (3): "Summary", "Q1 Data", "Q2 Data"
slides.pptx — PowerPoint presentation
Total slides: 122. read_document_page
Read one specific page, chunk, or sheet at a time to avoid loading the whole document.
Input:
Parameter | Type | Description |
|
| Absolute path to the document |
|
| PDF/Word/PPT: page/chunk/slide number (e.g. |
Example calls:
// Read page 5 of a PDF
{ "filePath": "/docs/report.pdf", "pageOrSheet": "5" }
// Read slide 2 of a PPTX
{ "filePath": "/docs/deck.pptx", "pageOrSheet": "2" }
// Read the "Sales" sheet of an Excel file
{ "filePath": "/docs/data.xlsx", "pageOrSheet": "Sales" }
// Read chunk 3 of a Word document
{ "filePath": "/docs/contract.docx", "pageOrSheet": "3" }3. search_document
Search the entire document for a keyword. Returns matching pages/slides/chunks with surrounding context snippets.
Input:
Parameter | Type | Description |
|
| Absolute path to the document |
|
| Search term (case-insensitive) |
Example output:
Found 2 match(es) for "revenue":
[Page 7]:
...total revenue for Q3 was $4.2M, representing a 12% increase over...
[Page 23]:
...projected revenue targets were exceeded in all regions except...4. list_directory
List all supported document files in a folder. Useful for discovering what documents are available.
Input:
Parameter | Type | Description |
|
| Absolute path to the directory |
Example output:
Found 4 document(s):
annual_report.pdf (2,341.2 KB)
budget_2025.xlsx (128.5 KB)
proposal.docx (54.8 KB)
presentation.pptx (8,902.1 KB)5. read_full_document
Read the entire document at once. Best for small documents only.
Warning: Use
read_document_pageorsearch_documentfor large documents to avoid filling the context window.
Input:
Parameter | Type | Description |
|
| Absolute path to the document |
|
| Max pages/chunks to read (default: |
Recommended Usage Pattern for AI Assistants
When an AI assistant uses this server, the recommended flow is:
1. list_directory("/path/to/folder") -> discover available documents
2. get_document_info("/path/to/doc.pdf") -> learn total pages
3. search_document("/path/to/doc.pdf", "key term") -> find relevant pages
4. read_document_page("/path/to/doc.pdf", "7") -> read specific pageThis approach typically uses less than 5% of context compared to loading the whole document.
VS Code Extension (PDF/PPT MCP Explorer)
This project includes an official Visual Studio Code extension that acts as a graphical wrapper. It makes it seamless to find, manage, and process supported documents visually, and automatically connects them to your AI assistants.
Extension Features
Document Explorer: Instantly find all supported documents (.pdf, .docx, .xlsx, .pptx, .csv) cleanly categorized in a new sidebar tree view.
Auto-Configure Assistant: Single-click configuration to inject the MCP Server directly into Cline or RooCode JSON configurations globally across VS Code and Cursor.
Copy Path for AI: Copy well-crafted prompts with absolute paths for your AI assistant in one click.
Ask AI about Document: Right-click to automatically generate a customized prompt with your specific question regarding the document.
Open Externally: Launch native applications (Word, Excel, Acrobat) directly from the VS Code sidebar.
Add External Files: Browse your operating system and instantly copy external documents into your active workspace so the AI can read them.
Workspace Management: Delete documents or reveal them in your OS file explorer directly from the extension.
Live Updating: Filesystem watchers automatically keep your sidebar in sync with your actual project directory.
Architecture
The server connects to your AI assistant (via MCP protocol) and routes requests to specialized parsing services under the hood.
[ 🤖 AI Assistant ] <── MCP Protocol ──> [ 📄 Document Reader Server ]
(Claude, Cursor) │
│ (routes commands)
▼
[ MCP Tools ]
│
┌──────────────────────┬──────────────────────┼──────────────────────┐
▼ ▼ ▼ ▼
[ read_page ] [ search_doc ] [ get_info ] [ read_full ]
│ │ │ │
└──────────────────────┴────────┬─────────────┴──────────────────────┘
│
▼
[ ⚙️ Parsing Services ]
│
┌──────────────┬───────────┴───┬──────────────┐
▼ ▼ ▼ ▼
PDFService WordService ExcelService PptService
(pdf-parse) (mammoth) (xlsx) (officeparser)
│ │ │ │
└──────────────┴───────┬───────┴──────────────┘
│
▼
[ 📁 Local File System ]Folder Structure
pdf-ppt-mcp/
├── src/
│ ├── index.ts # MCP Server - tool definitions and routing
│ └── services/
│ ├── pdf.service.ts # PDF parsing (pdf-parse v2)
│ ├── word.service.ts # Word parsing (mammoth)
│ ├── excel.service.ts # Excel parsing (xlsx)
│ └── ppt.service.ts # PPT parsing (officeparser)
├── build/ # Compiled output (auto-generated)
├── package.json
├── tsconfig.json
└── README.mdLibraries Used
Library | Purpose |
MCP server/client protocol | |
PDF text extraction (v2, page-by-page) | |
Word | |
Excel | |
PowerPoint |
Development
# Clone the repo
git clone https://github.com/abdo544445/pdf-ppt-mcp.git
cd pdf-ppt-mcp
# Install dependencies
npm install
# Build TypeScript
npm run build
# Start the server (stdio mode for MCP clients)
npm startRequirements
Node.js >= 20.16.0
An MCP-compatible client (VS Code with Cline/RooCode, Cursor, Antigravity, Claude Desktop, etc.)
Roadmap
Published to npm — install with
npx -y pdf-ppt-mcpVS Code Extension wrapper for GUI-based document selection
Support for
.csvfiles (direct reading)Support for password-protected PDFs
OCR for scanned/image-based PDFs
Contributing
Pull requests are welcome. For major changes, please open an issue first.
License
MIT (c) abdo544445
Available Tools
6 toolsget_document_infoA
Get metadata about a document: total pages (PDF), chunks (Word/PPT), or sheet names (Excel). ALWAYS call this first before reading to understand the document size.
Inputs: filePath (required), password.
list_directoryB
List all supported document files (.pdf, .docx, .xlsx, .xls, .pptx, .ppt, .csv) in a directory. Useful for discovering which files are available to read.
Inputs: directoryPath (required).
ocr_pdfA
OCR (Optical Character Recognition) for scanned or image-based PDF files. Use this ONLY when read_document_page returns empty or garbled text, which indicates the PDF contains scanned images instead of selectable text. WARNING: OCR is slow (3-10 seconds per page). Prefer read_document_page first.
Inputs: filePath (required), pageNumber.
read_document_pageA
Read a specific page, chunk, or sheet from a document. For PDF: provide the page number (e.g. '1'). For Word/PPT/CSV: provide the chunk number (e.g. '1'). For Excel: provide the exact sheet name (e.g. 'Sheet1'). Use get_document_info first to know valid ranges.
Inputs: filePath (required), pageOrSheet (required), password.
read_full_documentA
Read the ENTIRE content of a document at once. WARNING: Only use this for small documents (< 5 pages/chunks). For large documents, prefer read_document_page or search_document to preserve context.
Inputs: filePath (required), password, maxChunks.
search_documentA
Search for a query string across an entire document. Returns the matched pages/chunks with surrounding context snippets. Much more efficient than reading the whole document page by page.
Inputs: query (required), filePath (required), password.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly bounded role: discovery (list_directory), sizing (get_document_info), targeted reading (read_document_page), bulk reading (read_full_document), full-text lookup (search_document), and a fallback OCR path (ocr_pdf). The descriptions explicitly resolve the only plausible overlap by directing agents to try read_document_page before ocr_pdf, and to prefer paging over read_full_document for large files.
Five of six names follow a clean snake_case verb_noun pattern (get_document_info, read_document_page, search_document, list_directory, read_full_document). ocr_pdf is the sole deviation, reading as a tool/format label rather than a verb_noun action, but it remains unambiguous.
Six tools is a tight, well-scoped set for a read-only document reader, with no redundant entries. Each tool covers a distinct access strategy (metadata, paging, bulk read, search, OCR, discovery) and none feels like filler.
The read lifecycle is well covered end to end: find files, inspect structure, page through, full read, search, and OCR fallback for scanned content. Minor gaps exist, such as searching across an entire directory rather than a single document, but agents can work around this by iterating list_directory results.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Document conversion and OCR for AI agents: PDF, Office docs, images to text.
Convert PDFs, Office docs, websites and audio into AI-ready Markdown, then search and ask your docs.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to extract and analyze text content from various document formats (PDF, DOCX, PPTX, XLSX) in local knowledge bases, and create new formatted Word and Excel documents with structured data and reports.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to read and process PDF files with intelligent file search, text extraction, image processing, and optional OCR support for scanned documents.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and extract text content from PDF, Excel, and Word documents via the Model Context Protocol.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to parse and search documents including PDF, Word, Excel, PowerPoint, and images via OCR, with support for semantic search and batch processing.2MIT