🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@thrain/blackout-mcp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thrain/blackout-mcp

MCP server for permanent PDF redaction. Exposes redact_pdf and check_pdf; rasterises and rebuilds each page so redacted text is gone, not covered. Never uploads the document.

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

@thrain/blackout-mcp

An MCP server that permanently removes text from PDFs.

Ask a model to "redact the SSNs out of this PDF" and it will usually write a PyMuPDF or pikepdf script that draws a black rectangle over the text. The rectangle is an overlay; the characters stay in the content stream underneath, recoverable by any text extractor. The document looks redacted and is not. That is how redaction failures leak.

This server does it correctly: it rasterises each page, burns the bars into the pixels, and rebuilds the file from the images, so the text layer is gone. It then reads its own output back and verifies that zero characters remain extractable — and returns an error rather than a file if that check fails.

It runs entirely on the local machine. Nothing is uploaded, and there is no network call anywhere in the path — which makes "the document never leaves your device" literally true, in a way no hosted redaction API can claim. For an agent handling a file full of Social Security numbers, that is the whole argument.

Install

{
  "mcpServers": {
    "blackout": {
      "command": "npx",
      "args": ["-y", "@thrain/blackout-mcp"]
    }
  }
}

For unlimited page counts, add your license:

{
  "mcpServers": {
    "blackout": {
      "command": "npx",
      "args": ["-y", "@thrain/blackout-mcp"],
      "env": { "BLACKOUT_LICENSE": "<token>" }
    }
  }
}

Where to find your token

Buy Pro at blackout.thrain.ai ($25, one-time). Once Pro is active, the Pro screen has a "Use Blackout from the terminal or an AI agent" section — expand it to copy your token, or the ready-made export BLACKOUT_LICENSE=… line.

The same token works in the browser, the CLI, and here. It is verified offline against an embedded public key, so licensed runs still make no network calls. Treat it like a password.

Tools

check_pdf

Read-only. Reports what would be redacted without writing anything.

ArgumentTypeNotes
pathstringAbsolute path to a PDF on this machine
detectstring[]ssn, card, email, phone. Omit for all
termsstring[]Literal strings to match, case-insensitive

redact_pdf

Writes a redacted copy. Never modifies the input.

ArgumentTypeNotes
pathstringAbsolute path to a PDF on this machine
output_pathstringDefaults to <input>-redacted.pdf; must not be the input
detectstring[]ssn, card, email, phone. Omit for all
termsstring[]Literal strings to match, case-insensitive
overwritebooleanAllow replacing an existing output. Default false
licensestringPro license token; falls back to BLACKOUT_LICENSE

Both return a human-readable summary followed by a JSON block with per-category counts, page count, extractableChars (0 on every successful redaction), and licenseState"none", "invalid", or "valid".

If a token is supplied and fails verification, redact_pdf on an over-limit document reports LICENSE_INVALID rather than the generic page-limit error, so an agent can tell "this needs a license" apart from "this license is wrong" and say something useful to the person who owns it.

Limits

Free up to 10 pages per document. A Pro license ($25, one-time) removes the limit and is the same license the browser app uses.

See also

Thrain LLC · support@thrain.ai

Keywords

mcp

FAQs

Package last updated on 02 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts