mcp-pdf-tools
The mcp-pdf-tools server enables AI assistants to read, search, and analyze text-based PDF documents through the Model Context Protocol.
Core Capabilities:
Extract metadata - Access document information including title, author, page count, text length, creator, and producer
Extract text content - Get all text from a PDF or specific page ranges, with configurable character limits (default 50,000 chars)
Search within documents - Find text matches with case-insensitive search, returning surrounding context, line numbers, and configurable result limits (default 20 matches)
Analyze word statistics - Generate word frequency reports showing total word count and most common words (3+ characters, default top 20)
Requirements:
Absolute file path to the PDF required
Only works with text-based PDFs (no OCR for scanned documents)
Files loaded entirely into memory
Use Cases: Summarizing documents, searching contracts for specific terms, analyzing research papers, extracting specific sections, and retrieving quick metadata without opening files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-pdf-toolsSummarize the key points in /documents/annual-report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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-toolsOther MCP Clients
npx -y mcp-pdf-toolsThe server communicates over stdio using the MCP protocol.
Tools
pdf_info
Get metadata and statistics about a PDF file.
Parameter | Type | Required | Description |
| 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 |
| string | Yes | — | Absolute path to the PDF file |
| 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 |
| string | Yes | Absolute path to the PDF file |
| number | Yes | Start page (1-indexed) |
| 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 |
| string | Yes | — | Absolute path to the PDF file |
| string | Yes | — | Text to search for (case-insensitive) |
| 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 |
| string | Yes | — | Absolute path to the PDF file |
| 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 testLicense
MIT
Available Tools
5 toolspdf_extract_pagesC
Extract text from a specific page range of a PDF
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the PDF file | |
| start_page | Yes | Start page (1-indexed) | |
| end_page | Yes | End page (inclusive) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the core behavior but lacks critical details: it doesn't mention output format (e.g., plain text, structured data), error handling (e.g., invalid page ranges), performance aspects (e.g., large PDFs), or side effects (e.g., file modifications). For a tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool with 3 parameters and behavioral complexity. It lacks details on output format, error conditions, and usage context relative to siblings. While concise, it doesn't compensate for the missing structured information, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear parameter descriptions in the schema (e.g., 'Absolute path to the PDF file', 'Start page (1-indexed)'). The description adds no additional semantic context beyond implying page-range usage, so it meets the baseline of 3 where the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Extract text') and resource ('from a specific page range of a PDF'), making the purpose immediately understandable. It distinguishes itself from sibling tools like pdf_extract_text (which likely extracts all text) by specifying page-range extraction, though it doesn't explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like pdf_extract_text or pdf_search. It mentions 'specific page range' but doesn't clarify scenarios where this is preferred over full-text extraction or search-based extraction, leaving usage context implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pdf_extract_textC
Extract all text content from a PDF file
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the PDF file | |
| max_chars | No | Maximum characters to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Extract') but doesn't mention potential side effects (e.g., if the file is locked or modified), performance characteristics (e.g., speed for large files), error handling, or output format details. This leaves significant gaps for a tool that interacts with files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the key action and resource, making it easy to parse quickly, which is ideal for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete for a tool that performs file operations. It doesn't address behavioral aspects like error cases (e.g., invalid file paths or non-PDF files), output details (e.g., text format or truncation behavior), or integration with siblings, leaving the agent with insufficient context for reliable use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description doesn't add any parameter-specific information beyond what's in the input schema, which has 100% coverage with clear descriptions for both parameters. Since schema coverage is high, the baseline score is 3, as the description doesn't compensate but also doesn't detract from the well-documented schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Extract') and resource ('all text content from a PDF file'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like pdf_search (which might also extract text but with search filtering) or pdf_word_stats (which analyzes text), leaving room for improvement in sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With siblings like pdf_extract_pages (which might extract specific pages) and pdf_search (which might filter text), there's no indication of when this general text extraction is preferred, nor any mention of prerequisites or constraints beyond the parameters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pdf_infoA
Get metadata and statistics about a PDF file (pages, author, title, text length)
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the PDF file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the tool's purpose as a read-only metadata retrieval operation, which implies non-destructive behavior, but does not add details like error handling, performance characteristics, or output format. The description is adequate but lacks rich behavioral context beyond the basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Get metadata and statistics about a PDF file') and provides specific examples in parentheses. There is no wasted verbiage, and every element contributes directly to understanding the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (single parameter, no output schema, no annotations), the description is reasonably complete. It covers the purpose and key metadata types, but lacks details on output structure or error cases. For a simple read operation, this is sufficient, though not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'file_path' fully documented in the schema. The description does not add any parameter-specific information beyond what the schema provides, such as file format constraints or path examples. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'metadata and statistics about a PDF file', with specific examples like pages, author, title, and text length. It distinguishes from sibling tools (pdf_extract_pages, pdf_extract_text, pdf_search, pdf_word_stats) by focusing on metadata retrieval rather than extraction, search, or word-level analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for obtaining metadata and statistics from a PDF, but does not explicitly state when to use this tool versus alternatives like pdf_word_stats for word-level stats or pdf_extract_text for text content. No exclusions or prerequisites are mentioned, leaving usage context somewhat open-ended.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pdf_searchC
Search for text within a PDF file
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the PDF file | |
| query | Yes | Text to search for | |
| max_results | No | Maximum results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action 'search for text' but doesn't describe how the search behaves—e.g., case-sensitivity, partial matches, return format, or error handling. For a tool with no annotation coverage, this leaves significant gaps in understanding its operational traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly. Every word earns its place, contributing to clarity without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., matches, positions, context), error conditions, or behavioral details. For a search tool with three parameters and no structured output information, more context is needed to fully understand its operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear descriptions for all parameters (file_path, query, max_results). The description adds no additional meaning beyond what the schema provides, such as search semantics or result formatting. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'search' and the resource 'text within a PDF file', making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like pdf_extract_text or pdf_word_stats, which might also involve text processing. The description is specific but lacks sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like pdf_extract_text (which extracts all text) or pdf_word_stats (which analyzes text). There's no mention of prerequisites, such as needing a valid PDF file, or context for when searching is preferred over other text-related operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pdf_word_statsB
Get word count and top word frequencies from a PDF
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the PDF file | |
| top_n | No | Number of top words to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool's function but fails to describe key behaviors: whether it handles large files, what happens with invalid PDFs, if there are rate limits, or the format of the output (e.g., JSON structure). This leaves significant gaps for an agent to understand operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place by specifying the action and resource clearly, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (analyzing PDFs for statistics) and lack of annotations and output schema, the description is incomplete. It does not address behavioral aspects like error handling, performance, or output format, which are critical for an agent to use the tool effectively in real-world scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents both parameters (file_path and top_n). The description adds no additional meaning beyond what the schema provides, such as explaining how word frequencies are calculated or what 'top words' entails. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('Get word count and top word frequencies') and resource ('from a PDF'), distinguishing it from sibling tools like pdf_extract_text (which extracts text) and pdf_info (which provides metadata). It precisely communicates what the tool does beyond just extracting or searching PDF content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like pdf_extract_text (for raw text) or pdf_search (for specific content). It lacks any mention of prerequisites, such as needing a valid PDF file, or exclusions, leaving the agent to infer usage context from the tool name and purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: pdf_extract_pages extracts text from specific pages, pdf_extract_text extracts all text, pdf_info provides metadata, pdf_search finds text matches, and pdf_word_stats analyzes word frequencies. There is no overlap or ambiguity between these functions.
All tools follow a consistent 'pdf_' prefix with descriptive snake_case names (e.g., pdf_extract_text, pdf_search). This pattern is uniform across all five tools, making them predictable and easy to understand.
With 5 tools, this server is well-scoped for PDF processing, covering extraction, metadata, search, and analysis. Each tool earns its place without redundancy, and the count is appropriate for the domain.
The toolset covers core PDF operations well, including extraction, metadata, search, and word analysis. A minor gap exists in lacking tools for PDF manipulation (e.g., merging, splitting, or editing), but the provided tools support common workflows effectively.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/seraphinerenard/mcp-pdf-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server