HM

hanweg/mcp-pdf-tools

Developer tools
76 stars 10 forks Quality 76 Trend 8Unlicense

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.

Overview

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.

README

WORK IN PROGRESS - USE WITH CAUTION - Windows:

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 than this
  • 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"
            ],
            "env": {
                "PDF_TOOLS_ALLOWED_DIRS": "PATH_TO\\shared\\pdfs"
            }
        }
    }
}

PDF_TOOLS_ALLOWED_DIRS is an optional path list (use your OS path separator) that restricts file access for all tools. If not set, the server limits access to its current working directory.

Write tools (merge-pdfs, extract-pages, merge-pdfs-ordered) refuse to overwrite an existing output file unless overwrite: true is provided.

View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

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