PDF

Developer toolsData and AI

Agentic RAG over your PDFs, with page-level evidence to check every answer.

Your AI app calls the PDF MCP server, which does the developer tools and data and AI work and sends the result back to the chat.

About PDF

PDF is a community MCP server from jztan, filed in our directory under developer tools and data and ai. Agentic RAG over your PDFs, with page-level evidence to check every answer.

PDF runs on your own machine: your AI app starts it with the command uvx pdf-mcp==3.8.1 and talks to it over standard input and output.

PDF is listed in the official MCP registry as io.github.jztan/pdf-mcp, version 3.8.1.

At a glance

Publisher
jztan (community)
Runs
Locally on your machine
Install from
Python package on PyPI: pdf-mcp
Written in
Python
License
MIT
GitHub stars
178
Official MCP registry
io.github.jztan/pdf-mcp

How to set up PDF

  1. Install uv on the machine that runs your AI app, because PDF starts with uvx and fetches its Python package on first run.
  2. Check the PDF README for keys or settings; the registry lists none that PDF requires.
  3. Add PDF to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the PDF tools to confirm the connection.
  5. Run one read-only task with PDF first, and keep your app asking before each tool call until the results look right.

PDF compared with similar servers

  • Codex (cexll) by cexll has fewer GitHub stars than PDF (177 against 178); both are community servers, and both run locally.
  • Eplan by Canary-ECAD has fewer GitHub stars than PDF (178 against 178); both are community servers, and Eplan runs as a remote server and PDF runs on your own machine.
  • Hostinger by hostinger has fewer GitHub stars than PDF (177 against 178); both are community servers, and Hostinger runs as a remote server and PDF runs on your own machine.

Before you connect PDF

  • Give PDF its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each PDF tool call until you trust what it does with them.
  • Treat text that PDF fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for PDF on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for PDF

How marketing and sales teams put PDF to work, by company size. Pick the size closest to yours and start PDF on one use case.

Small business

  • A small business with a developer can use PDF to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask PDF to explain and fix a marketing site issue without context switching between tools.
  • A small team can use PDF to clean and enrich a lead list or a spreadsheet in one pass, instead of hours of copy and paste.
  • PDF runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use PDF to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect PDF to keep scripts and automations documented and versioned as they change.
  • Marketing ops can connect PDF to enrich and score inbound leads, so sales sees fit and intent before the first call.
  • Start PDF on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out PDF with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on PDF so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can run PDF inside their own cloud and data boundary, so models and data stay where governance requires.
  • PDF is a community server, so have security review the code and pin a version before PDF touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

PDF README

From jztan/pdf-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

pdf-mcp

Agentic RAG over your PDFs, with the evidence to check every answer.

The agent decides when to search; pdf-mcp does the retrieval and hands back excerpts, each with the page it came from. When the extracted text might be wrong, the agent can render that page and check it against what's actually printed. Hidden text, including injected instructions, is flagged, not silently passed on. It's an MCP server that lets Claude Code and other AI agents search one PDF or a whole folder, read only the pages that matter, and pull out tables, images, and scanned text, even from multi-column and Japanese layouts.

mcp-name: io.github.jztan/pdf-mcp

Try it in your browser

See what your AI agent sees →

Drop in any PDF, or a whole folder of them, and watch an agent triage the corpus, search across every document at once, and read only the pages that matter, using a fraction of the tokens. 100% client-side, no install required.

Why pdf-mcp?

Without pdf-mcp With pdf-mcp
Large PDFs Context overflow Read only the pages you need
Hidden text, including injected instructions Silently ingested Flagged as untrusted, nothing stripped
Checking extracted text Trust it blindly Render the page and compare against what's printed
Finding content Read page after page until it turns up Hybrid search: BM25 keyword + semantic
Folders of PDFs No index: open documents until one matches Warm, triage, and search a whole folder
Warming a big folder Minutes of CPU embedding Length-sorted small-batch CPU encode; optional CUDA embedding, one to two orders of magnitude faster on an NVIDIA card
Tables and charts Lost in raw text Structured rows, and (x, y) data from vector charts
Multi-column and vertical layouts Columns interleaved Correct reading order, including Japanese tategaki
Scanned PDFs No text at all OCR via Tesseract, parallel across pages
Repeated access Re-parse every time SQLite cache that survives restarts
From a researcher using pdf-mcp

"This MCP is genuinely useful, and useful in a way that is unique because it holds through real scientific validation."

(Markson, P 2026), on re-checking Fisher's 1936 iris table

Installation

Claude Desktop: nothing to install first
  1. Download pdf-mcp.mcpb.
  2. In Claude Desktop, open Settings > Extensions, drag the file onto that page, and click Install.
  3. Ask Claude about a PDF by its location, for example "Use pdf-mcp to summarize C:\Users\me\Downloads\report.pdf", or about a whole folder.

The first start downloads pdf-mcp's components (about 250 MB) and can take a few minutes; later starts take seconds. OCR for scanned pages is included: the first scanned page downloads an English-only Tesseract (about 14 MB). Needs Windows 10 or later, or macOS 13 or later (14 on Apple Silicon), and works in Claude Desktop's Chat. Updating, uninstalling and other details are in docs/clients.md.

Claude Code and other MCP clients

Needs Python 3.11 to 3.14. On 3.15 the installer falls back to a very old release, because a dependency has no 3.15 build yet. Install the pdf-mcp command with uv or pipx:

uv tool install pdf-mcp     # or: pipx install pdf-mcp

pip install pdf-mcp works inside a virtual environment; Homebrew's Python and recent Debian and Ubuntu refuse a system-wide pip install.

Then add it to your client. For Claude Code:

claude mcp add pdf-mcp -- pdf-mcp

For VS Code, Cursor, Codex CLI, Kiro or any other MCP client, see docs/clients.md. Then ask your agent to read a PDF.

Search, the corpus tools, tables and multi-column and CJK reading order work out of the box. For non-English documents, see language support. OCR on scanned pages also needs Tesseract:

brew install tesseract                             # macOS
sudo apt install tesseract-ocr                     # Ubuntu/Debian
winget install -e --id UB-Mannheim.TesseractOCR    # Windows

Optional: CUDA embedding on an NVIDIA card warms large folders one to two orders of magnitude faster; see docs/configuration.md.

From Python

pdf-mcp's tools are also plain Python functions, so you can import them and hand a PDF to the Anthropic SDK without running a server. Two runnable scripts, for a question and for a whole document: examples/.

Why this exists, and what broke along the way: Claude's 100-page PDF limit and how I got around it

Tools

13 specialized tools rather than one monolithic one. Typical pattern: pdf_info to plan, pdf_search to locate (its paragraph excerpts often answer the question outright), pdf_read_pages when you need more. For a folder, pdf_corpus_overview to triage, then pdf_corpus_search.

Tool What it does
pdf_info Page count, metadata, TOC summary, scanned-page detection. Call first.
pdf_search Hybrid search (keyword + semantic) by page or section; hits carry an excerpt, source coordinates, the enclosing outline section and a table's lead-in sentence
pdf_read_pages Read specific pages or ranges, with OCR on demand, tables, and embedded images
pdf_read_all Read a whole document in one call, byte-capped
pdf_get_toc Full table of contents for documents with many bookmarks
pdf_render_pages Render pages as PNG for vision models: diagrams, handwriting, scans
pdf_extract_chart Chart data as exact (x, y) tables, read from plot geometry
pdf_corpus_warm Warm a folder of PDFs into the cache within a time budget; OCRs scanned pages between calls (ocr)
pdf_corpus_overview Per-document triage cards for a folder
pdf_corpus_search Search across a folder; hits carry document and page provenance
pdf_cache_stats Per-document cache breakdown and total size
pdf_cache_clear Clear expired or all cache entries
server_info Which optional features and config are active

Text returned by any of these is untrusted content extracted from a PDF. pdf_info(content_trust=True) reports hidden text a human reader cannot see, and the read tools flag it per page.

Example prompts:

"Read the PDF at /path/to/document.pdf"
"Which pages discuss supply chain risks?"
"Find sections about the training process"
"Show me what page 5 looks like"
"OCR pages 3-5 of the scanned PDF"

Full reference, every parameter and response shape: docs/tool-reference.md. Embedding model selection: docs/embedding-models.md.

Example Workflow

For a large document (e.g., a 200-page annual report):

User: "Summarize the risk factors in this annual report"

Agent workflow:
1. pdf_info("report.pdf")
   → 200 pages, TOC shows "Risk Factors" on page 89

2. pdf_search("report.pdf", "risk factors")
   → Matches with structural paragraph excerpts: each excerpt
     is the bullet, paragraph, or heading that matched, not a
     fixed-width window. Often enough to answer directly.

3. If excerpts are sufficient → synthesize answer

4. If more context needed:
   pdf_read_pages("report.pdf", "89-95")
   → Full page text for deeper reading

Remote / HTTP transport

STDIO is the default and is what every example above uses. pdf-mcp-http serves the same tools over HTTP, for clients that cannot spawn a process (the Anthropic API MCP connector, claude.ai custom connectors) and for a warm corpus shared by several clients.

export PDF_MCP_AUTH_TOKEN="$(openssl rand -hex 32)"
pdf-mcp-http

Paths resolve on the server, so an HTTP agent reads what is already there: files under an allow-listed root, or a URL the server fetches. It cannot hand over a file from its own machine. It is single-tenant and fails closed: with no auth token and no [paths] allow list, the process exits rather than serving an open endpoint.

Docker images are published to GHCR for amd64 and arm64, with everything baked in, so every tool works on the first request:

./deploy.sh              # token, image, start, health-check
cp your.pdf documents/   # this folder is the server's /data/pdfs

Read docs/remote-access.md for the trust boundary and threat model before deploying, and docs/configuration.md for setup, client config, and token rotation.

Configuration

pdf-mcp works out of the box. To restrict which paths and URL hosts the server may touch, tune cache and worker settings, or add your own content-trust phrases, see docs/configuration.md.

Roadmap

See ROADMAP.md for planned features and release history.

Contributing

Contributions are welcome. See docs/contributing.md for setup, checks, the coherence eval harness, and quality-loop guidelines.

Contributors

Thank you to everyone who has helped improve this project through code, reviews, testing, and feature requests:

@Summer907 · @ebbsanchez · @VooDisss · @DerDennisOP · @deepdmk · @TheSOV · @janLo · @bbulkow · @HillsCloud · @phinnphace

Per-release contributor credits are listed in the Changelog.

Security

Found a vulnerability? See SECURITY.md for the threat model, reporting channel, and expected response timeline. Please do not open a public GitHub issue for unpatched security reports.

License

MIT. See LICENSE.

Links

Blog posts

The story behind the releases. Building pdf-mcp keeps surprising me: benchmarks that go the wrong way, formats that break everything, features I had to remove. I write about that thinking in The Dispatch. Come along if that's your kind of thing.

Background, benchmarks, and design notes from building pdf-mcp:

Getting started

Corpus & multi-document search

  • A Knowledge Base Is Just a Folder: Turning a folder of PDFs into an agent knowledge base with the corpus tools, no ingestion pipeline or vector store
  • Cross-Document Retrieval for AI Agents Without a Vector Database: Why BM25 scores don't merge across per-document indexes but ranks do, and how two-stage RRF puts a gold document in the top 3 on 84.8% of 184 graded queries over a 100-PDF corpus
  • How Amazon Bedrock Helped Me Make My RAG Better: Benchmarking pdf_corpus_search against Bedrock Knowledge Bases at an equal 2,000-token budget for four cents surfaced two bugs eight months of self-testing missed: an excerpt picker discarding answers from pages it had already retrieved, and one embedding per page hiding short answers
  • Does a PDF Search Tool Still Matter for AI Agents?: Claude Code with and without pdf-mcp on 53 multi-paper questions over 120 papers: answer quality tied, but the search tool read 7.5 pages per question instead of 187 and answered in 25 seconds instead of 92

Search & retrieval

Engineering & security

Questions about PDF

What is the PDF MCP server?

Agentic RAG over your PDFs, with page-level evidence to check every answer. PDF is maintained by jztan on GitHub at jztan/pdf-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the PDF MCP server?

Add PDF to your AI app's MCP config with the command uvx pdf-mcp==3.8.1. In Claude Code, run claude mcp add --transport stdio pdf -- uvx pdf-mcp==3.8.1. To run PDF this way you need uv installed.

Does PDF need an API key?

The registry lists no required keys for PDF. Check the PDF README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is PDF an official MCP server?

No. PDF is a community server maintained by jztan. Community servers can be excellent; read the code and the open issues before you give PDF access to company data.

What license is PDF under?

PDF is released under the MIT license, according to its GitHub repository. The license covers the code of PDF; the service it connects to has its own terms.