npm @thrain/blackout-mcpstdioApache-2.0updated 1mo ago
True PDF redaction, entirely in your browser. blackout.thrain.ai
What can you do with blackout?
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
- Nothing leaves your device. Rendering (pdf.js), detection, and export (pdf-lib) all run client-side. Load the page, go offline, it still works.
- 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 issrc/pdf/platform.ts, which supplies a canvas.src/platform/browser.tsbacks it with a DOM canvas,src/platform/node.tswith 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.ymlon every push tomain. - CLI and MCP server (
src/agent/) โ thin non-interactive wrappers over the engine, bundled intopackages/blackoutandpackages/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:
- CLI โ
packages/blackoutยทnpx @thrain/blackout redact in.pdf - MCP server โ
packages/blackout-mcpยท toolsredact_pdf,check_pdf
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.
Install
Add blackout to your client. Pick the one you use.
claude mcp add blackout-mcp -- npx -y @thrain/blackout-mcpcodex mcp add blackout-mcp -- npx -y @thrain/blackout-mcpamp mcp add blackout-mcp -- npx -y @thrain/blackout-mcp{
"mcpServers": {
"blackout-mcp": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"blackout-mcp": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"blackout-mcp","command":"npx","args":["-y","@thrain/blackout-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"blackout-mcp": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"blackout-mcp": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"blackout-mcp": {
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"blackout-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"blackout-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@thrain/blackout-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @thrain/blackout-mcpRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation17/25
- Maintenance19/25
- Trust16/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 24 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 1.3.0Latest | Aug 2, 2026 |