About PDF Modifier
PDF Modifier is a CLI, MCP server, and web UI for editing PDF text while retaining font styling. It supports regex and batch replacements, hyperlink changes, and PDF inspection for AI agents and document workflows.
Key features
- 01Text replacement with font styles preserved
- 02Regex-based bulk replacement
- 03Create or neutralize hyperlinks
- 04Batch processing across PDFs
- 05Web UI with preview and structure browsing
- 06Inspect PDF structure, fonts, and links
Use cases
- 01Replace draft wording in PDFs
- 02Apply repeated edits to a PDF batch
- 03Review PDF structure and typography
- 04Add or disable PDF hyperlinks
MCP support
The MCP server exposes tools to read PDF structure, inspect fonts, list hyperlinks, and modify PDF content.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
6Saved tool list · updated 2d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| password | any | No | Optional password if the PDF is encrypted. |
| input_path | string | Yes | Absolute path to the PDF file to analyze. Must be a valid, accessible PDF file. |
| max_file_size | integer | No | Maximum allowed input file size in bytes (default: 100 MB). |
Details
From the project READMEPDF Modifier
CLI + MCP server + Web UI for PDF text replacement with font style preservation.
Quick start
pip install pdf-modifier
# CLI
pdf-mod modify input.pdf output.pdf -r "Draft=Final"
# MCP server (for Claude/Cursor/Codex)
claude mcp add -s user pdf-modifier -- uvx pdf-modifier
Interfaces
| Interface | Description | Run |
|---|---|---|
| CLI | pdf-mod — batch jobs, scripting, CI pipelines | make run cli ARGS="..." |
| MCP Server | pdf-modifier — AI agents edit PDFs | make run mcp |
| Web UI | FastAPI + SvelteKit — drag & drop, preview, replace | make up (Docker) or make run api + make run frontend |
Features
- Text replacement — find and replace with font style preservation (family, weight, size, color)
- Regex support — pattern-based bulk replacements (
--regex) - Hyperlinks — create clickable links or neutralize existing ones
- Batch processing — apply same replacements to multiple files
- Web UI — drag & drop PDF upload, structure browser, page preview with zoom, text highlighting
- MCP tools —
read_pdf_structure,inspect_pdf_fonts,list_pdf_hyperlinks,modify_pdf_content
Development
# Setup
make setup
# Run tests
make test
# Full check (lint + type + test)
make check
# Start dev stack (Docker)
make up
# API: http://localhost:8000 | Web: http://localhost:8080
# Start servers locally
make run api # FastAPI dev server
make run frontend # SvelteKit dev server
Documentation
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.