by jztan
MCP server that lets Claude Code and other AI agents work through large PDFs, and whole folders of them, without overflowing context: hybrid semantic + keyword search, selective page reading, tables, images, OCR, chart data, and multi-column/CJK layouts.
# Add to your Claude Code skills
git clone https://github.com/jztan/pdf-mcpLast scanned: 8/9/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-09T05:04:04.247Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}pdf-mcp is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by jztan. MCP server that lets Claude Code and other AI agents work through large PDFs, and whole folders of them, without overflowing context: hybrid semantic + keyword search, selective page reading, tables, images, OCR, chart data, and multi-column/CJK layouts. It has 100 GitHub stars.
Yes. pdf-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/jztan/pdf-mcp" and add it to your Claude Code skills directory (see the Installation section above).
pdf-mcp is primarily written in Python. It is open-source under jztan on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pdf-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Surgical PDF access for AI agents: search, read, and extract without flooding context.
An MCP server that lets Claude Code and other AI agents search a PDF by meaning or keyword, read only the pages that matter, and cleanly pull out tables, images, and scanned text, even from multi-column and Japanese layouts.
mcp-name: io.github.jztan/pdf-mcp
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.
| Without pdf-mcp | With pdf-mcp | |
|---|---|---|
| Large PDFs | Context overflow | Chunked reading |
| Token budgeting | Guess and overflow | Estimated tokens before reading |
| Finding content | Load everything | Hybrid search (BM25 keyword + semantic) |
| Tables | Lost in raw text | Extracted and inlined per page |
| Charts | Trapped in the plot image | Extracted as (x, y) data tables |
| Multi-column PDFs | Columns interleaved in extracted text | Column-aware reading order (pdf-mcp[multicolumn]) |
| Vertical scripts (Japanese) | Columns scrambled / glyph soup | Geometric reorder of vertical text (tategaki / 縦書き); CJK keyword search works on unspaced Japanese/Chinese/Korean text via a char-split FTS index |
| Images | Ignored | Extracted as PNG files |
| Repeated access | Re-parse every time | SQLite cache |
| Scanned PDFs | No text extracted | OCR via Tesseract, parallelized across pages (pdf_read_pages(ocr=True)) |
| Visual content | Must describe in words | Render page as image (pdf_render_pages) |
| Hidden / injected text | Silently ingested as if a human vetted it | Flagged as untrusted: hidden-text detection (content_trust=True) |
| Folders of PDFs | One document at a time | Corpus tools: warm, triage, and search across a whole folder |
| Tool design | Single monolithic tool | 13 specialized tools |
(x, y) tables from vector charts, read from the plot geometry rather than guessed from the image; declines with a rendered image when a chart can't be read reliablypip install pdf-mcp
Semantic search is included by default (hybrid auto search is built on it;
~67 MB embedding model download on first use). The former [semantic] and
[cjk] extras remain as no-op aliases. Platform note: the bundled
onnxruntime has no wheels for Intel macOS on Python 3.14+ or Alpine/musl;
use Python ≤ 3.13 there.
For correct reading order on multi-column PDFs (adds pymupdf4llm, which pulls pymupdf_layout/onnxruntime):
pip install 'pdf-mcp[multicolumn]'
Without it, multi-column pages fall back to positional-sort extraction, which can interleave columns.
Japanese/Chinese/Korean PDFs work out of the box: keyword search uses a char-split FTS index that matches unspaced CJK terms, and semantic CJK search is covered by the default install.
For OCR on scanned PDFs (requires system Tesseract):
# macOS
brew install tesseract
# Ubuntu/Debian
apt install tesseract-ocr
# On Windows, download the installer from:
# https://github.com/UB-Mannheim/tesseract/wiki
# Then add the install directory to your PATH.
Choose your MCP client below to get started:
claude mcp add pdf-mcp -- pdf-mcp
Or add to ~/.claude.json:
{
"mcpServers": {
"pdf-mcp": {
"command": "pdf-mcp"
}
}
}
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pdf-mcp": {
"command": "pdf-mcp"
}
}
}
Config file location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonRestart Claude Desktop after updating the config.
Requires VS Code 1.101+ with GitHub Copilot.
CLI:
code --add-mcp '{"name":"pdf-mcp","command":"pdf-mcp"}'
Command Palette:
Cmd/Ctrl+Shift+P)MCP: Open User Configuration (global) or MCP: Open Workspace Folder Configuration (project-specific){
"servers": {
"pdf-mcp": {
"command": "pdf-mcp"
}
}
}
Manual: Create .vscode/mcp.json in your workspace:
{
"servers": {
"pdf-mcp": {
"command": "pdf-mcp"
}
}
}
codex mcp add pdf-mcp -- pdf-mcp
Or configure manually in ~/.codex/config.toml:
[mcp_servers.pdf-mcp]
command = "pdf-mcp"
Create or edit .kiro/settings/mcp.json in your workspace:
{
"mcpServers": {
"pdf-mcp": {
"command": "pdf-mcp",
"args": [],
"disabled": false
}
}
}
Save and restart Kiro.
Most MCP clients use a standard configuration format:
{
"mcpServers": {
"pdf-mcp": {
"command": "pdf-mcp"
}
}
}
With uvx (for isolated environments):
{
"mcpServers": {
"pdf-mcp": {
"command": "uvx",
"args": ["pdf-mcp"]
}
}
}
pdf-mcp --help
The typical pattern: call pdf_info first to plan, then pdf_search to locate; its paragraph excerpts are often enough to answer directly. Use pdf_read_pages or pdf_read_all when you need deeper context. For a folder of PDFs, start with pdf_corpus_overview to triage, then pdf_corpus_search to search across documents.
| Tool | What it does |
|---|---|
pdf_info |
Page count, metadata, TOC summary, scanned-page detection. Call first. Pass content_trust=True for a content_trust block (suspicious, hidden_text_runs, hidden_chars, injection_in_hidden, pages_flagged, signals); add detail=True for per-span spans. |
pdf_get_toc |
Full table of contents for documents with >50 bookmarks |
pdf_corpus_warm |
Warm a folder (or list) of PDFs into the cache, text and optional embeddings, within a time budget. Returns per-doc status plus unprocessed/skipped. |
pdf_corpus_overview |
Per-document triage cards for a folder: title, page count, top TOC entries, text coverage. Auto-warms within the budget. |
pdf_corpus_search |
Search across a folder of PDFs (keyword, semantic, or hybrid), returning ranked hits with document and page provenance, excerpts, and coverage. |
pdf_read_pages |
Read specific pages or ranges; OCR-on-demand; embedded images + tables, each with source bbox + clip coordinates. Always returns hidden_text_detected (r |