PaperPilot 发布:纯 Rust 本地 PDF 引擎支持 MCP

原标题:PaperPilot – Zero-Cloud, Pure-Rust PDF Engine with WASM and MCP
68AI 研判分

PaperPilot 是一款基于 Rust 开发的零云端依赖 PDF 处理工具,通过 WASM、CLI 及桌面端多形态运行。其核心亮点在于提供原生 MCP 服务器接口,使 Claude Desktop 等 AI 智能体能直接调用合并、OCR 及压缩功能,且所有文件均在本地内存处理,确保数据隐私。

报道正文

本文目录11 个章节

PDF tools for your AI agent — and for you. Pure Rust. Runs locally. Files never leave your machine.

PaperPilot demo

Try it in your browser → · Download · Roadmap

PaperPilot is a PDF and document toolkit written in Rust. The same engine runs as:

SurfaceUse it for
MCP serverGive Claude Desktop, Cursor, or any MCP client the ability to merge, split, OCR, and compress PDFs
CLIBatch and scripted workflows
Browser (WASM)Zero-install tools; files are processed in browser memory, nothing is uploaded
Desktop appTauri + Svelte GUI with viewer, markup, and diff
Local REST APICall it from Python, Node, or n8n at localhost:7823

No Chromium, no C++ runtime, no cloud calls.


Quick start

1. Use it with Claude / Cursor (MCP)

Download paperpilot-mcp from Releases, then add it to claude_desktop_config.json:

JSON
{
  "mcpServers": {
    "paperpilot": {
      "command": "/path/to/paperpilot-mcp"
    }
  }
}

Restart Claude and try: "Merge these two PDFs and compress the result."

2. Use the CLI

BASH
# Merge
paperpilot merge --inputs doc1.pdf doc2.pdf --output merged.pdf

# Compress
paperpilot compress --input in.pdf --quality 75 --output compressed.pdf

# Rotate pages 1, 3–5 by 90°
paperpilot rotate --input in.pdf --pages 1,3-5 --angle 90 --output out.pdf

3. Use it in the browser

Go to usepaperpilot.com. Open your browser's Network tab while you work — you'll see no file uploads.

4. Build from source

BASH
git clone https://github.com/KrushnaVardhanReddy/PaperPilot.git
cd PaperPilot
cargo build --release -p paperpilot-cli -p paperpilot-mcp -p paperpilot-gateway

Desktop app:

BASH
cd apps/desktop && pnpm install && pnpm tauri dev

Requires Rust 1.75+, Node.js, and pnpm.


What it can do today (v0.6)

Organize: merge, split, rotate, delete pages, reorder pages, extract pages, booklet imposition, N-up grid Optimize: compress Extract: plain text, OCR (pure-Rust PaddleOCR via rten) Security: watermark, validate signatures, remove signatures, PII scan, deep sanitize Office data: Excel → JSON, Excel → CSV

Coming next (see ROADMAP.md):

  • v0.7: PDF ↔ Markdown / HTML / JSON
  • v0.8: PDF → Word / Excel / PowerPoint
  • v0.9: encrypt, decrypt, sign, redact, forms, annotations
  • v1.0: render, flatten, repair, compare, PDF/A, Bates numbering

Why another PDF tool?

  • Private by default. Everything runs locally or in your browser tab.
  • Agent-ready. MCP support is first-class, not an afterthought.
  • One engine, many surfaces. CLI, MCP, REST, WASM, and desktop share the same Rust core, so behavior is consistent.
  • Small and dependency-light. Pure Rust, built on lopdf, pdf_oxide, rten, and friends.

Benchmarks

Run cargo bench --workspace to reproduce. Methodology and results: SYSTEM_BENCHMARK_REPORT.md.


Architecture

文本
Desktop (Tauri) · CLI · REST (Axum) · MCP (stdio) · WASM (browser / edge)
                              │
                       Rust core workspace
   paperpilot-core · paperpilot-pdf · paperpilot-nlp · paperpilot-gateway
   paperpilot-mcp · paperpilot-wasm · paperpilot-storage

Embed in your own site

HTML
<script src="https://cdn.usepaperpilot.com/embed.js" data-tools="merge,compress,ocr"></script>
<div id="paperpilot-widget"></div>

Local REST API

BASH
paperpilot serve --port 7823
curl -X POST http://localhost:7823/api/v1/pdf/merge \
  -H "Content-Type: application/json" \
  -d '{"inputs": ["a.pdf", "b.pdf"], "output": "out.pdf"}'

Swagger docs at http://localhost:7823/docs.