SylphxAI/pdf-reader-mcp

Give your AI agent eyes for PDFs — structured text, tables, OCR, visual evidence, and page-level citations via MCP. Native Rust, local-first.

884 ★81 forksTypeScriptUpdated 1d ago

What you need to know

Citra — a local-first PDF evidence product for AI agents that turns PDFs into structured text, tables, OCR, visual evidence, and page-level citations via SDK, CLI, or MCP (v4 runs a native Rust engine).

Install

npm install -g @sylphx/pdf-reader-mcp (installs the native binary for your platform only; missing native package fails closed)
claude mcp add pdf-reader -- npx @sylphx/pdf-reader-mcp (Claude Code)
JSON config with command npx @sylphx/pdf-reader-mcp for Claude Desktop / Codex / Cursor / VS Code / any MCP client

Usage

  • Three tools: read_pdf (smart default — markdown, tables, structure, OCR, citations), search_pdf (page + snippet matches before deep reading), pdf_evidence (crops, renders, focused evidence ops)
  • Minimal call: {"sources": [{"path": "/absolute/path/to/report.pdf"}]}
  • HTTP transport: MCP_TRANSPORT=http pdf-reader-mcp
  • Programmatic SDK: import { Citra } from '@sylphx/pdf-reader-mcp/sdk' — citra.read({ sources: [...] })

Key features

  • Agent Document Twin: markdown + structure + geometry + provenance (e.g., 'Page 14, Table 3, cell (row 4, col 2) = $12.4M')
  • Native Rust engine (v4) via a thin Node launcher; ~3.4x smaller install and ~205x fewer files than the prior TS version
  • OCR path for scanned documents with page-linked evidence; table rows/columns/cells with bounding boxes
  • Trust signals / prompt-injection handling when requested; handles broken ToUnicode CMaps without crashing
  • Dual-mode stdio/HTTP; supports dual-era hosts that send server/discover before initialize (e.g. Gemini Antigravity CLI)

Best for

Agents that need citeable, geometry-accurate evidence from PDFs — financial reports, research papers, and scanned documents.

Caveats

  • Local-first and platform-specific: one native binary per platform (macOS arm64/x64, Linux x64/arm64, Windows x64); missing native package → fail closed (no silent engine switch)
  • Performance numbers are same-host measurements — explicitly 'not a multi-host guarantee'
  • Prerelease / transitional package name @sylphx/pdf-reader-mcp (bin pdf-reader-mcp); individual products only, no central monorepo
Platforms: macOS · Windows · LinuxClients: Claude Code · Claude Desktop · Codex · Cursor · VS Code
Documentation ↗

Reviewed 2026-08-07

Topics

agent-document-twinai-agentai-toolscitationsdocument-intelligencedocument-processingevidence-firstllm-toolmcpmodel-context-protocolocrpdfpdf-intelligencepdf-readerpdf-to-markdownragrusttrust-reportvisual-evidence
View on GitHub ↗
Stars
884★
Forks
81
Language
TypeScript
License
MIT
Created
2025-04-04
Last push
2026-08-05