PDF Toolkit MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> 💼 Available for freelance MCP/AI integration work — DM @aryansalian03 or via aryanbv.com
A write-capable PDF toolkit for any MCP client. It provides 22 tools for reading, creating, rendering, transforming, and securing PDFs. That includes rendering pages to images so vision models can read scanned documents, building PDFs from Markdown or structured data, AES-256 encryption, and merge and split operations that keep form fields intact. There are no native dependencies, so it runs locally from a single npx command.
It needs no config files, API keys, Docker, or compiler, and it works offline.
---
Overview
Most PDF servers for MCP only read. This one also writes: it creates documents from Markdown or structured data, fills and flattens forms, rearranges page structure, and applies AES-256 encryption, all without a native build toolchain.
A few things worth knowing:
- It reads scans. pdf_render_pages rasterizes pages to images, so a vision-capable model can read scanned or image-only PDFs that have no text layer.
- Merge, split, reorder, and delete preserve AcroForm fields rather than dropping them. Names that collide between inputs are namespaced per source, and every call reports what it preserved, renamed, or dropped.
- Encryption is AES-256 through qpdf, not the legacy RC4 scheme.
- Every engine is WASM or plain JavaScript, so npx works on Node 20 and later across Windows, macOS, and Linux with no node-gyp, canvas binding, or prebuilt binary.
- Errors carry stable codes, stack traces stay internal, off-page placements are rejected instead of silently clipped, and large responses are truncated without breaking JSON.
---
Client setup
Claude Desktop
Add to claude_desktop_config.json:
Claude Code
Cursor
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
VS Code (GitHub Copilot)
VS Code uses "servers", not "mcpServers". Copying another client's config will fail silently. This also requires the GitHub Copilot extension with Agent mode.
Add to .vscode/mcp.json:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Once connected, ask for what you want in plain language and the client selects the tool and fills in the arguments. The JSON blocks below show the arguments each tool accepts, for reference.
---
Tools
| Category | Tool | Description |
| -------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Read** | pdf_extract_text | Extract text from PDF pages (first 10 by default) |
| | pdf_get_metadata | Get title, author, subject, page count, dates, producer, and file size |
| | pdf_get_form_fields | List form fields (text, checkbox, dropdown, radiogroup, listbox, button, signature) with names, types, values, and required status |
| | pdf_to_markdown | Convert a PDF to reading-order Markdown (column clustering, heading inference, list detection) |
| | pdf_search | Find text across pages and return page numbers with surrounding snippets (literal, case-insensitive by default) |
| | pdf_compare | Page-by-page text diff between two PDFs |
| **Manipulate** | pdf_merge | Merge multiple PDFs into one (preserves form fields) |
| | pdf_split | Extract a page range into a new PDF (preserves form fields) |
| | pdf_delete_pages | Delete a page range and keep the rest (preserves form fields) |
| | pdf_reorder_pages | Reorder pages in any order, duplicates allowed (preserves form fields) |
| | pdf_rotate_pages | Rotate pages by 90, 180, or 270 degrees |
| | pdf_flatten | Bake form-field values into static content (removes interactivity) |
| | pdf_encrypt | AES-256 password protection with user and owner passwords |
| | pdf_add_page_numbers | Add page numbers (configurable position, format, start, and size; rotation-aware) |
| | pdf_embed_qr_code | Embed a QR code or barcode (QR, Code128, DataMatrix, EAN-13, PDF417, Aztec; rotation-aware) |