Skip to main content
Glama
mcp-docs-reader

mcp-docs-reader

by aranshayan

mcp-docs-reader

CI npm License: MIT

An MCP server that lets Claude read your PDFs, Word documents, spreadsheets and CSVs as clean text, Markdown and tables.

  • PDF — text per page, page ranges ("1-3,5"), title metadata.

  • Word (.docx) — Markdown with headings, lists, bold, tables and links, or plain text.

  • Excel (.xlsx) / CSV / TSV — sheet listing, header + rows with paging, cached formula results, ISO dates, automatic CSV delimiter detection.

  • Sandboxed. Only folders passed with --root are readable; symlinks are resolved first, so a link pointing outside is refused. 25 MB file limit. Read-only.

  • Pure JavaScript, no native dependencies, no network access. Node.js 22+.

Quick start

{
  "mcpServers": {
    "docs": { "command": "npx", "args": ["-y", "@aranshayan/mcp-docs-reader", "--root", "/path/to/Documents"] }
  }
}

Claude Code: claude mcp add docs -- npx -y @aranshayan/mcp-docs-reader --root "$HOME/Documents". Multiple --root flags (or MCP_DOCS_ROOTS) are allowed; the default is the current directory.

Related MCP server: Claude RAG MCP Pipeline

Tools

Tool

Description

list_documents

PDF/DOCX/XLSX/CSV/MD/TXT files in a folder (optionally recursive).

read_pdf

Text by page; pages, max_chars.

read_docx

Markdown or text; paginated with start_index.

read_spreadsheet

.xlsx (with sheet) or .csv/.tsv; start_row, max_rows (≤500).

read_text

.md / .txt, paginated.

All tools are readOnlyHint. Document contents are untrusted: a document can contain text that tries to instruct the model.

Limits

  • No OCR. Scanned PDFs return empty pages with an explanatory note.

  • Images in Word documents are dropped; charts and pivot tables are not interpreted.

  • Legacy .doc / .xls are not supported.

  • exceljs depends on uuid 8.x, which has a moderate advisory about a buf argument that exceljs does not use. Consumers cannot override this from a dependency; it is not reachable here.

Tests

npm test generates real PDF, DOCX and XLSX fixtures and checks every tool, path traversal, absolute paths, symlink escape, wrong file types, corrupt files, and the built CLI over stdio.

License

MIT

Available Tools

5 tools
list_documentsList documentsB
Read-onlyIdempotent

List PDF, Word, Excel, CSV, Markdown and text files in an allowed folder.

Inputs: dir, limit, recursive.

read_docxRead Word documentB
Read-onlyIdempotent

Read a .docx as Markdown (headings, lists, tables, links) or plain text. Long documents are paginated.

Inputs: path (required), format, max_chars, start_index.

read_pdfRead PDFA
Read-onlyIdempotent

Extract text from a PDF, page by page. Scanned (image-only) PDFs have no text layer and return empty pages.

Inputs: path (required), pages, max_chars.

read_spreadsheetRead spreadsheetA
Read-onlyIdempotent

Read rows from an .xlsx sheet or a .csv/.tsv file. Without a sheet name for .xlsx, also lists all sheets. Formulas return their cached values.

Inputs: path (required), sheet, max_rows, delimiter, +1 more.

read_textRead text fileC
Read-onlyIdempotent

Read a .md or .txt file (paginated).

Inputs: path (required), max_chars, start_index.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool maps to a distinct file format (PDF, docx, spreadsheet, md/txt) plus one listing tool, so an agent can dispatch purely on file extension. The only borderline case is read_text vs read_docx for docx-as-plain-text, but read_docx's description explicitly covers that path, keeping boundaries clear.

    Naming Consistency4/5

    All tools follow a verb_noun snake_case pattern (list_documents, read_*), which is predictable. Minor deviation: read_text names the output format (text) while siblings are named after input formats (pdf, docx, spreadsheet), so the noun category isn't perfectly uniform.

    Tool Count5/5

    Five tools is well-scoped for a read-only document reader, with one listing tool and one reader per major format family. No tool feels redundant or filler.

    Completeness4/5

    Coverage spans all common office/text formats with pagination and sheet enumeration, which is strong for a reader. The notable gap is scanned/image-only PDFs, which the description admits return empty pages with no OCR or image-read fallback, leaving a dead end; no pptx support is also missing but minor.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Desktop to search and query personal document collections (PDF, Word, Markdown, text) using semantic search and conversational AI with full context preservation across exchanges.
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables LLM hosts like Claude Code or Codex CLI to inspect folder structures and read unstructured documents (PDF, PPTX, DOCX, SVG, and images) by returning raw text and images for the host to summarize or analyze.
      2
      -