mcpField
P
PDF Modifier

PDF Modifier

Local
github.com/mlorentedevProductivity3Updated 2d ago

About PDF Modifier

PDF Modifier is a CLI, MCP server, and web interface for editing PDF text while preserving font styles. It also supports regex-based replacements, hyperlink changes, and layout inspection for PDF workflows.

Key features

  1. 01Replace text while preserving font styles
  2. 02Run regex-based bulk replacements
  3. 03Create or neutralize hyperlinks
  4. 04Process multiple PDFs in batches
  5. 05Browse structure and preview pages
  6. 06Read structure, fonts, and hyperlinks

Use cases

  1. 01Update text across multiple PDFs
  2. 02Process files in scripts or CI pipelines
  3. 03Inspect page layout and fonts
  4. 04Create or disable PDF hyperlinks

MCP support

The MCP server exposes tools for reading PDF structure, inspecting fonts, listing hyperlinks, and modifying PDF content.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mlorentedev-pdf-modifier": {
"command": "uvx",
"args": [
"pdf-modifier-mcp"
]
}
}
}
Run commanduvx pdf-modifier-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypipdf-modifier-mcp1.6.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
passwordanyNoOptional password if the PDF is encrypted.
input_pathstringYesAbsolute path to the PDF file to analyze. Must be a valid, accessible PDF file.
max_file_sizeintegerNoMaximum allowed input file size in bytes (default: 100 MB).

Details

From the project README

PDF Modifier

CLI + MCP server + Web UI for PDF text replacement with font style preservation.

CI PyPI Python 3.12+ Docs License: MIT

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

InterfaceDescriptionRun
CLIpdf-mod — batch jobs, scripting, CI pipelinesmake run cli ARGS="..."
MCP Serverpdf-modifier — AI agents edit PDFsmake run mcp
Web UIFastAPI + SvelteKit — drag & drop, preview, replacemake 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

Markdown supported

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.