# MCP Document Reader

Gives your agent a way to open PDF, DOCX, Excel and TXT files from disk. Handy when the answer sits inside someone else's report or spreadsheet.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: xt765
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/xt765/mcp_documents_reader
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-document-reader

## What it does

One tool, `read_document`, takes a `filename` — absolute or relative — and returns the text. The extension decides which reader runs: `python-docx` handles DOCX, `pypdf` handles PDF, `openpyxl` handles Excel, and TXT is read as plain text. Your agent does not have to care about the format.

Behind the tool sit four readers under a shared `DocumentReaderFactory`. You can call the same code from your own Python project: check `is_supported`, then `read`. The server runs through `uvx`, so `uv` has to be on the machine before you register it, and Python 3.10+ is the floor.

Access follows the file system: the server reads whatever its own process can reach. A scanned PDF is a dead end, because `pypdf` pulls the text layer and nothing else. You would need another tool for OCR, and that is a limit of the library rather than a config switch.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-documents-reader -- uvx mcp-documents-reader
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-documents-reader <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp-document-reader -- uvx mcp-documents-reader
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-documents-reader <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-document-reader": {
            "command": "uvx",
            "args": [
                "mcp-documents-reader"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-documents-reader <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-document-reader": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "mcp-documents-reader"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-documents-reader <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-document-reader uvx mcp-documents-reader
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-documents-reader <command>

## When to use it
- pull the key terms out of a PDF contract
- find specific cells in a spreadsheet you did not write
- get the text from a DOCX without copy-paste
- cross-check numbers in a table against a written report
- load a local TXT file into the agent's context

## Example prompts
- Read `report.pdf` and summarise the main findings
- Open `budget.xlsx` and show which rows run over plan
- Extract the termination clauses from `contract.docx`

## Similar
- [Excel MCP Server](https://affpapa.org/en/nevibecode/mcp/excel-mcp-server.md) — MCP server · ★ 4259
- [kordoc](https://affpapa.org/en/nevibecode/mcp/kordoc.md) — MCP server · ★ 2726
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1247
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1074
- [anymd](https://affpapa.org/en/nevibecode/mcp/anymd.md) — MCP server · ★ 1051
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 777

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
