PaperPilot: A Local-First, Pure-Rust PDF Engine with MCP and WASM Support
Overview
PaperPilot is a local-first PDF and document processing engine written in pure Rust. It is designed to eliminate the privacy risks associated with online PDF utilities by ensuring that all operations—such as merging, splitting, compressing, and redacting—occur entirely on the user's machine or within their browser via WebAssembly (WASM). The project aims to provide a unified "Penta-Interface" architecture, allowing the same core engine to power multiple surfaces including a CLI, a Tauri-based desktop application, a local REST API, and a Model Context Protocol (MCP) server for AI agents.
Core Architecture and Surfaces
PaperPilot centralizes document logic in a Rust core, which is then exposed through five distinct interfaces:
- Terminal CLI: Designed for high-throughput batch processing and scripting.
- Local Desktop App: A cross-platform GUI built with Tauri 2 and Svelte 5.
- Client-Side Web: A zero-install browser version that processes files in memory using WASM.
- Local REST API: A standalone daemon (running on
localhost:7823) for integration into local microservices. - MCP Server: Enables AI agents like Claude Desktop or Cursor to interact with local files, allowing LLMs to perform tasks like redaction or analysis without transmitting sensitive data to the cloud.
Capabilities and Performance
As of version 0.6, the toolkit supports over 75 operations, including standard document management (merge, split, rotate, reorder, booklet imposition) and privacy-focused tasks such as PII redaction and metadata stripping. The engine is built on established Rust crates including lopdf, pdf-writer, and rten. Performance benchmarks indicate operation latencies typically ranging between 20ms and 130ms. The project is licensed under the Apache 2.0 license.
Community Feedback and Discussion
Discussion on Hacker News highlighted both the utility of a local-first approach and the challenges of building robust PDF engines. Some community members expressed concern over the proliferation of new PDF projects, suggesting that developers should prioritize contributing to existing established libraries like printpdf to avoid re-solving complex typographical edge cases.
Others noted the difficulty of building a comprehensive PDF suite, citing the vast number of edge cases in font handling, layout, and RTL text support. A common theme in the feedback was the importance of transparency regarding the provenance of the code, with some users questioning whether the engine was derived from existing C-based libraries like MuPDF.
Despite these critiques, the project has been well-received for its focus on privacy and its integration with modern developer workflows, particularly the use of MCP to bridge local document processing with AI agents. Users have requested additional features, such as improved support for removing passwords from known-protected documents and advanced digital signature capabilities.