For AI agents
PDF tools for AI agents that never upload your files
Ask Claude, Cursor or any AI assistant that speaks MCP to merge, split, compress, password-protect, unlock or repair a PDF, and the work happens on your own computer. It is the same engine that runs this website in your browser, packaged as a free, open-source MCP server.
Why it matters which PDF tool your agent uses
Many PDF services now offer an MCP server or a chat-app plugin. Most of them process your file by sending it to their own servers, the same way their websites do. That is a poor fit for the documents people actually hand to an assistant: contracts, payslips, bank statements, medical letters.
This server has nowhere to send your file. It runs as a small program on your machine, talks to your AI app through standard input and output, opens no network port, and reads and writes only the files the agent names.
Set it up in one minute
You need Node.js 22.13 or newer.
Claude Code
As a plugin, inside a Claude Code session (version 2.1.275 or later):
/plugin install ondevicepdf --marketplace RaviChanduEdru/ondevicepdf-mcpOr as a plain MCP server, from your terminal:
claude mcp add ondevicepdf -- npx -y ondevicepdf-mcpClaude Desktop, Cursor, Windsurf and other MCP apps
Add this to the app's MCP configuration file:
{
"mcpServers": {
"ondevicepdf": {
"command": "npx",
"args": ["-y", "ondevicepdf-mcp"]
}
}
}VS Code
Add this to .vscode/mcp.json:
{
"servers": {
"ondevicepdf": {
"command": "npx",
"args": ["-y", "ondevicepdf-mcp"]
}
}
}Then just ask, for example: “Merge every PDF in my invoices folder into one file, then compress it.”
The 19 tools
| Tool | What it does |
|---|---|
| pdf_info | Page count, password or restriction status, and stored metadata |
| extract_text | The text of each page, with scanned pages flagged |
| merge_pdfs | Combine PDFs in the order given |
| split_pdf | One file per page group, or one per page |
| extract_pages | Copy chosen pages into a new PDF |
| delete_pages | Remove pages |
| rotate_pages | Rotate all or some pages |
| reorder_pages | Put pages in a new order |
| reverse_pages | Reverse the page order |
| interleave_pages | Merge a fronts scan and a backs scan into reading order |
| compress_pdf | Lossless, balanced or strong, with text kept sharp |
| protect_pdf | AES-256 password with print, copy and edit permissions |
| unlock_pdf | Remove a password or restrictions from a file you can open |
| remove_metadata | Strip author, title, XMP, comment authors and attachments |
| repair_pdf | Fix files that fail to open |
| grayscale_pdf | Gray or black and white, without turning pages into pictures |
| crop_pdf | Trim margins in mm, inches, points or percent |
| resize_pages | Fit pages onto A4, Letter, Legal and other sizes |
| flatten_pdf | Bake form fields and annotations into the page |
Every tool writes a new file and never overwrites one unless asked, so an agent cannot quietly replace your original.
How “never uploaded” is checked
The package's test suite runs every tool with all of Node's network functions switched off (sockets, TLS, HTTP, DNS, fetch and WebSocket) and fails if anything even tries to use them. A control test proves the switch catches a real request. The only download is the one-time install of the package itself.
On this website the same promise is enforced by your browser. See how to verify it yourself.
Limits, stated plainly
- Scanned pages have no text layer, so text extraction returns them empty. OCR is available on this website.
- Merging does not carry over bookmarks or form fields.
- Cropping hides what is outside the box; it does not delete it. Use Redact PDF to remove content for good.