PDF Redaction

WebMCP

Let AI browser agents drive PDF Redaction directly on pdf-redaction.com.

WebMCP is an experimental browser standard, developed by Google and Microsoft under the W3C Web Machine Learning Community Group, that lets a web page register tools an in-page AI agent can call directly — the agent operates the page it's already on, instead of taking screenshots and guessing where to click.

This is different from the PDF Redaction MCP server: that's a server-side integration for headless clients like Claude Desktop or Cursor, connecting over OAuth to api.pdf-redaction.com. WebMCP is in-browser: it only runs while you have pdf-redaction.com/redaction open, in whatever session you're already logged into, and only for as long as your browser or extension has WebMCP support attached to the tab.

Browser support

WebMCP is currently in public origin trial in Chrome. On other browsers, or when the origin trial isn't active, PDF Redaction falls back to the @mcp-b/global polyfill, which implements the same document.modelContext API. Nothing is exposed to a page visitor beyond what they could already do by clicking through the UI — and nothing runs at all unless the browser or an installed extension is actively attached as a WebMCP client.

Available tools

Tools are registered on /redaction while the page is open.

pdf_load_from_url

Loads a PDF into the redaction tool by fetching it from a URL.

ParameterTypeDescription
urlstringURL of the PDF to load
filenamestringOptional filename to use

The URL must be reachable via a cross-origin fetch from the browser — many third-party hosts block this with CORS. Use pdf_load_from_base64 when it does.

pdf_load_from_base64

Loads a PDF into the redaction tool from base64-encoded content — a CORS-proof alternative to pdf_load_from_url.

ParameterTypeDescription
filenamestringFilename to use
base64stringBase64-encoded PDF content

pdf_get_status

Read-only. Returns the current document's filename, page count, how many pages have PII detection results, and whether the redacted PDF is ready to download.

pdf_detect_pii

Runs PII detection on the loaded PDF.

ParameterTypeDescription
pagenumberOptional — detect a single page. Omit to detect all pages.

Detection is asynchronous: this triggers it but doesn't wait for every page to finish. Poll pdf_get_status or pdf_list_detected_pii afterwards.

pdf_list_detected_pii

Read-only. Lists PII entities detected so far.

ParameterTypeDescription
pagenumberOptional — limit results to this page

pdf_download_redacted

Generates and downloads the redacted PDF with all reviewed redactions applied. Requires being logged in (unless working with a sample document) — the same gate the download button in the UI already enforces.

Security

WebMCP tools run with the page's live session — they can only do what a logged-in user could already do by clicking through the UI. Access is gated by the browser's tools permissions policy (same-origin by default) and requires a secure context, both already true for pdf-redaction.com.