MCP HubMCP Hub
hanweg

mcp-pdf-tools

by: hanweg

MCP server for working with PDF files

30created 21/12/2024
Visit
PDF
Java

📌Overview

Purpose: To provide a server-side solution for PDF manipulation operations via the Model Context Protocol, enabling efficient processing by LLMs.

Overview: The MCP PDF Tools Server is designed to facilitate a variety of operations on PDF files, allowing users to merge and extract pages efficiently. It leverages the Model Context Protocol, enhancing the capabilities of language models in handling PDF documents.

Key Features:

  • Merge PDFs: Combines multiple PDF files into one, with the ability to specify the order of documents, making it easy to manage and consolidate files.

  • Extract Pages: Allows the extraction of specific pages from PDF files, providing users with flexibility in content management and retrieval.

  • Related PDF Search: Utilizes text extraction and regex pattern matching to find and merge related PDFs based on a target input PDF, enhancing the relevance of merged content.


MCP PDF Tools Server

An MCP (Model Context Protocol) server that provides PDF manipulation tools. This server allows LLMs to perform operations like merging PDFs and extracting pages through the Model Context Protocol.

Features

  • Merge multiple PDF files into a single PDF
  • Merge multiple PDF files into a single PDF in user specified order
  • Extract specific pages from a PDF file
  • Search PDFs (filesystem search or Everything search works better)
  • Find and merge related PDFs based on text extraction and regex pattern matching from a target input PDF

Installation

  1. Clone this repository
cd mcp-pdf-tools

# Create and activate virtual environment
uv venv
.venv\Scripts\activate

# Install the package
uv pip install -e .

Usage with Claude Desktop

Add this to your Claude Desktop configuration file (claude_desktop_config.json):

{
    "mcpServers": {
        "pdf-tools": {
            "command": "uv",
            "args": [
                "--directory",
                "PATH_TO\\mcp-pdf-tools",
                "run",
                "pdf-tools"
            ]
        }
    }
}