Skip to content
MCP server

OnDevicePDF

Local PDF tools for AI agents: merge, split, compress and repair without uploads

Runs locallyActively maintained

The repository was last updated 5 days ago and is published under MIT.

OnDevicePDF is an open-source MCP server for document processing. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, VS Code, macOS
Runs
Locally
What it can do
Can delete data (2 tools)
GitHub stars
0
Last commit

Similar MCP servers

Install

You install MCP servers on a computer. Send yourself the link.

Add with the CLI

Run in a terminal

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

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "ondevicepdf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ondevicepdf-mcp"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "ondevicepdf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ondevicepdf-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "ondevicepdf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ondevicepdf-mcp"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "ondevicepdf-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ondevicepdf-mcp"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add ondevicepdf-mcp -- npx -y ondevicepdf-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.ondevicepdf-mcp]
command = "npx"
args = ["-y", "ondevicepdf-mcp"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "ondevicepdf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ondevicepdf-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user ondevicepdf-mcp npx -- -y ondevicepdf-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "ondevicepdf-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "ondevicepdf-mcp"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About OnDevicePDF

Once connected, an AI assistant can run PDF jobs on your own machine instead of sending documents to a remote service. The server runs as a local program that talks to the client over standard input and output, opens no network port, and only touches the paths the agent names. It is built on the same engine that powers the companion website's in-browser tools.

The toolset covers 19 operations, including merging, splitting, page reordering, compression at three levels, password protection, unlocking, metadata removal, repairing damaged files, grayscale conversion, cropping, page resizing and flattening form fields. Every operation writes a new file next to the input and does not overwrite anything unless explicitly told to.

It suits people who hand contracts, payslips or statements to an assistant and want the processing kept off third-party servers. Limits to know: scanned pages return no text without OCR, merging drops bookmarks and form fields, and cropping hides content rather than deleting it.

Tools this server provides (19)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 19 tools delete data and 1 changes data; 16 names don't say.

From the server's own tool labels and tool names; not verified by us.

pdf_info
Page count, password or restriction status, and stored metadata
extract_text
The text of each page, with scanned pages flagged
merge_pdfsName suggests: changes
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_pagesName suggests: deletes
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 compression
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_metadataName suggests: deletes
Strip author, title, XMP, comment authors and attachments
repair_pdf
Fix files that fail to open
grayscale_pdf
Convert to gray or black and white
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

What it does

Local processing only
Files are handled on your computer and the server exposes no network port.
19 PDF operations
Covers merge, split, reorder, compress, protect, unlock, repair, crop and more.
Non-destructive output
Each tool writes a new file and will not overwrite an existing one unless asked.
Three compression levels
Choose lossless, balanced or strong compression while keeping text selectable.
Works across MCP clients
Setup snippets are provided for Claude Code, Claude Desktop, Cursor, Windsurf and VS Code.
Open-source MIT package
Available on npm and usable as a library as well as an MCP server.

Good for

  • Merging a folder of invoices into one file and compressing it
  • Splitting a long scanned statement into page ranges
  • Removing a password from a file you already have access to
  • Repairing a PDF that will not open
  • Stripping author and metadata before sharing a document
  • Flattening form fields so a filled form cannot be edited

Pricing

Open source

Free and open source under the MIT licence.

Prices change. Check ondevicepdf.com before you buy.

OnDevicePDF FAQ

Are my files uploaded anywhere?

No. The server runs locally over stdio, opens no network port, and the only network use is the one-time npm download of the package.

Does text extraction work on scanned PDFs?

No. Scanned pages have no text layer, so extract_text returns them empty and flags them. OCR is not part of the package.

Does merging keep bookmarks or form fields?

No, merge_pdfs does not carry over bookmarks or form fields.

What do I need to run OnDevicePDF?

Node.js 22.13 or newer, plus an MCP-compatible client.

Is OnDevicePDF free?

Yes. OnDevicePDF is open source, so you can use and self-host it for free.

How do I add OnDevicePDF to Claude Code?

Run this command in your terminal: claude mcp add ondevicepdf-mcp -- npx -y ondevicepdf-mcp

What are the best alternatives to OnDevicePDF?

The closest alternatives to OnDevicePDF are DicePDF, Utilitly PDF, Pdf Tools, Pdf Toolkit MCP and Tooldash MCP.

Where this comes from

  • Description: written from the project's README, the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers