postralai/masquerade

View on GitHub ↗

The Privacy Firewall for LLMs

78 ★21 forksPythonUpdated 1y ago

What you need to know

Privacy-firewall MCP server that automatically detects and redacts sensitive data in PDFs before they are sent to an LLM.

Install

curl -O https://raw.githubusercontent.com/postralai/masquerade/main/setup.sh && bash setup.sh
Manual: python3.12 -m venv pdfmcp && source pdfmcp/bin/activate
pip install git+https://github.com/postralai/masquerade@main
python -m masquerade.configure_claude

Usage

  • Prompt Claude: "Redact sensitive information from this PDF: /path/to/filename.pdf"
  • MCP opens the redacted and highlighted PDF files, then upload the redacted PDF to Claude for querying
  • Add the python path, MCP file path and TINFOIL_API_KEY to claude_desktop_config.json

Key features

  • Reads a PDF, converts it to text and detects sensitive data (names, emails, dates, entities)
  • Redacts sensitive data and creates a redacted PDF
  • Returns a summary with masked values, redaction counts per page and the path to the redacted file
  • Uses Tinfoil (isolated AI platform running Llama 3.3 70B) for detection

Best for

Safely working with contracts, medical records or internal documents through AI assistants.

Caveats

  • Requires a Tinfoil API key
  • Python version must be >=3.10 and <=3.12
  • Never upload the original PDF to Claude; only pass the file path
Platforms: macOS · Linux · WindowsClients: Claude Desktop
Documentation ↗

Reviewed 2026-08-11

Topics

anonymizationclaudemcpmcp-servermodel-context-protocolpdf-processingpdf-pseudonymizationpdf-redactionprivacyprivate-llmpseudonymization
Stars
78★
Forks
21
Language
Python
License
MIT
Created
2025-06-09
Last push
2025-08-11