PDF Reader MCP Server
Reads PDFs from local paths or URLs, optionally extracting specific pages, and returns metadata, page counts, and full text; the broader README also describes search and deeper PDF inspection tools.
read_pdf: process one or more PDF sources (local path or URL) in one request.Per-source
pages: extract only specific 1-based pages or ranges; this overrides full-text extraction for that source.include_metadata: include PDF metadata/info objects.include_page_count: include the total page count for each PDF.include_full_text: include the full text content when no page restriction is set.Per the README, the server also supports
read(file/URL/folder to Markdown with token budgets, cursor, OCR, transcripts),searchacross files/folders/URLs, andinspectoperations like rendering pages, extracting regions, OCR, structure, and comparison.
Integrates with Codecov for code coverage reporting, as indicated by the badge showing coverage statistics for the project.
Provides Docker container deployment option, allowing users to run the PDF reader MCP server in an isolated environment with project directory mounting.
Integrates with GitHub for CI/CD pipeline execution, issue tracking, and repository management for the PDF reader MCP server.
Publishes to npm registry allowing installation via npm, with version tracking displayed through npm badge.
Future plans include PWA support for the documentation site, enabling offline access and mobile optimization.
Uses Vitest for performance benchmarking, measuring operations per second for various PDF processing scenarios.
Leverages Zod for input validation, ensuring that requests to the PDF reader MCP server are properly formatted and validated.
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., "@PDF Reader MCP Serverextract text from the quarterly report PDF in the reports folder"
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.
PDF, Word, PowerPoint, Excel, EPUB, HTML and web pages, images (OCR), audio and video (metadata, subtitles, transcripts). A fast Rust MCP server and CLI that runs on your machine. No API key.
Install · Benchmarks · Tools · CLI · Formats · Docs
Formerly pdf-reader-mcp. Migrating from pdf-reader-mcp
A real, unedited terminal recording (asciinema + agg, script). The last command is Claude Code answering from the PDF through the anymd MCP server.
Why anymd
Fast. Native Rust converts in parallel, page by page. On the 19 benchmark documents every tool converted, anymd takes 12.1 s in total; docling 1,723.3 s (143×), markitdown 45.4 s (4×), marker 5,256.3 s (435×).
Accurate. A layout engine rebuilds words from glyph gaps, puts two-column papers in reading order, and recovers tables, including borderless ones. The text stays exactly as printed, with no glued words and no scrambled columns.
Lean on tokens. Pages come back as Markdown with
<!-- page 3 -->citation anchors, a small front-matter header, and compact tables. A token budget and a cursor keep large documents within your agent's context.Every format, one call. One tool reads every format listed below. It also accepts web URLs and whole directories, and
searchlooks across all of them.Local and private. Nothing is uploaded. OCR and transcripts use local tools you already have (tesseract, ffmpeg, whisper.cpp), and only when they are installed.
Related MCP server: pdfeverything
Install
Add anymd to every MCP client on your machine (Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, Gemini CLI) with one command:
npx -y @sylphx/anymd setup # --dry-run to preview, --remove to undoOr add it by hand: every MCP client runs the same command, npx -y @sylphx/anymd. Node 18+ is the only requirement; npm installs the native binary for your platform.
claude mcp add anymd -- npx -y @sylphx/anymdOr as a plugin, with the anymd skill: /plugin marketplace add SylphxAI/anymd, then /plugin install anymd@anymd.
codex mcp add anymd -- npx -y @sylphx/anymdor in ~/.codex/config.toml:
[mcp_servers.anymd]
command = "npx"
args = ["-y", "@sylphx/anymd"]or in .cursor/mcp.json:
{ "mcpServers": { "anymd": { "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }code --add-mcp '{"name":"anymd","command":"npx","args":["-y","@sylphx/anymd"]}'or in .vscode/mcp.json:
{ "servers": { "anymd": { "type": "stdio", "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{ "mcpServers": { "anymd": { "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }Any client that speaks MCP over stdio: command npx, args ["-y", "@sylphx/anymd"]. To keep the server inside one folder, add --allow-dir=/path/to/docs.
npm install -g @sylphx/anymd # or run it once with: npx -y @sylphx/anymd <file>Benchmarks
AgentDocBench is an open benchmark for document → Markdown conversion for agents: license-clean documents in 12 categories (math papers, two-column papers, financial tables, forms, scans, CJK, slides, spreadsheets, Word, EPUB, HTML), scored on verbatim sentences, text F1, reading order, and table cells, with time and output tokens. Every tool runs on the same kind of GitHub-hosted runner (4 CPUs):
anymd | docling | kreuzberg | unstructured | markitdown | marker | pdftotext | |
Overall score | 96.3 | 93.0 | 81.7 | 81.2 | 76.8 | 71.0 | 42.2 |
Table cells F1 | 92.2 | 89.9 | 38.4 | 38.4 | 57.2 | 60.9 | 0.0 |
Reading order | 98.8 | 94.4 | 96.8 | 93.9 | 85.5 | 76.8 | 52.0 |
Docs converted | 38/38 | 38/38 | 38/38 | 38/38 | 38/38 | 30/38 | 23/38 |
Time, all docs | 22.9 s | 2,432.4 s | 16.0 s | 346.5 s | 75.6 s | 7,104.5 s | 0.90 s |
The generated leaderboard, per-category scores (including where anymd loses), and method are in the benchmark guide. The corpus, ground truth, adapters, and raw results are in bench/, and the Benchmark workflow reruns everything; new tools can join with a single adapter file.
MCP tools
anymd exposes three tools.
Tool | Use it to | Key arguments |
| Turn a file, URL, or folder into Markdown |
|
| Find text across files, folders, and URLs |
|
| Go deeper on a PDF |
|
A read answer looks like this:
---
source: papers/attention.pdf
title: Attention Is All You Need
pages: 15
showing: pages 1-9
---
<!-- page 1 -->
# Attention Is All You Need
…
<!-- page 8 -->
|Model|BLEU EN-DE|BLEU EN-FR|
|-|-|-|
|Transformer (big)|28.4|41.8|
…
<!-- Stopped at the 20000-token budget. Continue with cursor: "10", or pick pages, or raise max_tokens. -->search answers with one line per hit:
5 matches for "masked language model" (2 files, 31 sections searched)
### papers/bert.pdf (5)
- p.1: …by using a “**masked language model**” (MLM) pre-training objective, inspired by the Cloze task…
- p.2: …In addition to the **masked language model**, we also use a “next sentence prediction” task…If nothing matches exactly, search falls back to BM25-ranked passages, so a question like "how does bidirectional pretraining work" still finds the right page.
CLI
The same binary is a command-line converter, like MarkItDown but much faster:
anymd report.pdf > report.md # a file
anymd deck.pptx notes.docx budget.xlsx # several files, each with a header
anymd https://example.com/article # a web page (main content only)
cat scan.png | anymd - --ocr # stdin, with OCR
anymd paper.pdf --pages 1-3 --max-tokens 4000
anymd search "indemnification" contracts/ --glob '*.pdf'
anymd doctor # lists the optional tools anymd foundRun with no arguments from an MCP client (piped stdin), or as anymd mcp, and it serves MCP over stdio.
Formats
Input | What you get |
Reading-order Markdown: headings, paragraphs, lists, tables, sub/superscripts, | |
Word | Headings, bold/italic, links, nested lists, tables with merged cells, footnotes, equations as LaTeX |
PowerPoint | One section per slide in deck order, titles, bullets, tables, chart data, speaker notes |
Excel | One table per sheet, dates as ISO strings, capped at 2,000 rows per sheet |
EPUB | One section per chapter in spine order, plus title and author |
HTML and URLs | The main article only: navigation, cookie banners, and sidebars are dropped. Relative links are resolved, and code keeps its language. |
Markdown, text, JSON | Returned unchanged, with pagination |
Images | Dimensions and EXIF (camera, date, GPS), plus OCR text when |
Audio / video | Duration, streams, chapters, embedded and sidecar subtitles (via |
How it works
For PDFs, anymd reads glyph positions rather than text runs. Glyphs are grouped into lines by baseline, which tolerates super- and subscripts. Word spaces come from the gaps between glyphs, measured against the font size and adjusted for letter tracking. A column-aware XY cut finds gutters between running text. Tables come from drawn lines where a table has them (a missing line between two cells makes a merged cell) and from aligned columns of whitespace where it does not. Wrapped cell text stays in its cell, stacked header lines become one header, and a header over several columns is kept with each of them. Text a reader cannot see (invisible text, or text in the colour of the box behind it) is left out. Pages are processed in parallel and isolated from each other, so one malformed page never fails the whole document. The other formats are parsed natively in Rust (zip/XML, calamine, html5ever); no Python, LibreOffice, or cloud service is involved.
Security
Local-first: documents never leave your machine unless you pass a URL, and even then only that URL is fetched.
URL fetches block private and loopback addresses, and every redirect hop is checked again, pinned to its resolved address.
--allow-dir=<path>(repeatable) orMCP_PDF_ALLOWED_DIRSconfines the server to the directories you list.External tools (tesseract, ffprobe, whisper.cpp) are optional. anymd runs them without a shell, with a timeout and an output cap.
See SECURITY.md to report a vulnerability.
Also from Sylphx
repomap: A map of your codebase for AI agents: code graph, search, call paths and change impact — with an interactive graph UI. Rust MCP server + CLI. Local, no API key, MIT.
lockdocs: Exact-version library docs from your lockfile — local, offline, no rate limits.
readme-mark: Beautiful README images from one URL — animated banners, shields-compatible badges, typing text, 3000+ tech icons, GitHub stats cards. Free, no token, drop-in for shields / capsule-render / skill-icons / readme-typing-svg / github-readme-stats.
Star history
License
MIT © Sylphx
Available Tools
1 toolread_pdfB
Reads content/metadata from one or more PDFs (local/URL). Each source can specify pages to extract.
| Name | Required | Description | Default |
|---|---|---|---|
| include_full_text | No | Include the full text content of each PDF (only if 'pages' is not specified for that source). | |
| include_metadata | No | Include metadata and info objects for each PDF. | |
| include_page_count | No | Include the total number of pages for each PDF. | |
| sources | Yes | An array of PDF sources to process, each can optionally specify pages. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool reads content/metadata and allows page specification, but lacks details on permissions, rate limits, error handling, or output format. For a tool with no annotations, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise and front-loaded: two sentences that efficiently convey core functionality without waste. Every sentence earns its place by stating the main purpose and a key feature.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 4 parameters with full schema coverage, the description is minimally adequate. It covers the basic action and a feature, but lacks context on behavioral traits, output, or error handling, making it incomplete for a tool with no structured support.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value beyond the schema by mentioning 'pages to extract,' which aligns with the 'pages' parameter but doesn't provide additional semantics. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Reads content/metadata from one or more PDFs (local/URL).' It specifies the action (reads), resource (PDFs), and scope (content/metadata, multiple sources). However, it doesn't differentiate from siblings since none exist, so it can't achieve a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal usage guidance. It mentions 'Each source can specify pages to extract,' which hints at when to use page specification, but offers no explicit when/when-not scenarios, prerequisites, or alternatives. With no sibling tools, this is less critical, but the guidance remains basic.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
read_pdf
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'read_pdf' has a clear and distinct purpose focused on extracting content and metadata from PDFs.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'read_pdf' follows a clear verb_noun pattern, which would be consistent if more tools were added.
A single tool is too few for a server named 'PDF Reader MCP Server', as this suggests a broader domain that might include operations like search, annotate, convert, or edit PDFs. The scope feels incomplete with just reading functionality.
The tool set is severely incomplete for a PDF reader domain. While 'read_pdf' covers extraction, there are obvious gaps such as searching within PDFs, manipulating pages, adding annotations, converting formats, or handling PDF metadata updates, which are common in such applications.
Maintenance
Related MCP Connectors
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Generate PDFs from templates via AI chat. Works with Claude, ChatGPT, Cursor, and any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to securely read and extract information from PDF files including text content, metadata, and page counts from both local files and URLs within the project context.11,638 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to perform 13 PDF operations (merge, split, compress, watermark, encrypt, and more) on local files via MCP.2-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to extract structured data from PDFs with confidence scores and provenance, and to search, review, and correct documents via MCP tools, resources, and prompts.-
- AlicenseNot gradedqualityAmaintenanceExtracts text and tables from PDFs for AI agents via MCP, enabling structured data retrieval from invoices, reports, and statements.1MIT