See what your
AI agent sees.

Drop in a PDF. Walk through the three tools pdf-mcp gives your agent.

100% client-side. Your PDFs never leave this tab.
or

Wire it into your agent.

One command. Claude Desktop, Claude Code, Cursor, VS Code, Codex, Kiro.

pip install pdf-mcp

The demo shows 3 of pdf-mcp's 8 tools. The server also includes pdf_get_toc, pdf_read_all, pdf_render_pages, pdf_extract_images, pdf_cache_stats, and pdf_cache_clear, plus OCR, SQLite caching, and RRF hybrid search.

About pdf-mcp

pdf-mcp: PDF extraction for AI agents

pdf-mcp is an open-source MCP (Model Context Protocol) server that lets AI agents read, search, and analyze PDF files without loading the whole document into context. It ships as a Python package and connects to Claude Desktop, Claude Code, Cursor, VS Code Copilot, Codex CLI, Kiro, and any MCP-compatible client with a single command.

What pdf-mcp solves

Large PDFs break most AI coding assistants. Claude Code, for example, refuses PDFs over roughly 30 MB or 100 pages because loading the entire document into context exhausts the token budget. Dumping 100 pages into a model's context is also wasteful — the agent spends its limited attention on pages it will never use. pdf-mcp replaces the all-at-once approach with a set of targeted tools that let the agent explore a document the way a human skims it: inspect structure first, search for relevant sections, then read only the pages that matter.

How agents use pdf-mcp

The server exposes eight tools, but a typical agent workflow uses three of them in sequence. First, pdf_info returns document metadata — page count, table of contents, per-page text coverage, estimated token count. This lightweight call tells the agent the shape of the document before it commits to reading anything. Second, pdf_search runs keyword search (or hybrid semantic + BM25 if fastembed is installed) to find the pages that match the user's question. Finally, pdf_read_pages extracts text, images, and tables from just those pages. The other five tools — pdf_read_all, pdf_get_toc, pdf_render_pages, pdf_extract_images, pdf_cache_stats, and pdf_cache_clear — cover full-document reads, visual inspection of scanned pages, image extraction, and cache management.

What the browser demo shows

This page is a faithful in-browser simulation of the three main tools. The JSON returned by each step matches the real server's response shape field-for-field, so developers can see exactly what the server would wire into their agent. Everything runs client-side using PDF.js — no backend, no uploads, no data leaving the tab. Features the browser cannot replicate honestly (SQLite caching, Tesseract OCR for scanned PDFs, hybrid semantic search, image extraction, structured table parsing) are stubbed with empty fields and clearly labeled as server-only. The point of the demo is to show the agent workflow, not to be a hosted PDF service.

Install

pdf-mcp is MIT-licensed and published on PyPI. Install with pip install pdf-mcp, then add it to your MCP client's config. Full instructions for Claude Desktop, Claude Code, Cursor, VS Code, Codex, Kiro, and generic MCP clients are in the README. The source code is on GitHub, and the Python package is on PyPI. For a detailed write-up of the design decisions, see the blog post on how it was built.

Copied