PDF Modifier
Modify PDF text, replace with regex, and analyze layout while preserving fonts.
What can you do with PDF Modifier?
- 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
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
pdf-modifierclaude mcp add pdf-modifier -- uvx pdf-modifier==1.10.1
{
"mcpServers": {
"pdf-modifier": {
"command": "uvx",
"args": [
"pdf-modifier==1.10.1"
]
}
}
}
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
PDF 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
Frequently asked questions
What is PDF Modifier?
Modify PDF text, replace with regex, and analyze layout while preserving fonts.
How do I install PDF Modifier?
It runs on your machine. In Claude Code: claude mcp add pdf-modifier -- uvx pdf-modifier==1.10.1. For other clients, paste the JSON configuration from this page into their MCP settings.
Does PDF Modifier need an API key?
Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.
Is PDF Modifier open source?
Its code is public on GitHub, but the repository does not declare a standard license.
Who maintains PDF Modifier?
It is published by mlorentedev. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.