Labsco
MCP SERVER

PDF Toolkit MCP

by AryanBV

Read, build, transform and secure PDFs locally — including rendering a scan to images a vision model can actually read — from one npx command with nothing to compile.

Document Conversion, PDF & TranslationVerified
Summary
A PDF server that writes as well as reads — and can turn a scan into something a model can actually see.

Most PDF servers stop at extracting text, which leaves scanned documents useless. Rendering pages to images closes that gap by handing them to a vision-capable client instead. The other thing worth knowing is how carefully the page operations treat forms: merging, splitting and reordering keep AcroForm fields, collisions are namespaced by source, and each call reports what it preserved, renamed or dropped rather than losing them quietly. Encryption is AES-256 rather than legacy RC4, and none of it needs a build toolchain.

What it is

A write-capable PDF toolkit with 22 tools: extract text and metadata, convert to Markdown, search, merge, split, reorder and delete pages, fill and flatten forms, watermark, encrypt, and create documents from text, Markdown or a template. Every engine is WASM or plain JavaScript, so there is no native build step.

What you get
  • pdf_extract_text returns text by page range, defaulting to the first ten pages so a long document does not swamp the context, and pdf_to_markdown reconstructs reading order across up to two columns with full-width title and footer bands handled separately
  • pdf_render_pages rasterises pages to PNG or JPEG at a chosen DPI — the route to reading a scanned or image-only PDF with no text layer, using a vision-capable client
  • pdf_search matches a literal substring across the document and returns the page number with a surrounding snippet; pdf_get_metadata returns title, author, subject, page count, dates and producer; pdf_compare diffs two PDFs page by page and reports where the text differs
  • Page surgery that keeps forms intact — merge, split, reorder and delete all preserve AcroForm fields, colliding names are namespaced by source, and every call reports what it preserved, renamed or dropped
  • pdf_get_form_fields lists fields with their types, current values and required status; pdf_fill_form handles text, checkbox, dropdown, radio and multi-select fields; pdf_flatten bakes the values into the page and removes the interactivity
  • Creation three ways: pdf_create from plain text with wrapping and page overflow, pdf_create_from_markdown with headings, tables, lists and fenced code, and pdf_create_from_template for an invoice, report or letter from structured data validated against the template
  • Presentation and marking: rotate pages, add page numbers with a chosen position and format, apply a diagonal text watermark with opacity and rotation, embed a PNG or JPEG at coordinates, and embed a QR code or barcode as qrcode, code128, datamatrix, ean13, pdf417 or azteccode
  • pdf_encrypt applies AES-256 password protection through qpdf rather than the legacy RC4 scheme, with separate user and owner passwords
  • Errors carry stable codes with stack traces kept internal, off-page placements are rejected instead of silently clipped, and oversized responses are truncated without breaking the JSON
Requirements

Node.js 20 or newer, launched over stdio as @aryanbv/pdf-toolkit-mcp with npx. No configuration file, API key, Docker or compiler, and it works offline — every engine is WASM or JavaScript, so there is no node-gyp step or prebuilt binary needed on Windows, macOS or Linux. Non-Latin text in a document you create or fill needs a fontPath pointing at a suitable font.

Setup effort

One command — npx -y @aryanbv/pdf-toolkit-mcp