Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PRIVACYSCRUBBER_KEYNoOptional 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:

  1. 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.

  2. SHELL & GIT: Route terminal commands that may output secrets or PII through 'guard_exec', and inspect diffs via 'guard_git_diff'.

  3. RAW TEXT & RAG: Sanitize raw user PII/secrets in prompts via 'sanitize_text' (or 'guard_rag_chunk' for vector chunks) before external reasoning.

  4. 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_unmask_args' for local tool calls.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
logging
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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).

stream_reveal_textA

STEP 3 (Streaming): Real-time streaming token detokenizer for LLM Server-Sent Events (SSE) and stdio chunk pipelines. Buffers split token candidates across chunk boundaries (e.g. '[EM' + 'AIL_1]') so no characters or tokens are corrupted. Pass 'flush: true' on the final chunk.

sanitize_fileA

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.

audit_directory_for_piiB

Scans a local directory for leaks of secrets, keys, and PII. Returns a summary report. Use this tool for Security Auditing.

redact_fileA

Action/Redact: In-place redaction of a local file. Replaces PII and secrets with tokens and saves the file. By default, creates a .bak backup. Use dry_run=true to test without modifying.

create_default_configA

Creates a default 'privacyscrubber.json' configuration file in the active workspace root directory if one does not exist. Includes template structures for custom regex rules and exclusion bypass patterns.

generate_compliance_reportA

Generates an official Zero-Trust Compliance Audit Certificate (GDPR, HIPAA, EU AI Act, SOC 2) for the current MCP session. Returns cryptographic session hash, masked entities breakdown, and compliance certification.

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_execB

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.

create_agent_rulesB

Zero-Trust Agentic Guard: Scaffolds CISO-grade AI Agent Rules in workspace (.cursor/rules/privacyscrubber.mdc, .cursorrules, .windsurfrules, CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .clinerules). Guides autonomous agents to route all file reads, git diffs, and shell commands through PrivacyScrubber Guard tools.

guard_unmask_argsA

Zero-Trust Agentic Guard: Detokenizes parameters, JSON objects, or arguments in local RAM before dispatching to local tools or APIs without sending cleartext secrets back to the LLM.

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_resetB

Zero-Trust Agentic Guard: Explicitly purges the in-memory token map for a specific session_id or all sessions upon agent task completion.

guard_rag_chunkA

Zero-Trust Agentic Guard: Sanitizes an array of document chunks or knowledge base records before sending to embedding models or vector databases (Chroma, Pinecone, Qdrant). Keeps authentic data in local RAM with zero network leakage.

guard_rag_restoreA

Zero-Trust Agentic Guard: Re-hydrates retrieved vector search results or chunks by restoring token placeholders with authentic data from the volatile RAM session before presenting to the user.

export_audit_logA

Zero-Trust Enterprise Compliance: Exports an immutable, tamper-evident audit log in SIEM standard formats (CEF / ArcSight, RFC 5424 Syslog, JSONL, or JSON) with zero plaintext PII leakage. Can write directly to a local log file or stream.

generate_procurement_memoC

Zero-Trust Enterprise Procurement: Generates an executive-ready Procurement & ROI Memorandum for Chief Information Security Officers (CISO), Data Protection Officers (DPO), and VP of Engineering. Compares TCO of traditional Cloud DLP ($1.5k–$4k/mo) vs PrivacyScrubber TEAMS ($99/mo flat) or Developer SDK ($299/mo flat), citing statutory frameworks (GDPR Art. 4/28, HIPAA §164.514, SOC 2 Type II, PCI DSS v4.0, NIST SP 800-53, EU AI Act Art. 50).

Prompts

Interactive templates invoked by user choice

NameDescription
secure_ai_workflowZero-Trust Data Sanitization workflow instruction. Use this to automatically scrub PII before processing data.
safe_redaction_workflowInstructions for using the redact_file tool safely with QA checks.
agentic_guard_instructionsZero-Trust Agentic Guard instructions for autonomous AI agents (Cursor, Windsurf, Claude Code).

Resources

Contextual data attached and managed by the client

NameDescription
ZTDS 30 Industry Profiles CatalogComplete directory of all 30 specialized PrivacyScrubber PII & secrets detection profiles and regulatory coverage.
Profile: GeneralScrubs basic PII: Names, Emails, Phone Numbers, Credit Cards, SSN, IPv4/IPv6, and standard API Keys.
Profile: DevEngineering profile. Scrubs AWS keys, JWTs, GCP keys, Stripe keys, database connection strings, and internal IP addresses.
Profile: MedicalHIPAA compliance profile. Scrubs ICD-10 codes, medical record numbers (MRN), DEA numbers, NPI, patient names, and health conditions.
Profile: FinancePCI/Finance profile. Scrubs IBAN, SWIFT codes, credit cards, routing numbers, and financial transaction IDs.
Profile: LegalLegal profile. Scrubs case numbers, matter numbers, attorney-client privilege markers, and litigation IDs.
Profile: SecuritySecurity profile. Scrubs secrets, AWS keys, JWTs, Stripe keys, incident IDs, and breach reports.
Profile: ComplianceCompliance profile. Scrubs GDPR/HIPAA/SOC2 audit IDs, DPA policy numbers, and SAR/DSAR request IDs.
Profile: HrHuman Resources profile. Scrubs employee IDs (EEID), resumes, DOBs, tenant IDs, and home addresses.
Profile: AgentsAI Agents profile. Scrubs agent IDs, vector IDs, task IDs, system prompts, and OpenAI API keys.

TDQS

B3.4/5.0

Scored across 23 tools

Disambiguation3/5

Several tools overlap: sanitize_file and guard_read_file both read and sanitize local files, while reveal_text, stream_reveal_text, guard_unmask_args, guard_rag_restore, and guard_apply_patch all restore tokenized data in different contexts. The detailed descriptions and STEP labels help, but agents must carefully parse context to choose correctly.

Naming Consistency4/5

Tool names are consistently snake_case and generally follow a verb_noun pattern. The guard_ prefix is used as a predictable namespace for zero-trust tools, though a few names like guard_session_info and guard_session_reset are more noun-centric than action-oriented.

Tool Count3/5

With 23 tools, the surface is heavy for a privacy-scrubbing server. Many tools serve distinct guard, audit, and compliance workflows, but enterprise extras such as procurement memo, agent rules, and compliance certificate generation inflate the set beyond the core scrubbing purpose.

Completeness4/5

The core privacy lifecycle is well covered: audit, sanitize, reveal/stream, file redaction, session reset, compliance reporting, audit export, and guard wrappers for shell/file/git/RAG workflows. Minor gaps remain around profile/config management and audit-log querying beyond export.

Maintenance

ActivityActive
ResponsivenessOutdated data