quillpdf-mcp

quillpdf-mcp

A local-first PDF tool for merging, splitting, rotating, watermarking, Bates-numbering, cleaning metadata, and counting pages — all operations happen on your machine with no network transmission.

Category
访问服务器

README

quillpdf-mcp

Local-first PDF tools — merge, split, rotate, watermark, Bates-number, clean metadata, page-count — exposed as both an MCP server (for AI agents) and a command-line tool.

Your files never leave your machine. Every operation reads and writes PDFs locally, in your own environment. The server uses only stdio transport and local filesystem I/O — it never opens a network connection or transmits your documents.

Built by Purple Directive, the same privacy-first engine behind QuillPDF. MIT licensed.


Why

Most "PDF API" tools make you upload your documents to someone else's server. For sensitive files — legal discovery, medical records, financials — that's a non-starter. quillpdf-mcp runs the PDF operations where you are: as a local CLI, or as a Model Context Protocol server an AI assistant can call. The bytes stay on your disk.

Install

Run on demand with npx (no install):

npx -p quillpdf-mcp quillpdf --help   # the CLI
npx quillpdf-mcp --help               # MCP server: prints setup help (your MCP client launches it over stdio)

Or install globally for the quillpdf and quillpdf-mcp commands:

npm install -g quillpdf-mcp
quillpdf --help

Requires Node.js 18 or newer.


Use it from an AI assistant (MCP)

The MCP server speaks stdio and exposes one tool per operation.

Claude Desktop

Add to claude_desktop_config.json:

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

Claude Code

claude mcp add quillpdf -- npx -y quillpdf-mcp

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

Tool What it does
pdf_merge Merge 2+ PDFs into one, in order
pdf_split Split by page ranges (one file per group) or extract specific pages into one file
pdf_rotate Rotate pages by a multiple of 90° (all pages or a chosen subset)
pdf_watermark Stamp text on every page (size / opacity / color / position)
pdf_bates Sequential Bates numbering (prefix, start, zero-pad, corner)
pdf_clean_metadata Strip info-dict fields + dates, and delete the XMP metadata stream
pdf_page_count Count pages

Use it from the command line

# 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 pages
quillpdf rotate in.pdf --angle 90 -o rotated.pdf
quillpdf rotate in.pdf --angle 180 --pages "2,4" -o rotated.pdf

# Watermark
quillpdf 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 metadata
quillpdf clean-metadata in.pdf -o clean.pdf

# Page count (prints a number)
quillpdf page-count in.pdf

Every command has --help.


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. If a file is encrypted, the tool stops with a clear message rather than stripping the password for you.
  • 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 OCR engine and are planned for a later release — they are not in this package today:

  • compress (image re-encode)
  • pdf-to-image (render pages to PNG)
  • redact (true rasterize-on-redact removal)
  • ocr (searchable-text layer)

They'll ship only when they can run fully locally, to keep the privacy guarantee intact.


Development

npm install
npm 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选