mcp-pdf-tools
An MCP server that enables users to read, search, and analyze PDF documents. It provides tools for extracting text, viewing metadata, searching content with context, and generating word statistics.
README
<div align="center">
mcp-pdf-tools
MCP server for extracting text, searching, and analyzing PDF files
Give Claude (or any MCP client) the ability to read, search, and analyze PDF documents.
</div>
What is this?
mcp-pdf-tools is a Model Context Protocol server that gives AI assistants the ability to work with PDF files. Point it at any text-based PDF and your assistant can extract content, search for specific text, pull metadata, and analyze word usage — all without leaving the conversation.
Quick Start
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"pdf-tools": {
"command": "npx",
"args": ["-y", "mcp-pdf-tools"]
}
}
}
Claude Code
claude mcp add pdf-tools npx mcp-pdf-tools
Other MCP Clients
npx -y mcp-pdf-tools
The server communicates over stdio using the MCP protocol.
Tools
pdf_info
Get metadata and statistics about a PDF file.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path |
string | Yes | Absolute path to the PDF file |
Returns: Title, author, page count, text length, creator, and producer information.
pdf_extract_text
Extract all text content from a PDF file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path |
string | Yes | — | Absolute path to the PDF file |
max_chars |
number | No | 50000 | Maximum characters to return (truncates with notice) |
Returns: Full text content of the PDF, prefixed with page count.
pdf_extract_pages
Extract text from a specific page range.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path |
string | Yes | Absolute path to the PDF file |
start_page |
number | Yes | Start page (1-indexed) |
end_page |
number | Yes | End page (inclusive) |
Returns: Text content from the specified page range.
pdf_search
Search for text within a PDF file, returning matches with surrounding context.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path |
string | Yes | — | Absolute path to the PDF file |
query |
string | Yes | — | Text to search for (case-insensitive) |
max_results |
number | No | 20 | Maximum number of matches to return |
Returns: List of matches with line numbers and surrounding context lines.
pdf_word_stats
Get word count and top word frequencies from a PDF.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path |
string | Yes | — | Absolute path to the PDF file |
top_n |
number | No | 20 | Number of top words to include |
Returns: Total word count, page count, and a ranked list of the most frequent words (3+ characters).
Example Conversations
Summarizing a report
You: Summarize the key points in /documents/quarterly-report.pdf
Claude: (uses
pdf_infoto check document size, thenpdf_extract_textto read content)This is a 24-page quarterly report covering Q4 2025. The key points are...
Searching a contract
You: Does the NDA in /legal/nda-acme.pdf mention anything about a non-compete?
Claude: (uses
pdf_searchwith query "non-compete")Yes — I found 3 mentions of "non-compete" in the document. On line 47, there's a clause stating...
Analyzing word usage
You: What are the most discussed topics in /research/paper.pdf?
Claude: (uses
pdf_word_statsto get word frequencies)The paper is 8,400 words across 12 pages. The most frequent terms are "neural" (47 occurrences), "training" (38), and "optimization" (29), suggesting the paper focuses heavily on...
Limitations
Be aware of these current constraints:
- Text-based PDFs only — Scanned or image-based PDFs will return empty text. No OCR support (yet).
- Page extraction is approximate — Page boundaries are detected heuristically. Extracted page ranges may not align perfectly with the visual pages in your PDF viewer.
- No table extraction — Tabular data in PDFs may not preserve its structure in the extracted text.
- Full file loaded into memory — Very large PDFs may be slow to process.
- No merge or split — This tool reads PDFs; it does not modify, merge, or split them.
Development
git clone https://github.com/seraphinederenouard/mcp-pdf-tools.git
cd mcp-pdf-tools
npm install
npm run build
npm test
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.