mcpField
B
blackout

blackout

Local
blackout.thrain.aiSecurity0Updated 12w ago

About blackout

Blackout is a PDF redaction tool for people handling sensitive documents. Its browser app, CLI, and MCP server rasterize redacted pages and verify that the exported PDF contains no extractable text; processing stays on the device.

Key features

  1. 01Detect common sensitive data
  2. 02Search custom terms
  3. 03Draw redaction boxes
  4. 04Rasterize and burn redactions
  5. 05Verify exported PDF text removal
  6. 06Browser, CLI, and MCP forms

Use cases

  1. 01Remove personal data from a filing
  2. 02Redact custom terms in a PDF
  3. 03Check a redacted PDF for remaining text

MCP support

The MCP server exposes `redact_pdf` and `check_pdf` tools. It runs locally without network calls and verifies the output before returning it.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ai-thrain-blackout": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}
Run commandnpx -y @thrain/blackout-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@thrain/blackout-mcp1.3.0

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
pathstringYesAbsolute path to a PDF file on this machine.
termsarrayNoLiteral strings to redact wherever they appear, case-insensitive — names, case numbers, addresses. Use this for anything the built-in detectors do not cover.
detectarrayNoWhich categories of sensitive data to find. Detector ids: ssn, card, email, phone. Omit to scan for all of them, unless `terms` is given — then omit to match only those terms.

Details

From the project README

Blackout

Blackout

True PDF redaction, entirely in your browser.
blackout.thrain.ai


Blackout finds Social Security numbers, emails, phone numbers and card numbers in a PDF, lets you search custom terms or draw boxes by hand, and exports a flattened PDF where the redacted text is actually gone — not hidden under a rectangle.

It runs in three places, all on the same engine: the browser app, a CLI, and an MCP server.

npx @thrain/blackout redact filing.pdf --detect ssn,email --out clean.pdf

How it works

  1. Nothing leaves your device. Rendering (pdf.js), detection, and export (pdf-lib) all run client-side. Load the page, go offline, it still works.
  2. Redaction is real. Export rasterizes each page and burns the boxes into the pixels, then rebuilds the PDF from those images. The original text layer is discarded — copy-paste and text extraction recover nothing.

Develop

npm install
npm install
npm run dev         # local dev server
npm run build       # type-check + production build to dist/
npm run build:agent # type-check + bundle the CLI and MCP server to packages/

npm run smoke              # headless browser end-to-end test
npm run smoke:cli          # CLI end-to-end test
npm run smoke:mcp          # MCP server end-to-end test
npm run smoke:agent-dist   # the same two, against the built bundles

node scripts/make-test-pdf.mjs out.pdf 12           # fixture with fake PII
node scripts/test-worker.mjs                        # license worker tests
node scripts/visual-check.mjs [test.pdf] [outdir]   # screenshot spot-check

The browser smoke script needs a Chrome/Chromium binary; set CHROME_BIN if yours isn't in the default Playwright cache location. Every smoke test makes the same central assertion — that the exported PDF contains zero extractable text — because that assertion is the entire product, and it has to hold on every path that ships, not just the one that is easy to check.

Architecture

  • Engine (src/pdf/) — detection, mark ordering, and the rasterise-and-burn export. Platform-agnostic: its only contact with the outside world is src/pdf/platform.ts, which supplies a canvas. src/platform/browser.ts backs it with a DOM canvas, src/platform/node.ts with Skia. There is exactly one redaction implementation, so the browser and the CLI cannot drift.
  • Site — static React app, deployed to GitHub Pages by .github/workflows/deploy.yml on every push to main.
  • CLI and MCP server (src/agent/) — thin non-interactive wrappers over the engine, bundled into packages/blackout and packages/blackout-mcp.
  • License worker (worker/) — a Cloudflare Worker that verifies Stripe checkout sessions and mints signed license tokens; the app verifies them with an embedded public key. Deployed by .github/workflows/deploy-worker.yml.

For agents

An agent asked to redact a PDF will otherwise write a script that draws a black rectangle over text that stays selectable underneath. Two form factors exist so that "redact this PDF" can resolve to a tool that does it correctly:

Both verify their own output before returning: they re-extract text from the file they just wrote and fail rather than hand back a document that still has a text layer. Neither makes a network call, including the licence check — so nothing leaves the machine at all.

License

Apache-2.0 © Thrain LLC. The "Blackout" name and logo are trademarks of Thrain LLC (see NOTICE) — fork freely, but ship your fork under your own name.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.