
This server gives Claude native tools to edit PDFs without generating throwaway scripts. It exposes five MCP operations: read_pdf_structure for extracting text positions and fonts, inspect_pdf_fonts to locate terms and their typography, list_pdf_hyperlinks for link inventory, modify_pdf_content for find-and-replace with regex support, and batch_modify_pdf_content for bulk operations. Built on PyMuPDF with Base 14 font fallback, it preserves layout and styling during replacements. Reach for it when you need to redact invoices, update contract terms, or sanitize documents autonomously. The same package ships with a Typer CLI if you prefer scripting yourself. Installation is a single uvx command, no venv required.
CLI + MCP server + Web UI for PDF text replacement with font style preservation.
pip install pdf-modifier-mcp
# 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-mcp
| Interface | Description | Run |
|---|---|---|
| CLI | pdf-mod — batch jobs, scripting, CI pipelines | make run cli ARGS="..." |
| MCP Server | pdf-modifier-mcp — 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 |
--regex)read_pdf_structure, inspect_pdf_fonts, list_pdf_hyperlinks, modify_pdf_content# 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
MIT