OnDevicePDF logoOnDevicePDFPrivate by Design

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-mcp

Or as a plain MCP server, from your terminal:

claude mcp add ondevicepdf -- npx -y ondevicepdf-mcp

Claude 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

ToolWhat it does
pdf_infoPage count, password or restriction status, and stored metadata
extract_textThe text of each page, with scanned pages flagged
merge_pdfsCombine PDFs in the order given
split_pdfOne file per page group, or one per page
extract_pagesCopy chosen pages into a new PDF
delete_pagesRemove pages
rotate_pagesRotate all or some pages
reorder_pagesPut pages in a new order
reverse_pagesReverse the page order
interleave_pagesMerge a fronts scan and a backs scan into reading order
compress_pdfLossless, balanced or strong, with text kept sharp
protect_pdfAES-256 password with print, copy and edit permissions
unlock_pdfRemove a password or restrictions from a file you can open
remove_metadataStrip author, title, XMP, comment authors and attachments
repair_pdfFix files that fail to open
grayscale_pdfGray or black and white, without turning pages into pictures
crop_pdfTrim margins in mm, inches, points or percent
resize_pagesFit pages onto A4, Letter, Legal and other sizes
flatten_pdfBake 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