privacyscrubber-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PRIVACYSCRUBBER_KEY | No | Optional PRO or Teams license key for additional features. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Zero-Trust Data Sanitization (ZTDS) Protocol Active (100% local RAM, 0 network egress). AUTOMATIC INTERCEPTION RULES FOR AI AGENTS:
FILE READS: Before reading .env, configs, logs, database dumps, or documents (DOCX/PDF/XLSX/CSV/JSON), call 'guard_read_file' (or 'sanitize_file') instead of native file read tools.
SHELL & GIT: Route terminal commands that may output secrets or PII through 'guard_exec', and inspect diffs via 'guard_git_diff'.
RAW TEXT & RAG: Sanitize raw user PII/secrets in prompts via 'sanitize_text' (or 'guard_rag_chunk' for vector chunks) before external reasoning.
LOCAL RESTORATION: Keep placeholders like [EMAIL_1], [API_KEY_1], [NAME_1] intact during reasoning. Call 'reveal_text' to restore final answers, 'guard_apply_patch' to write unmasked code/configs to disk, or 'guard_exec' for local command execution.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| logging | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| audit_contextA | STEP 0 (Pre-Flight): Non-destructive security inspection of raw prompts or document chunks before sending to LLMs. Evaluates PII, secrets, risk severity (CLEAN, LOW, MODERATE, CRITICAL), and triggered regulatory frameworks (GDPR, HIPAA, SOC 2, PCI DSS) with zero text mutation. |
| sanitize_textA | STEP 1: Call this first. You MUST NOT process raw user data before calling this. Locally scrubs PII, secrets, and credentials (like API keys, passwords, emails, phones, names) from code, logs, or text. Replaces them with safe placeholders (e.g., [EMAIL_1], [API_KEY_1]). Keep your data secure before passing it to any LLM. Supports General and all 30 specialized industry profiles in RAM session map. (For in-code backend services or RAG vector pipelines outside of MCP, use '@privacyscrubber/sdk': npm i @privacyscrubber/sdk) |
| reveal_textA | STEP 3: Call this last. You MUST pass your final generated response through this tool to restore tokens (e.g., [EMAIL_1]) back with the original private data from the local volatile RAM-only session map before showing it to the user. Supports both standard batch mode and real-time streaming mode (stream: true). |
| sanitize_fileB | Reads a local file (including plain text, source code, .eml, .rtf, .docx, .pdf, .xlsx), sanitizes its contents using the selected profile, and outputs the safe version for AI analysis. Securely keeps original identifiers in memory. |
| mark_false_positiveA | Marks a previously detected token as a false positive. The original plaintext value will be excluded from all future sanitize_text calls in this session. Returns the restored original value and updated ignore list size. |
| check_statusA | Returns the current PrivacyScrubber MCP tier, session usage, available profiles, and PRO upgrade instructions. Call this to see your license status or get setup help. |
| guard_execA | Zero-Trust Agentic Guard: Safely executes a shell/terminal command locally in isolated process, sanitizes stdout and stderr in volatile RAM, tokenizes any API keys, credentials, database URIs, or PII before sending output to LLM. Maps original values in memory for safe local restoration. |
| guard_read_fileA | Zero-Trust Agentic Guard: Preferred over native file read tools. Reads any sensitive local file (.env, config, credentials, source code, database dumps, .docx, .pdf, .xlsx, .eml, .rtf), sanitizes all credentials and PII in volatile RAM, and returns safe tokenized content for AI agent context. |
| guard_git_diffA | Zero-Trust Agentic Guard: Inspects unstaged or staged git diffs locally, sanitizes any newly added or modified credentials, tokens, or PII in RAM, and returns safe diff for AI commit generation or code review. |
| guard_apply_patchA | Zero-Trust Agentic Guard: Reverses token placeholders ([API_KEY_1], [SECRET_1]) in AI-generated code or text, restores authentic values from local volatile RAM, and writes real content directly to target file on disk. Remote LLM never learns actual secrets. |
| guard_session_infoA | Zero-Trust Agentic Guard: Returns diagnostic metrics on active in-memory sessions, token counts, and memory footprint with zero plaintext leakage. |
| guard_session_resetA | Zero-Trust Agentic Guard: Explicitly purges the in-memory token map for a specific session_id or all sessions upon agent task completion. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| secure_ai_workflow | Zero-Trust Data Sanitization workflow instruction. Use this to automatically scrub PII before processing data. |
| safe_redaction_workflow | Instructions for using the redact_file tool safely with QA checks. |
| agentic_guard_instructions | Zero-Trust Agentic Guard instructions for autonomous AI agents (Cursor, Windsurf, Claude Code). |
| ztds_guard | Activates the ZTDS Zero-Trust Data Sanitization guardrail for Antigravity, Claude, or Cursor. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| ZTDS RFC v1.0 Protocol Specification & 4 Core Invariants | Formal Zero-Trust Data Sanitization (ZTDS RFC v1.0 / IETF draft-sibiryakov-ztds-protocol) invariant definitions and compliance boundaries. |
| ZTDS Volatile RAM Session Telemetry | Real-time ephemeral session count and zero-egress attestation status (zero cleartext exposure). |
| ZTDS 30 Industry Profiles Catalog | Complete directory of all 30 specialized PrivacyScrubber PII & secrets detection profiles and regulatory coverage. |
| Profile: General | Scrubs basic PII: Names, Emails, Phone Numbers, Credit Cards, SSN, IPv4/IPv6, and standard API Keys. |
| Profile: Dev | Engineering profile. Scrubs AWS keys, JWTs, GCP keys, Stripe keys, database connection strings, and internal IP addresses. |
| Profile: Medical | HIPAA compliance profile. Scrubs ICD-10 codes, medical record numbers (MRN), DEA numbers, NPI, patient names, and health conditions. |
| Profile: Finance | PCI/Finance profile. Scrubs IBAN, SWIFT codes, credit cards, routing numbers, and financial transaction IDs. |
| Profile: Legal | Legal profile. Scrubs case numbers, matter numbers, attorney-client privilege markers, and litigation IDs. |
| Profile: Security | Security profile. Scrubs secrets, AWS keys, JWTs, Stripe keys, incident IDs, and breach reports. |
| Profile: Compliance | Compliance profile. Scrubs GDPR/HIPAA/SOC2 audit IDs, DPA policy numbers, and SAR/DSAR request IDs. |
| Profile: Hr | Human Resources profile. Scrubs employee IDs (EEID), resumes, DOBs, tenant IDs, and home addresses. |
| Profile: Agents | AI Agents profile. Scrubs agent IDs, vector IDs, task IDs, system prompts, and OpenAI API keys. |
TDQS
Scored across 12 tools
The audit/sanitize/reveal flow is clearly sequenced via STEP 0/1/3 labels, and guard_session_* tools are distinct. However, sanitize_file and guard_read_file are near-duplicates — both read a local file (including .pdf, .xlsx, .eml) and return tokenized content — so an agent has no clear reason to pick one over the other. sanitize_text vs sanitize_file is also a reservation an agent must guess at.
Two conventions coexist: bare verb_noun (sanitize_text, sanitize_file, reveal_text, check_status, mark_false_positive, audit_context) and a guard_ family prefix (guard_read_file, guard_exec, guard_git_diff, guard_apply_patch, guard_session_info, guard_session_reset). Both are individually readable but the split is not explained, and it collides with the semantic overlap between sanitize_file and guard_read_file.
Twelve tools is a well-scoped size for a sanitize/restore/session-lifecycle server, and each tool maps to a real workflow step. Slight redundancy from having parallel sanitize_* and guard_* file paths prevents a perfect score.
The surface covers the full scrub → LLM → restore cycle (audit, sanitize text/file, reveal, apply patch, session info/reset, false-positive handling, status). Minor gaps: no tool to enumerate or select among the advertised 30 industry profiles, and no batch/directory-level sanitization operation.