pdf-mcp
MCP PDF for large documents: the agent searches by meaning and keyword across one file or a folder and reads only the pages, tables and scans it needs
- 155 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The server reads files at paths the agent supplies and can fetch a PDF by URL
- PDF text enters the context as untrusted data and may carry hidden instructions
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/pdf-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server reads files at paths the agent supplies and can fetch a PDF by URL
- PDF text enters the context as untrusted data and may carry hidden instructions
This is third-party code. Review the repository files before installing.
What it does
pdf-mcp is an MCP server for PDF files that solves the large-document problem for Claude Code and other agents: instead of loading everything into context, the agent first calls pdf_info for a card, then searches with pdf_search and reads only the matching pages with pdf_read_pages. Search is hybrid: BM25 keywords plus semantic matching. Results return paragraph excerpts with source coordinates and the section they belong to. For a folder of documents there are pdf_corpus_warm, pdf_corpus_overview and pdf_corpus_search: the server prepares a cache, shows document cards and searches all of them at once. The server has 13 tools in total. pdf_render_pages outputs pages as images for vision models, pdf_extract_chart pulls exact (x, y) pairs from vector charts, and OCR through Tesseract runs page by page in parallel. Correct reading order is kept for multi-column and Japanese vertical layouts. Results are cached in SQLite and survive restarts.
Who it is for. For people who work through long PDFs with an agent: reports, regulations, papers, or a folder of related documents.
Good fit when
- A 200-page report needs its risk factors section found and read on its own
- A folder holds a dozen documents and you need one search across all of them with file and page
- You need PDF tables as rows and chart data as exact values
- The PDF is scanned and the text has to come from OCR
- The file is multi-column or Japanese with vertical layout and plain reading scrambles the order
Not a fit when
- You need PDF conversion to Word, Excel or slides, or page editing: the server reads documents and changes nothing
- You need EPUB and chapter-by-chapter book conversation: EPUB is not supported
- You need an open network server without authorization: the HTTP mode will not start without a token or an allow-list of paths
- One short PDF is enough: the client's built-in file reading will do
Example request
Find the risk factors section in the annual report report.pdf, read only those pages and write a short summary with page references.MCP
- Transport
- stdio, http
- Authentication
- not required
Environment variables
PDF_MCP_AUTH_TOKENsecret- Token for the pdf-mcp-http mode; without it and without an allow-list of paths the HTTP server does not start
Limitations
Python 3.10 or newer is required. OCR for scans needs Tesseract installed; in the Claude Desktop extension an English-only Tesseract of about 14 MB downloads on the first scanned page. The extension's first start downloads components of about 250 MB and takes a few minutes. It needs Windows 10 or later, or macOS 13 or later.
For non-English documents configure language support following a separate documentation page. CUDA acceleration is available on NVIDIA cards. For safety the HTTP mode refuses to start without a PDF_MCP_AUTH_TOKEN or an allow-list of paths.
Text from a PDF is returned as untrusted content: pdf_info with content_trust=True reports hidden text that a human reader cannot see.
How to disable. In Claude Code run claude mcp remove pdf-mcp and, if you like, uv tool uninstall pdf-mcp. The Claude Desktop extension is removed on Settings, Extensions. The pdf_cache_clear tool clears the SQLite cache.
FAQ
How do I install the pdf-mcp MCP PDF server in Claude Code?
Run uv tool install pdf-mcp, then claude mcp add pdf-mcp -- pdf-mcp. pipx install pdf-mcp works too. For Claude Desktop there is a ready pdf-mcp.mcpb file in the releases: drag it onto Settings, Extensions.
How do I read large PDFs in Claude Code without overflowing the context?
The agent first calls pdf_info for the page count and table of contents, then pdf_search to locate content and pdf_read_pages only for the pages it needs. The author's demo shows only a small part of the corpus entering the context.
Can pdf-mcp read scanned documents?
Yes, through Tesseract OCR, page by page and in parallel. With the PyPI server you install Tesseract separately: brew install tesseract on macOS, apt install tesseract-ocr on Ubuntu, winget on Windows. The Claude Desktop extension downloads an English Tesseract by itself.
How does pdf-mcp differ from Citra and ComPDF MCP?
pdf-mcp focuses on searching a folder of PDFs and saving context, runs locally and converts nothing. ComPDF MCP converts and edits PDFs through the ComPDF cloud API. Citra reads PDFs with structured text and quotes.
Can pdf-mcp run as a network server?
Yes, with pdf-mcp-http. It is for clients that cannot start a process, such as the MCP connector in the Anthropic API. The process will not start without a PDF_MCP_AUTH_TOKEN and an allow-list of paths. Docker images for amd64 and arm64 are published to GHCR.
Discussion
No questions or reviews yet.
Related
MCP serversMCP PDF from ComPDF: the agent converts PDFs and images to Word, Excel, Markdown and JSON and merges, splits, protects and compares files via a cloud API
A PDF-reading MCP server: structured text, tables, OCR, visual crops and page-level citations
MCP for PDF and ebook files: the agent finds books in a folder and reads EPUB and PDF by chapter and page, with contents and metadata as Markdown
An MCP server built on Docling: converts PDFs into structured documents, builds new ones and feeds them to RAG
An MCP server that turns PDF, DOCX, XLSX, PPTX, images, audio, web pages and YouTube transcripts into Markdown
Translates scientific PDFs while keeping formulas, tables and layout intact, as a CLI, Docker image and MCP server for agents
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| pdf-mcp (this entry) | no | not required | 155 | |
| Citra | yes | not required | 1,050 | an MCP server for reading PDF with structured text, tables and quotes with page numbers |
| ComPDF MCP | yes | API key | 98 | converts and edits PDFs through the ComPDF cloud API instead of searching documents |
| Ebook-MCP | no | not required | 394 | reads EPUB and PDF by chapter for conversation with a book |
README in short
The docs have a before-and-after table, installation for Claude Desktop via mcpb and for Claude Code via uv or pipx, a list of 13 tools with the typical call order, example prompts, an annual-report walkthrough, an HTTP transport section with Docker, and links to the parameter reference, embedding model selection and threat model. A browser demo processes PDFs on the client side.