PDF Reader MCP

July 25, 2026 · View on GitHub

PDF Reader MCP

Give your AI agent eyes for PDFs.

Turn PDFs into structured text, tables, OCR, visual evidence, and page-level citations — locally, with one MCP server.

Plain-text PDF tools make agents guess. PDF Reader MCP gives them evidence.

npm version License: MIT CI stars

Why this exists

Plain text vs evidence

Most PDF tools dump text. Agents then invent page numbers, miss tables, and cite the wrong cell.

PDF Reader MCP returns an Agent Document Twin: markdown + structure + geometry + provenance your agent can actually trust.

Without evidenceWith PDF Reader MCP
“The revenue was about $12M”“Page 14, Table 3, cell (row 4, col 2) = $12.4M
Lost table structureRows, columns, cells, bounding boxes
Scanned PDF becomes noiseOCR path with page-linked evidence
Hidden text / prompt injection ignoredTrust signals when requested

Install (30 seconds)

npm install -g @sylphx/pdf-reader-mcp

Or pin the current release:

npm install -g @sylphx/pdf-reader-mcp@4.1.1

One native binary is installed for your platform only (not all five).

PlatformNative package (auto optionalDependency)
macOS arm64@sylphx/pdf-reader-mcp-darwin-arm64
macOS x64@sylphx/pdf-reader-mcp-darwin-x64
Linux x64@sylphx/pdf-reader-mcp-linux-x64-gnu
Linux arm64@sylphx/pdf-reader-mcp-linux-arm64-gnu
Windows x64@sylphx/pdf-reader-mcp-win32-x64-msvc

Missing native package → fail closed (no silent engine switch).

Quick start

Claude Code

claude mcp add pdf-reader -- npx @sylphx/pdf-reader-mcp

Claude Desktop / Cursor / VS Code / any MCP client

{
  "mcpServers": {
    "pdf-reader": {
      "command": "npx",
      "args": ["@sylphx/pdf-reader-mcp"]
    }
  }
}

Stdio / HTTP

pdf-reader-mcp
MCP_TRANSPORT=http pdf-reader-mcp

What you get

Three tools. One product surface.

ToolWhat agents use it for
read_pdfSmart default: markdown, tables, structure, OCR, citations
search_pdfFind page + snippet matches before deep reading
pdf_evidenceCrops, renders, inspect, focused evidence ops

Minimal call:

{
  "sources": [{ "path": "/absolute/path/to/report.pdf" }]
}

Flagship use cases

  1. Financial reports — extract table cells agents can cite by page and geometry
  2. Research papers — headings, reading order, page-level quotes
  3. Scanned documents — OCR path with evidence, not a text soup

Install footprint (honest product comparison)

Compare full clean installs, not “JS wrapper tarball vs native executable”:

Metric (measured clean install, linux-x64)Historical TS 3.0.14Sole-Rust 4.1.0
Main package on disk~403 KB~77 KB
Full node_modules~82.3 MiB~24.4 MiB (~3.4× smaller)
Installed files4,10120 (~205× fewer)
Production npm dependency graphPDF.js + MCP TS SDK + more{} + one platform native

The native binary is multi-megabyte because it is the PDF intelligence engine (parser, server, rendering/table/OCR routing). That is expected and still yields a cleaner, smaller install than shipping PDF.js + a JS dependency tree.

Details: installed footprint comparison

Performance

Controlled same-host linux-x64 dual-mode A/B vs @sylphx/pdf-reader-mcp@3.0.14, using registry-installed 4.1.x natives:

ModeWhat it measuresResult
persistent_warmlong-lived server, repeated identical local `read_pdf$ \text{after} \text{warm}-\text{up}**≥ ~10 \times ** \text{median} \text{latency} \text{improvement} \text{on} \text{all} 8 \text{required} \text{fixture} \text{classes}
$startup_inclusive`spawn + initialize + one tasklarge advantage on the same fixtures

persistent_warm includes a process-local cache for identical local path+options. First request in a process still pays full parse cost.

Also: install footprint is much smaller than TS 3.0.14 on measured linux-x64 (~3.4× less disk, ~205× fewer files), and the 4.1.0 native binary is smaller than 4.0.2 (strip/LTO).

Not a multi-host guarantee. Details: 4.1.0 report · claims policy

Engine note

Version 4 runs a native Rust engine on supported platforms via a thin Node launcher.

Local-first. Five platforms. One clean install.

Engineering history, recovery pins, and ADRs live under docs/migration.md — not the product pitch.

Product proof

Docs

License

MIT


If this saves your agents from PDF hallucinations, star the repo and share a demo with your team.