mcp-pdf-tools
工作正在进行中 - 谨慎使用 - Windows:
MCP PDF 工具服务器
提供 PDF 操作工具的 MCP(模型上下文协议)服务器。该服务器允许 LLM 通过模型上下文协议执行合并 PDF 和提取页面等操作。
特征
将多个 PDF 文件合并为一个 PDF
按照用户指定的顺序将多个 PDF 文件合并为一个 PDF
从 PDF 文件中提取特定页面
搜索 PDF文件系统搜索或全部搜索比这个更好
根据目标输入 PDF 中的文本提取和正则表达式模式匹配来查找(并合并)相关 PDF
Related MCP server: PDFSizeAnalyzer-MCP
安装
克隆此存储库
cd mcp-pdf-tools
# Create and activate virtual environment
uv venv
.venv\Scripts\activate
# Install the package
uv pip install -e .与 Claude Desktop 一起使用
将其添加到您的 Claude Desktop 配置文件(claude_desktop_config.json):
{
"mcpServers": {
"pdf-tools": {
"command": "uv",
"args": [
"--directory",
"PATH_TO\\mcp-pdf-tools",
"run",
"pdf-tools"
]
}
}
}Available Tools
5 toolsextract-pagesB
Extract specific pages from a PDF file
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Input PDF file path | |
| output_path | Yes | Output path for new PDF | |
| pages | Yes | List of page numbers to extract (1-based indexing) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('extract') but doesn't mention whether this is a read-only or destructive operation, potential side effects (e.g., file creation at output_path), error conditions, or performance considerations. This leaves significant gaps in understanding how the tool behaves beyond its 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, direct sentence that efficiently conveys the core function without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly and understand the tool's purpose at a glance.
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 (file manipulation with three parameters) and lack of annotations or output schema, the description is minimally adequate. It covers the basic action but omits critical context like behavioral traits, usage guidelines, and output details, leaving the agent with incomplete information for safe and effective invocation.
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 clear documentation for all three parameters (input_path, output_path, pages). The description adds no additional semantic context beyond what the schema provides, such as file format requirements or page numbering specifics, so it meets the baseline for adequate but not enhanced parameter understanding.
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 specific pages') and resource ('from a PDF file'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'merge-pdfs' or 'search-pdfs' beyond the basic function, which prevents a perfect score.
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 'merge-pdfs' or 'search-pdfs'. It lacks any context about prerequisites, such as needing an existing PDF file, or exclusions, leaving the agent to infer usage scenarios independently.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge-pdfsC
Merge multiple PDF files into a single PDF
| Name | Required | Description | Default |
|---|---|---|---|
| input_paths | Yes | List of input PDF file paths | |
| output_path | Yes | Output path for merged PDF |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('merge') but doesn't cover critical traits like whether it modifies original files, handles errors, requires specific permissions, or has performance limits. This leaves significant gaps in understanding the tool's behavior.
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, clear sentence that directly states the tool's function without unnecessary words. It's front-loaded and efficiently communicates the core purpose, making it highly concise and well-structured.
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 complexity of merging files and the lack of annotations and output schema, the description is insufficient. It doesn't explain return values, error handling, or behavioral nuances, leaving the agent with incomplete information for reliable tool invocation in a real-world context.
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 input schema fully documents the two parameters ('input_paths' and 'output_path'). The description adds no additional semantic context beyond what the schema provides, such as file format details or merging order, meeting the baseline for high schema coverage.
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 ('merge') and resource ('multiple PDF files into a single PDF'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'merge-pdfs-ordered', which suggests a similar function with ordering, 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 like 'merge-pdfs-ordered' or other PDF-related siblings. It lacks context on prerequisites, such as file accessibility or format requirements, leaving usage unclear without external knowledge.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge-pdfs-orderedB
Merge PDFs in a specific order based on patterns or exact names
| Name | Required | Description | Default |
|---|---|---|---|
| base_path | Yes | Base directory containing PDFs | |
| patterns | Yes | List of patterns or names in desired order | |
| output_path | Yes | Output path for merged PDF | |
| fuzzy_matching | No | Use fuzzy matching for filenames |
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 mentions merging PDFs in order based on patterns, but doesn't cover critical aspects like whether this is a read-only or destructive operation, error handling, performance implications, or what the output looks like (e.g., file format, success indicators). For a tool with no annotations, this leaves significant gaps in understanding its behavior.
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 functionality ('merge PDFs in a specific order') and adds necessary detail ('based on patterns or exact names') without any wasted words. It's appropriately sized for the tool's complexity.
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 4 parameters that performs file operations. It doesn't explain what the merged output entails (e.g., file location, format), error conditions, or behavioral traits like whether it overwrites existing files. For a mutation tool with rich parameters, more context is needed to be fully helpful.
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 documents all parameters thoroughly. The description adds minimal value beyond the schema by hinting at the purpose of 'patterns' for ordering, but doesn't provide additional syntax, examples, or constraints. This meets the baseline of 3 when schema coverage is high.
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 as merging PDFs in a specific order based on patterns or exact names, which includes a specific verb ('merge') and resource ('PDFs'). It distinguishes from the sibling 'merge-pdfs' by specifying ordering and pattern-based selection, though it doesn't explicitly contrast with other siblings like 'extract-pages' or 'search-pdfs'.
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 when ordering and pattern-based selection are needed, suggesting it's for merging PDFs with specific ordering criteria. However, it lacks explicit guidance on when to use this tool versus alternatives like 'merge-pdfs' (which might merge without ordering) or other siblings, and doesn't mention prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search-pdfsC
Search for PDF files in a directory with optional pattern matching
| Name | Required | Description | Default |
|---|---|---|---|
| base_path | Yes | Base directory to search in | |
| pattern | No | Pattern to match against filenames (e.g., 'report*.pdf') | |
| recursive | No | Whether to search in subdirectories |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the search action but lacks critical details such as permission requirements, error handling (e.g., invalid paths), performance implications (e.g., large directories), or output format (e.g., list of file paths). This is a significant gap for a tool with potential side effects like file system access.
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 ('Search for PDF files in a directory') and adds a concise modifier ('with optional pattern matching'). There is no wasted text, making it easy for an agent to parse 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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a list of file paths, metadata), error conditions, or behavioral nuances like recursion depth limits. For a search tool with file system interaction, this leaves the agent under-informed about critical operational aspects.
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%, so the input schema fully documents all three parameters (base_path, pattern, recursive). The description adds no additional semantic context beyond implying pattern matching, which is already covered in the schema. This meets the baseline for high schema coverage.
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 a specific verb ('Search') and resource ('PDF files in a directory'), and includes the optional capability ('pattern matching'). It doesn't explicitly distinguish from sibling tools like 'find-related-pdfs', but the focus on file search is clear and non-tautological.
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 'find-related-pdfs' or other siblings. It mentions optional pattern matching but doesn't specify scenarios or exclusions, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
- First observed
extract-pages - First observed
find-related-pdfs - First observed
merge-pdfs - First observed
merge-pdfs-ordered - First observed
search-pdfs
TDQS
Scored across 5 tools
There is some overlap between tools like 'merge-pdfs' and 'merge-pdfs-ordered', which could cause confusion as both handle merging but with different ordering approaches. However, other tools like 'extract-pages' and 'search-pdfs' have distinct purposes, and descriptions help clarify the differences between merging variants.
All tool names follow a consistent verb-noun pattern with hyphen separation (e.g., 'extract-pages', 'merge-pdfs'), making them predictable and readable. There are no deviations in naming conventions across the set.
With 5 tools, this server is well-scoped for PDF manipulation tasks, covering extraction, merging, and searching without being overly complex or too sparse. Each tool appears to serve a specific and necessary function in the domain.
The tool set covers key PDF operations like extraction, merging, and searching, with 'find-related-pdfs' adding a unique content-based feature. A minor gap is the lack of tools for PDF creation or editing (e.g., adding text or images), but core workflows are adequately supported for a focused PDF utility server.
Maintenance
Related MCP Connectors
Privacy-first PDF tools over MCP: merge, split, rotate, delete, compress, protect, inspect.
Document processing over MCP: merge, split and compress PDFs, run OCR, extract document text.
Split, merge and compress PDF files locally - private by design, no uploads.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Related MCP Servers
- MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables comprehensive PDF analysis and manipulation including page size analysis, chapter extraction, splitting, compression, merging, and conversion to images. Provides both MCP server interface for AI assistants and Streamlit web interface for direct user interaction.-
- AlicenseAqualityBmaintenanceRust-powered PDF toolkit over MCP: create, read, and analyze PDFs; extract text and entities for RAG; convert to Markdown; split/merge/rotate/reorder pages; manage form fields and annotations; encrypt documents. Runs locally via uvx oxidize-mcp.121,680 PyPI5MIT
- AlicenseNot gradedqualityCmaintenanceA local MCP server that drives PDFium and pypdf to perform comprehensive PDF operations including inspection, assembly, page editing, watermarking, rendering, extraction, form filling, encryption, compression, attachments, bookmarks, and metadata management.MIT