1 of 6

πŸ“Ž

Stapler

Local AI Agent Document Workspace via WebMCP

"Tell your browser what you need done with your documents. The agent handles the workflow β€” while your files never leave your device."

βœ“ Client-Side Execution (pdf-lib & pdf.js)

βœ“ Zero Login & Zero Setup Architecture

STAPLER

2 of 6

STAPLER

Stapler

Local AI Agent Document Workspace via WebMCP

"Tell your browser what you need done with your documents. The agent handles the workflow β€” while your files never leave your device."

  • Built for the WebMCP Challenge
  • Static deployment with zero login and zero setup
  • Running end-to-end client-side
  • Live app: stapler-equ.pages.dev

πŸ“Ž

3 of 6

STAPLER

The Paradigm Shift

Bridging the Gap Between Smart Cloud AI and Private Local PDF Editors

The Critical Dilemma

Users are forced to choose between the advanced intelligence of Cloud AI solutions (like ChatGPT or Adobe AI) and the absolute security of local tools (like PilotPDF or iLovePDF).

Cloud AI requires uploading sensitive, personally identifiable documents to third-party servers, compromising privacy. Conversely, completely private local tools remain entirely manual and lack intelligent automation.

The Stapler Resolution

Stapler resolves this tension by combining the security of local processing with the power of agent-orchestrated workflows. Leveraging the WebMCP standard, AI agents invoke structured, complex document operations directly inside the browser environment.

The core mechanism relies on fully client-side execution via pdf-lib and pdf.js. Because files remain strictly in volatile browser memory and are never uploaded, sensitive user data is kept secure while still benefiting from AI orchestration.

ARCHITECTURE COMPARISON: CLOUD VS. LOCAL EXECUTION

Stapler utilizes local browser execution (in-memory data) to eliminate external transfers.

πŸ“Ž

4 of 6

STAPLER

WebMCP-Native Tool Registration and the Core Document Toolset

Stapler leverages native browser integration by registering capabilities directly via document.modelContext.registerTool, allowing AI agents to interact with local files seamlessly. The platform exposes a robust Core 7 API Toolset designed for comprehensive document manipulation:

  1. list_documents: Provides agents with read-only access to loaded document metadata, file sizes, and page counts.
  2. inspect_document: Utilizes pdf.js to read text page-by-page, enabling the agent to discover and comprehend relevant content autonomously.
  3. extract_pages: Allows the copying of specific page ranges, strictly bounded by the document's actual page count to prevent out-of-bounds errors.
  4. merge_documents: Dynamically registers when two or more documents are loaded, combining multiple PDFs into a single cohesive file.
  1. rename_document: Manages file nomenclature within the workspace context.
  2. export_document: Programmatically triggers a native browser download of the final output.
  3. undo: Manages the operation stack, popping recent actions to enable crucial human-in-the-loop recovery from any agent mistakes or hallucinations.

πŸ“Ž

5 of 6

STAPLER

I Didn't Tell the Agent Page Numbers or My Nameβ€”It Figured It Out

The power of Stapler is demonstrated through a zero-knowledge Visa Preparation Workflow .

"I'm applying for a visa. I need one PDF with my passport, the bank statement pages that prove my regular salary, and my application form. Name the file after the applicant and its purpose, and download it."

Loaded with three distinct documents (specimen passport, 12-page bank statement, application form), the agent independently inferred the correct pages and metadata without explicit cues.

Validation Environments

Verified on ChatGPT Desktop Work mode Site Tools & Chrome Google Model Context Tool Inspector.

Step 01 β€” Analysis

Inspect & Cross-Reference

Reads visa checklist guidelines and maps them against the provided application documents.

Step 02 β€” Heuristic Extraction

Salary Page Identification

Scans a complex 12-page statement and autonomously extracts pages 4–7 containing regular salary transactions.

Step 03 β€” Entity Resolution

Applicant Name Discovery

Reads and parses passport OCR text to resolve the applicant's name: Arjun Kumar.

Step 04 β€” Packaging

Merge & Direct Export

Compiles PDF, names it arjun-kumar-visa-packet.pdf, and triggers the local file download.

πŸ“Ž

6 of 6

STAPLER

A Pure Static Frontend

Engineered for absolute privacy and performance. Built with React, Vite, and TypeScript, relying entirely on powerful client-side processing rather than server infrastructure.

Client-Side Processing Engines

pdf-lib

Robust document edits, merging, and page extraction.

pdf.js

Renders accurate thumbnails and extracts parseable text for the AI agent.

Volatile Memory

Files exist exclusively within temporary browser memory; a simple page refresh completely clears the workspace.

0Backend Servers & DB Storage

Crucially, there is zero backend infrastructure or server-side processing involved. Files remain secure on your machine.

Deployment & Edge Delivery

Cloudflare Pages (Global Edge Delivery)

WebMCP Compatibility

Chrome 149+ with Origin Trial Token

Ships with first-party token to run natively without experimental flags.

Architectural Stack

React, Vite, TypeScript & WebMCP

πŸ“Ž