Quillpdf Mcp

io.github.PurpleDirective由 GitHub 帳號 PurpleDirective 發布v0.2.0更新於 Oct 24, 2026

Local-first PDF tools (merge, split, rotate, watermark, Bates, metadata) as MCP server + CLI.

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

讓助手在本機執行 PDF 操作,例如合併、拆分、旋轉、加浮水印、Bates 編號、清理中繼資料,以及 AES-256 加密或解鎖。

可以做什麼
Quillpdf Mcp 是一個本機 stdio MCP 伺服器與 CLI,用於對 PDF 進行結構性處理。每個操作對應一個工具,包括 pdf_merge、pdf_split、pdf_rotate、pdf_watermark、pdf_bates、pdf_clean_metadata、pdf_page_count、pdf_organize、pdf_delete_pages、pdf_page_numbers、pdf_crop、pdf_flatten、pdf_from_images、pdf_protect 和 pdf_unlock。助手提供本機檔案路徑,伺服器在本機讀取與寫入這些檔案。它建構於 pdf-lib 之上,加密使用編譯為 WebAssembly 的 QPDF。
適用情境
當助手需要整理、重新排列、蓋章或為本機磁碟上既有的 PDF 檔案設定密碼時使用,特別適合法律蒐證、醫療紀錄或財務文件等不希望上傳到第三方服務的情境。它不用於 OCR、塗黑或壓縮。
執行需求
需要 Node.js 18 或更新版本。此套件以 quillpdf-mcp 從 npm 安裝,並由 MCP 用戶端透過 stdio 啟動,例如使用 npx。未宣告任何帳戶、API 金鑰、環境變數或標頭,也不需要網路存取。
安裝前請注意
操作會寫入助手提供的路徑;除非設定 force,否則不會靜默覆寫既有的輸出檔案。pdf_protect 與 pdf_unlock 涉及文件密碼,unlock 只能使用使用者提供的密碼。裁剪透過設定 CropBox 隱藏內容而非刪除,因此不是塗黑。clean-metadata 不會清除頁面層級註解、附件或頁面內容,且 Producer 欄位是被取代而非清空。no-print 或 no-copy 等權限旗標只是請求,並非保證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Quillpdf Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

quillpdf-mcp

PDF operations for MCP. An MCP server and CLI for local PDF manipulation:

  • Merge, split, organize, delete pages
  • Rotate, crop
  • Watermark, Bates numbering, page numbers
  • Flatten forms, images → PDF
  • Metadata cleaning, page count
  • AES-256 protect / unlock

Built on pdf-lib. MIT licensed. stdio transport. No network calls — files never leave your machine.

Install

bash
npx -p quillpdf-mcp quillpdf --help   # CLInpx quillpdf-mcp --help               # MCP server (your MCP client launches it over stdio)

Or globally:

bash
npm install -g quillpdf-mcpquillpdf --help

Requires Node.js 18+.

Scope

quillpdf-mcp implements structural PDF transforms and AES-256 protect/unlock. It does not perform OCR, redaction, or compression — those are available in the browser version (quillpdf.com), where processing also stays client-side. They'll ship here only when they can run fully locally.

Use it from an MCP client

quillpdf-mcp works with any MCP client. It is a stdio server, so every client needs the same thing: a command to launch. Add this server entry to your client's MCP configuration:

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

Client examples

Where that entry goes (check your client's documentation for the current location):

  • Claude Desktop — claude_desktop_config.json (Settings > Developer > Edit Config). On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows: %APPDATA%\Claude\claude_desktop_config.json. Same mcpServers block as above. (docs)

  • Claude Code — claude mcp add quillpdf -- npx -y quillpdf-mcp, or put the block in a project-root .mcp.json. (docs)

  • Cursor — .cursor/mcp.json in a project, or ~/.cursor/mcp.json for all projects. Same mcpServers block. (docs)

  • VS Code — .vscode/mcp.json in a workspace, or run MCP: Open User Configuration for your profile. VS Code uses a servers key instead of mcpServers, and takes "type": "stdio":

    json
    { "servers": { "quillpdf": { "type": "stdio", "command": "npx", "args": ["-y", "quillpdf-mcp"] } } }

    (docs)

Then ask your assistant things like "merge invoice-1.pdf and invoice-2.pdf into combined.pdf" or "Bates-number discovery.pdf with prefix ABC starting at 1." The assistant supplies file paths on your machine; the server reads and writes them locally.

A ready-to-copy config lives in examples/mcp-config.json.

Tools

ToolWhat it does
pdf_mergeMerge 2+ PDFs into one, in order
pdf_splitSplit by page ranges (one file per group) or extract specific pages into one file
pdf_rotateRotate pages by a multiple of 90° (all pages or a chosen subset)
pdf_watermarkStamp text on every page (size / opacity / color / position)
pdf_batesSequential Bates numbering (prefix, start, zero-pad, corner)
pdf_clean_metadataStrip info-dict fields + dates, and delete the XMP metadata stream
pdf_page_countCount pages
pdf_organizeKeep pages in the order you list — reorder, delete and duplicate in one step
pdf_delete_pagesRemove listed pages, keeping the rest in order
pdf_page_numbersStamp readable page numbers (3, 3 of 12, Page 3 of 12), optional unnumbered cover
pdf_cropTrim page margins by setting the CropBox — hides, does not remove (not redaction)
pdf_flattenPaint filled form values onto the page so they can't be edited or read back as form data
pdf_from_imagesBuild a PDF from PNG/JPEG images, one per page
pdf_protectEncrypt with AES-256 so the document needs a password to open
pdf_unlockRemove the password from a document you have the password for

Use it from the command line

bash
# Merge (order is preserved)quillpdf merge a.pdf b.pdf c.pdf -o combined.pdf
# Split into one file per range group → out-1.pdf (pages 1-3), out-2.pdf (page 5)quillpdf split in.pdf --ranges "1-3,5" -o out.pdf
# Extract specific pages into a single file (reordering/duplicates allowed)quillpdf split in.pdf --pages "5,1,1" -o extract.pdf
# Rotate every page 90°, or just some pagesquillpdf rotate in.pdf --angle 90 -o rotated.pdfquillpdf rotate in.pdf --angle 180 --pages "2,4" -o rotated.pdf
# Watermarkquillpdf watermark in.pdf --text "DRAFT" --opacity 0.15 --position center -o wm.pdf
# Bates numbering → PLT-000001, PLT-000002, …quillpdf bates in.pdf --prefix "PLT-" --start 1 --pad 6 -o numbered.pdf
# Strip document metadataquillpdf clean-metadata in.pdf -o clean.pdf
# Page count (prints a number)quillpdf page-count in.pdf

Every command has --help.

Existing files are never silently replaced. If the -o path already exists, the command stops with an error instead of clobbering it — add --force (or force: true on the MCP tools) to replace it deliberately.

Privacy & security notes

  • Local only. All PDF processing happens in-process via pdf-lib. The server communicates over stdio and never opens a network connection. (The MCP SDK bundles optional HTTP/SSE transports in node_modules, but this server only ever uses stdio, so none of that code runs.)
  • Password-protected PDFs are refused, not silently unlocked. Every operation except unlock stops with a clear message rather than stripping the password for you. unlock decrypts only with a password you supply — it does not recover, guess, or brute-force one.
  • Encryption engine. protect and unlock run QPDF (Apache-2.0) compiled to WebAssembly, in-process and offline like everything else. pdf-lib cannot encrypt at all, and the community forks that add it are unmaintained — encryption is the one operation where a subtle bug means a document you believe is locked isn't, so this uses the reference implementation instead.
  • AES-256 only. protect emits PDF 2.0 encryption revision 6. The 40-bit and 128-bit modes are deliberately not exposed: QPDF classes both as weak crypto, and shipping a "protected" file that isn't meaningfully protected is worse than shipping nothing.
  • Permission flags are a request, not a guarantee. --no-print / --no-copy / --no-modify set bits that a well-behaved reader honours; they are not enforced by the encryption. The password is the part that actually protects the file. (Extraction for accessibility stays permitted even with --no-copy, so screen readers keep working.)
  • Cropping is not redaction. crop sets the CropBox, so trimmed content is hidden but still present in the file and fully recoverable. Do not use it to remove sensitive material.
  • clean-metadata scope. It clears the title, author, subject, keywords, and creator fields plus the CreationDate/ModDate in the document information dictionary, and deletes the document-level XMP metadata stream — the copy Acrobat, Word, InDesign, and LibreOffice write, which is often the authoritative one. Note that pdf-lib rewrites the /Producer field with its own signature on save, so that one field is replaced rather than emptied. It does not scrub page-level annotations, embedded file attachments, or the text/image content of pages.

Not here yet (roadmap)

These need a Node image backend or an OCR engine and are planned for a later release — they are not in this package today:

  • compress (image re-encode) — needs an image codec such as sharp
  • pdf-to-image (render pages to PNG) — needs a rasterizer (pdfjs-dist + canvas)
  • redact (true rasterize-on-redact removal) — needs the same rasterizer
  • ocr (searchable-text layer) — needs tesseract.js

Each would roughly quadruple this package's dependency surface, which is the whole reason they're held back: the pitch here is a small, local, no-network tool. They'll ship only when they can run fully locally without giving that up.

Philosophy

Keep the server small, local, and easy to audit. Most "PDF API" tools answer document work with "upload it to us" — for legal discovery, medical records, or financials, the upload is the problem. This runs where you are; the bytes stay on your disk.

Development

bash
npm installnpm run build     # tsc → dist/npm test          # builds, then runs the unit suite (node:test)

The engine (src/core.ts) is pure: bytes in, bytes out, no I/O. The CLI (src/cli.ts) and MCP server (src/server.ts) are thin front-ends over it.

License

MIT © Purple Directive. See LICENSE.

Learn more at quillpdf.com.

來源:README.md,提交 106c98e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.2.0最新Sep 25, 2026
  2. v0.1.1Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分