Blackout

ai.thrain由 thrain.ai 发布v1.3.0更新于 Oct 24, 2026

Permanent local PDF redaction: text is removed and verified gone, not covered. No uploads.

已验证STDIO仅桌面文件与存储安全与监控

概览

AI 生成的概览

一个本地 MCP 服务器,通过真正删除文字并验证其已消失来永久脱敏 PDF,文件不会上传。

可以做什么
对 PDF 进行脱敏:可自动识别社会安全号码、电子邮件、电话号码和银行卡号,也可按自定义词或手绘方框标记,并导出文字已被真正删除而非遮盖的扁平化副本。检查 PDF,确认脱敏后不再残留可提取的文字。两个工具都会对刚写出的文件重新提取文字,若仍存在文字层则报错而不会返回该文档。
适用场景
当助手需要生成真正完成脱敏的 PDF 时使用,例如在分享含个人数据的申报表或表单之前,而仅画一个黑色矩形并不够,因为底层文字仍可被选中。
运行要求
通过 npm 包 @thrain/blackout-mcp 以 stdio 作为本地进程运行。未声明任何账户、API 密钥、环境变量或请求头,服务器不发起网络请求。
安装前请注意
脱敏会重写 PDF:导出的文件经过栅格化,原始文字层被丢弃,因此输出不再可搜索或复制,应保留源文件。这些工具会向磁盘写入新文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Blackout,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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.

bash
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

bash
npm installnpm installnpm run dev         # local dev servernpm 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 testnpm run smoke:cli          # CLI end-to-end testnpm run smoke:mcp          # MCP server end-to-end testnpm run smoke:agent-dist   # the same two, against the built bundles
node scripts/make-test-pdf.mjs out.pdf 12           # fixture with fake PIInode scripts/test-worker.mjs                        # license worker testsnode 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.

来源:README.md,提交 1324a22

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.3.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分