DicePDF

v0.1.0
io.github.ishan-maheshwari/dicepdf Checked 2 days ago Published 6 months ago

Local-first PDF tools for AI agents: merge, split, extract, render, compress.

PDF wrangling (extract text, merge, split, redact metadata) is one of the most common things an agent needs to do. Every other option uploads the user's private documents to a remote API. This one doesn't. Add to your MCP config (e.g. claude_desktop_config.json): Then ask your agent things like *"extract the text from ~/Downloads/report.pdf"* or *"merge every PDF in ~/invoices into one file."*

Summary extracted from the README.

@dicepdf/mcp

Local-first PDF tools for AI agents — a Model Context Protocol server powered by @dicepdf/core.

One promise: the agent works on files that never leave the machine. Unlike cloud PDF APIs, DicePDF processes everything in-process on the user's own disk — no uploads, no third-party servers, no egress.

Why

PDF wrangling (extract text, merge, split, redact metadata) is one of the most common things an agent needs to do. Every other option uploads the user's private documents to a remote API. This one doesn't.

Install into Claude Desktop / Cursor / Cline

Add to your MCP config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "dicepdf": {
      "command": "npx",
      "args": ["-y", "@dicepdf/mcp"]
    }
  }
}

Then ask your agent things like "extract the text from ~/Downloads/report.pdf" or "merge every PDF in ~/invoices into one file."

Tools

Tool Does
pdf_extract_text Extract text as plain text / Markdown / JSON
pdf_merge Merge PDFs in order
pdf_split Split by ranges / pages / every page
pdf_rotate Rotate pages 90/180/270°
pdf_delete_pages Remove pages
pdf_compress Structural compression (aggressive rasterizes scans)
pdf_strip_metadata Remove Title/Author/Producer/XMP/ID
pdf_watermark Stamp a text watermark
pdf_add_page_numbers Add page numbers
pdf_to_image Render pages to PNG/JPEG files
pdf_metadata Page count / form / signature inspection

Every tool takes local file paths and writes outputs back to disk.

License

MIT