Allows AI agents to modify PDF text using regex while preserving font styles, managing hyperlinks, and analyzing document structure.
Also known as mlorentedev/pdf-modifier, pdf-modifier
- Stars
- 3
- Tools
- —
- Downloads, 30 days
- 4,265
- Latest version
- 1.10.1
- Last commit
- Nov 14, 2026
- License
- MIT
What is PDF Modifier MCP?
PDF Modifier allows AI agents to modify PDF text using regex while preserving font styles, managing hyperlinks, and analyzing document structure.
Summary generated from the project's README
About PDF Modifier MCP server
PDF Modifier provides a way for AI agents and developers to perform text replacement within PDF documents while maintaining the original visual integrity. It is designed to preserve font family, weight, size, and color during the modification process. Users can interact with the system through a command line interface for batch jobs, a web interface featuring a SvelteKit frontend for drag and drop previews, or as an MCP server for integration with clients like Claude, Cursor, or Codex.
The MCP server implementation exposes specific tools that allow an agent to analyze and edit files. These tools include read_pdf_structure, inspect_pdf_fonts, list_pdf_hyperlinks, and modify_pdf_content. Beyond simple text swaps, the system supports regex for pattern-based bulk replacements and offers the ability to manage hyperlinks by either creating new clickable links or neutralizing existing ones. This makes it suitable for automated document editing pipelines and interactive AI-driven PDF manipulation.
What you can do with it
- 1Automated text replacementAn AI agent can replace specific words throughout a document using regular expressions.
- 2Document structure analysisA developer can use an AI client to examine the internal organization and fonts of a PDF.
- 3Hyperlink managementYou can instruct an agent to modify how links behave within a PDF file.
- 4Visual document editingUsers can upload files to a web interface to preview changes and highlight text.
Written from the project's README. Every use case is checked against a quote from it.
How to install PDF Modifier MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall PDF Modifier MCP in Claude Code
$ claude mcp add pdf-modifier -- uvx pdf-modifierInstall PDF Modifier MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"pdf-modifier": {
"command": "uvx",
"args": [
"pdf-modifier"
]
}
}
}Install PDF Modifier MCP in VS Code
.vscode/mcp.json
{
"servers": {
"pdf-modifier": {
"type": "stdio",
"command": "uvx",
"args": [
"pdf-modifier"
]
}
}
}Install PDF Modifier MCP in VS Code CLI
$ code --add-mcp '{"name":"pdf-modifier","type":"stdio","command":"uvx","args":["pdf-modifier"]}'Install PDF Modifier MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"pdf-modifier": {
"command": "uvx",
"args": [
"pdf-modifier"
]
}
}
}Install PDF Modifier MCP in Codex
$ codex mcp add pdf-modifier -- uvx pdf-modifierInstall PDF Modifier MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.pdf-modifier] command = "uvx" args = ["pdf-modifier"]
Install PDF Modifier MCP in Gemini CLI
$ gemini mcp add -s user pdf-modifier uvx -- pdf-modifierInstall PDF Modifier MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"pdf-modifier": {
"command": "uvx",
"args": [
"pdf-modifier"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablemlorentedev/pdf-modifier is public and reachablegithub.com/mlorentedev/pdf-modifier ↗Pass
- Package names this repository as its sourcepdf-modifier names mlorentedev/pdf-modifier as sourcepypi.org/project/pdf-modifier/ ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for pdf-modifierpypi.org/project/pdf-modifier/ ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-12github.com/mlorentedev/pdf-modifier ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from pdf-modifierPass
- No critical advisory in the package or its dependencies83 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubPDF 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
PDF Modifier MCP questions
How do I add PDF Modifier MCP to Claude Code?
Run claude mcp add pdf-modifier -- uvx pdf-modifier in your terminal. Add --scope user to make it available in every project.
How do I add PDF Modifier MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools are available via the MCP server?
The MCP server provides tools to read PDF structure, inspect fonts, list hyperlinks, and modify PDF content.
Can I replace text using patterns?
Yes, the server supports regex for pattern-based bulk replacements.
Does it change the font when I replace text?
No, it performs text replacement while preserving the font family, weight, size, and color.