privacyscrubber-mcp
Locally sanitize sensitive data before sending it to LLMs and restore the original values afterward.
Scrub PII, secrets, API keys, passwords, emails, phones, and names from text, code, or logs, replacing them with placeholders such as
[EMAIL_1].Select a detection profile: Free
General, or PRO profiles likeDev,Medical,Legal,Finance,Security, and others.Read and sanitize local files by absolute path, returning safe redacted content for AI analysis.
Reveal or rehydrate masked tokens in an LLM response using the local volatile RAM-only session map.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@privacyscrubber-mcp scrub this text: 'Name: Alice, SSN: 123-45-6789'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@privacyscrubber/mcp-server
CISO-Approved Zero-Trust PII & Secrets Redaction MCP Server for Cursor, Windsurf, and Claude Desktop. Locally scrubs PII, secrets, credentials, and custom regex rules from files and text contexts before they reach remote LLM providers to prevent API leaks and ensure HIPAA/SOC 2 compliance at the developer endpoint.
Support Zero-Trust Open Source: If PrivacyScrubber protects your API keys, source code, and developer credentials from model leaks, please Star this repository on GitHub or execute
gh repo star moxno/privacyscrubber-mcp.
Direct Commercial Licensing & Production Infrastructure:
Looking to automate zero-trust PII redaction inside backend microservices, ETL pipelines, or LangChain/LlamaIndex agents?
Developer SDK ($299/mo flat or $2,990/yr): Unlimited internal backend nodes, zero network egress, <1ms in-memory latency. Subscribe to Developer SDK | Technical Specs
TEAMS ($99/mo flat): Unlimited team seats across your entire domain with cryptographic P2P session handoff. Deploy TEAMS Plan
PRO ($15/mo or $110 Lifetime): Single-seat unlimited throughput across all 30 vertical profiles. Get PRO License
๐ Zero-Trust Data Flow
All sensitive parameters, identifiers, and variables are intercepted locally inside your machine's RAM. They are replaced by tokens (e.g. [EMAIL_1]) before being sent to the AI. Once the AI responds, the tokens are safely swapped back to original values in your local context.
[Raw Input / Files] โโ> [MCP sanitize_text] โโ> [Masked Tokens] โโ> [LLM API]
โ โ
(In-Memory Map) (Result)
โ โ
[Original Output] <โโโ [MCP reveal_text] <โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโRelated MCP server: trustboost-pii-sanitizer
๐ Installation
1. 1-Click Universal Auto-Installer (Recommended)
Automatically detects installed AI IDEs on your machine and safely configures PrivacyScrubber without corrupting existing tools:
# Auto-detect and configure all installed clients (Cursor, Claude Desktop, Claude Code, Windsurf, VS Code, Cline, Zed):
npx -y @privacyscrubber/mcp-server install --all
# Scaffold project-level deterministic IDE hooks (.cursor/hooks.json, .claude/settings.json) & agent rules:
npx -y @privacyscrubber/mcp-server install --workspace
# Or target specific environments directly:
npx -y @privacyscrubber/mcp-server install --claude-code
npx -y @privacyscrubber/mcp-server install --vscode
npx -y @privacyscrubber/mcp-server install --zed
npx -y @privacyscrubber/mcp-server install --cursor
npx -y @privacyscrubber/mcp-server install --claude2. Install via Smithery
To automatically configure and run with your preferred client, install using Smithery:
npx -y @smithery/cli install @privacyscrubber/mcp-server --write-to-clients3. Instant Run with NPX
Run the server directly without local installation:
npx -y @privacyscrubber/mcp-server4. Instant Run with UVX (Python / PyPI)
Run the server directly inside Python agent workflows (CrewAI, LangChain, AutoGen, LlamaIndex):
uvx privacyscrubber-mcpOr via pip:
pip install privacyscrubber-mcp
privacyscrubber-mcp5. Programmatic Node.js / TypeScript SDK (Lightweight Presidio Alternative)
Need direct, in-memory zero-trust PII sanitization in your backend microservice, Next.js app, or RAG vector pipeline rather than an MCP server? Use our official zero-dependency SDK:
npm install @privacyscrubber/sdkimport OpenAI from 'openai';
import { wrapOpenAI } from '@privacyscrubber/sdk';
// Transparently masks PII before sending to LLM and rehydrates responses:
const openai = wrapOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY }));
// Outbound prompt is sanitized in local RAM before leaving your machine:
// "Schedule a call with [NAME_1] at [EMAIL_1] regarding API key [AWS_KEY_1]."
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Schedule a call with Alice Smith at alice@acme.com with AKIAIOSFODNN7EXAMPLE.' }]
});
// Incoming LLM answer is automatically rehydrated with "Alice Smith (alice@acme.com)":
console.log(completion.choices[0].message.content);โก Why @privacyscrubber/sdk vs Microsoft Presidio?
Microsoft Presidio is the Python standard, but deploying it in a Node.js / TypeScript stack requires running heavy Python microservices, Docker containers, and 500MB+ spaCy NLP models with 35โ120ms latency. @privacyscrubber/sdk runs 100% in-process with zero dependencies:
Feature / Metric |
| Microsoft Presidio | AWS Comprehend / Google Cloud DLP |
Runtime & Dependencies | 0 dependencies (~150KB) | Python + Docker + spaCy (~500MB) | Heavy Cloud SDKs |
Execution Latency | Sub-millisecond in RAM (<1ms) | 35โ120ms HTTP/gRPC roundtrip | 180โ400ms external cloud roundtrip |
Docker / Sidecar Needed | None (Pure in-process Node/WASM) | Mandatory Docker container | VPC endpoints & IAM configurations |
Network Egress | 0 Bytes (100% Air-gapped) | Local internal network hop | Full unencrypted payload to cloud |
Data Loss & Reversibility | 0 Loss (RAM-reversible via | Manual token vault configuration | Irreversible masking / hashing |
OpenAI / LangChain 1-Liner | Built-in ( | Complex custom pipeline glue | Custom proxy architecture |
DevOps Secrets Interception | Built-in (AWS, JWT, DB URIs, GitHub PAT) | Custom regex recognizers needed | Cloud-specific classifiers |
Streaming Rehydration | Built-in ( | Buffering / chunk split failures | Not supported in real-time streams |
๐ View @privacyscrubber/sdk on NPM | Full documentation, Express middleware, LangChain transforms, and 25 compliance profiles.
๐ค AI Orchestrator Recipes: LangChain, LlamaIndex, CrewAI & AutoGPT
If you are building autonomous agents, RAG vector pipelines, or backend services rather than single-user IDE prompts, use @privacyscrubber/sdk to sanitize data in-memory:
1. LangChain.js (LCEL & RAG Document Ingestion)
import { ChatOpenAI } from '@langchain/openai';
import { createLangChainTransform, createDocumentTransformer } from '@privacyscrubber/sdk';
// A. RAG Pre-Ingestion: sanitize documents before embedding into vector stores
const docTransformer = createDocumentTransformer({
profile: 'General',
sensitiveMetadataKeys: ['account_owner', 'submitter_email'],
attachTelemetry: true
});
const sanitizedDocs = await docTransformer.transformDocuments(rawDocs);
// B. LCEL Runtime Chains: sanitize prompts and restore responses in local RAM
const transform = createLangChainTransform({ defaultProfile: 'Dev' });
const { scrubbedText, tokenMap } = transform.preprocess(
"Deploying database with user admin and pwd postgresql://user:SecretPass123@db.internal:5432/prod"
);
const model = new ChatOpenAI({ model: 'gpt-4o' });
const response = await model.invoke(scrubbedText);
const finalOutput = transform.postprocess(response.content, tokenMap);2. LlamaIndex.TS & Universal Vector DB Ingestion (Chroma, Pinecone, Qdrant)
import { createVectorIngestionGuard, createLlamaIndexTransform } from '@privacyscrubber/sdk';
// Initialize in-memory Vector Ingestion Guard (<1ms per batch, zero network egress)
const guard = createVectorIngestionGuard({
profile: 'Finance',
sensitiveMetadataKeys: ['contractor_email', 'billing_contact']
});
// A. Sanitize Chroma columnar batches ({ ids, documents, metadatas })
const cleanChroma = guard.sanitizeRecords(chromaBatch);
// B. Sanitize Pinecone / Qdrant record arrays ({ id, text/payload, metadata })
const cleanRecords = guard.sanitizeRecords(pineconeRecords);
// C. Align search query tokens with sanitized vector space before embedding
const { query: alignedQuery } = guard.sanitizeQuery("Search user john@example.com records");
// D. Transparent Vector Store Proxy: auto-sanitizes on write, re-hydrates on query
const guardedStore = guard.wrapVectorStore(nativeVectorStore);Complete runnable recipes are included inside the npm package under
@privacyscrubber/sdk/examples/(or runnpx @privacyscrubber/sdk).
3. CrewAI & Multi-Agent Swarms (Sidecar Mode / Python Interop)
# Run lightweight zero-dependency local daemon (<1ms in-memory, 0 external network calls):
npx @privacyscrubber/sdk sidecar --port 3100# In your Python CrewAI / AutoGen Agent tools:
import requests
def sanitize_agent_input(prompt: str) -> tuple[str, dict]:
res = requests.post("http://127.0.0.1:3100/sanitize", json={"text": prompt, "profile": "Dev"}).json()
return res["scrubbedText"], res["tokenMap"]
def restore_agent_output(ai_response: str, token_map: dict) -> str:
res = requests.post("http://127.0.0.1:3100/restore", json={"text": ai_response, "tokenMap": token_map}).json()
return res["restoredText"]4. AutoGPT / Multi-Turn Autonomous Agents
import { PrivacyScrubberEngine, createGuardedTools } from '@privacyscrubber/sdk';
const engine = new PrivacyScrubberEngine({ defaultProfile: 'Dev' });
// Equips agent with tools that intercept commands, file reads, and git diffs before model exposure:
const guardedTools = createGuardedTools(engine);Enterprise & Production Licensing:
Self-Serve Developer SDK ($299/mo flat or $2,990/yr): Unlimited internal backend nodes, microservices, and RAG pipelines. Subscribe to Developer SDK | Developer SDK Specs
PrivacyScrubber TEAMS ($99/mo flat): Unlimited team seats, centralized policy enforcement, encrypted session handoff. Deploy TEAMS Plan
Enterprise Air-Gapped License: On-premise source code distribution, zero-network custom models. Contact Enterprise
๐ก๏ธ Architecture & Security Deep-Dive (Zero-Trust vs Cloud DLP)
When AI IDEs (Cursor, Claude Desktop, Windsurf) connect to model providers, developer credentials, database connection strings, and internal customer PII are at continuous risk of prompt exfiltration. The @privacyscrubber/mcp-server enforces four immutable architectural guarantees:
Stdio Air-Gapped Transport: The MCP server communicates exclusively over local standard input/output (
stdio) child processes spawned by your IDE. It opens zero external listening ports and initiates zero remote network requests.Volatile RAM-Only Token Map: The mapping table between synthetic tokens (
[AWS_KEY_1],[EMAIL_1]) and raw cleartext is maintained exclusively in ephemeral node memory and is wiped the moment your IDE session closes.Local ZTDSโข In-Memory Engine vs Cloud Proxy Overhead: Unlike cloud DLP gateways (Nightfall, Skyflow) that add 200โ400ms latency and transmit unencrypted code to third parties,
@privacyscrubber/mcp-serverruns locally in <2ms with zero data egress.Permanent Standards & Academic Validation:
IETF Specification: draft-sibiryakov-ztds-protocol-01 โ Revision 01 ยท 2026-09-23 ยท 13 pages
CERN / Zenodo Foundation: DOI 10.5281/zenodo.22058770
Center for Open Science (OSF): DOI 10.17605/OSF.IO/5BYJF
Patent Pending: U.S. & International Patents Pending (Paris Convention / PCT Priority)
โ๏ธ Client Integrations
Claude Desktop
Add this to your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_OPTIONAL_PRO_LICENSE_KEY"
}
}
}
}Cursor
Add to your project's .cursor/mcp.json (workspace) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_PRO_OR_TEAMS_LICENSE_KEY"
}
}
}
}Or via Cursor GUI: Open Settings (Cmd/Ctrl + ,) → Features → MCP → + Add New MCP Tool:
Name:
privacyscrubberType:
commandCommand:
npx -y @privacyscrubber/mcp-server
Windsurf (Codeium)
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_PRO_OR_TEAMS_LICENSE_KEY"
}
}
}
}Or via Windsurf GUI: Open Settings → MCP Settings → add new command server npx -y @privacyscrubber/mcp-server.
Ready-to-copy JSON templates for all supported clients are available in
examples/configs/.
Cline / Roo Code
Add to cline_mcp_settings.json:
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_OPTIONAL_PRO_LICENSE_KEY"
}
}
}
}Claude Code CLI
Add directly from your terminal:
claude mcp add privacyscrubber -- npx -y @privacyscrubber/mcp-serverVS Code Native MCP (.vscode/mcp.json)
For official VS Code Native MCP support, configure your project's .vscode/mcp.json:
{
"servers": {
"privacyscrubber": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_OPTIONAL_PRO_LICENSE_KEY"
}
}
}
}Zed IDE (settings.json)
Add to your Zed configuration (~/.config/zed/settings.json or %APPDATA%\Zed\settings.json):
{
"context_servers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_OPTIONAL_PRO_LICENSE_KEY"
}
}
}
}๐ ๏ธ Provided Tools & JSON-RPC Specifications
1. sanitize_text
Redacts PII, secrets, API keys, and credentials from a text block and populates the volatile local replacement mapping.
Arguments:
text(string, required): The raw content or logs to sanitize.profile(string, optional): Gated industry detection profile (e.g., 'General', 'Dev', 'Medical', 'Legal', 'Compliance'). Defaults to 'General'.
JSON-RPC Call Example:
{ "method": "tools/call", "params": { "name": "sanitize_text", "arguments": { "text": "Contact me at dev-key-1234 or jane.doe@company.com", "profile": "General" } } }Response Example:
{ "content": [ { "type": "text", "text": "Contact me at [SECRET_1] or [EMAIL_1]" } ] }
2. reveal_text
Detokenizes the AI response back to the original values locally.
Arguments:
text(string, required): The response from the LLM containing tokenized placeholders.
JSON-RPC Call Example:
{ "method": "tools/call", "params": { "name": "reveal_text", "arguments": { "text": "Please reach out to [EMAIL_1] regarding the update." } } }Response Example:
{ "content": [ { "type": "text", "text": "Please reach out to jane.doe@company.com regarding the update." } ] }
3. sanitize_file
Reads a local file, extracts text, sanitizes it, and returns the redacted template for LLM analysis.
Supported Formats: Plain text (source code, logs, CSV, JSON, markdown) and Microsoft Word (
.docx) documents.Arguments:
filePath(string, required): Absolute file path to read and sanitize.profile(string, optional): The industry detection profile.
4. guard_exec (Command Execution Firewall)
Safely executes terminal commands in an isolated child process, masking stdout/stderr PII, database credentials, and API keys in local RAM before passing them to the AI agent. Includes a CISO audit receipt in stderr.
Arguments:
command(string, required): The shell command to execute (e.g.cat .env,docker logs web,git diff).cwd(string, optional): Working directory.profile(string, optional): Detection profile (defaults toDev).timeout_ms(number, optional): Timeout in ms (defaults to15000).
5. guard_read_file (Credential-Masking File Reader)
Reads files (.env, configs, source code, database dumps) and tokenizes all passwords, JWTs, and PII in volatile memory, returning safe redacted content for AI reasoning.
Arguments:
file_path(string, required): Path to file.profile(string, optional): Detection profile (defaults toDev).max_lines(number, optional): Line cap for large files (defaults to500).
6. guard_git_diff (Pre-Commit & Diff Sanitizer)
Inspects staged (--cached) or unstaged repository diffs, redacting any newly introduced secrets or PII in local RAM before AI code review or commit message generation.
Arguments:
staged(boolean, optional): Iftrue, inspects staged changes (git diff --cached). Defaults tofalse.cwd(string, optional): Working directory.profile(string, optional): Detection profile (defaults toDev).
7. guard_apply_patch (Safe Patch Applicator)
Reverses token placeholders ([API_KEY_1], [SECRET_1]) in AI-generated code or text by looking up the local RAM session map, creating a .bak backup, and writing authentic cleartext directly to disk. The remote LLM never sees real secrets.
Arguments:
file_path(string, required): Path to target file.content(string, required): Content containing tokens to restore on disk.create_backup(boolean, optional): Backup existing file before write (defaults totrue).
8. create_agent_rules (1-Click Agent Rule & Deterministic Hook Injection)
Automatically scaffolds CISO-grade Zero-Trust directives into .cursorrules, .windsurfrules, CLAUDE.md, .github/copilot-instructions.md, .clinerules, plus deterministic IDE lifecycle hooks in .cursor/hooks.json (beforeReadFile, beforeShellExecution) and .claude/settings.json (PreToolUse).
Arguments:
agent_types(array, optional):["all"],["cursor"],["windsurf"],["claude_code"],["copilot"],["cline"]. Defaults to["all"].workspace_dir(string, optional): Workspace directory.
9. check_status
Returns a visual dashboard showing your current tier, session request count, active profiles, and upgrade instructions. Use it at any time to check your license status or get setup help.
Arguments: (none required)
JSON-RPC Call Example:
{ "method": "tools/call", "params": { "name": "check_status", "arguments": {} } }Response Example (Free Tier):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ PrivacyScrubber MCP Server v2.4.8 โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ โ ๐ Tier: FREE โ โ ๐ Session requests: 5 โ โ ๐ Input size limit: 15k General / 5k Vertical โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ โ ๐ท๏ธ Profiles: 30 Specialized (5k trial) โ โ ๐ Custom rules: ๐ Locked โ requires PRO โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ โ ๐ณ Upgrade to PRO โ $110 Lifetime โ โ https://privacyscrubber.com/pricing?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ โ After purchase, add your key to MCP config: โ โ "PRIVACYSCRUBBER_KEY": "<your-key-here>" โ โ Full setup guide: โ โ https://privacyscrubber.com/pii-mcp/?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
10. generate_procurement_memo (CISO & DPO Procurement Hub)
Generates an institutional business case, regulatory risk breakdown, and procurement memo for CISO, DPO, and Legal sign-off. Computes deterministic ROI versus breach penalties and cloud DLP egress fees.
Arguments:
targetTier(string, optional): Target plan ("teams"at $99/mo or"sdk"at $299/mo). Defaults to"teams".teamSize(number, optional): Estimated developer / analyst seat count (defaults to10).primaryFramework(string, optional): Core compliance framework ("gdpr","hipaa","soc2", or"pci_dss"). Defaults to"gdpr".
JSON-RPC Call Example:
{ "method": "tools/call", "params": { "name": "generate_procurement_memo", "arguments": { "targetTier": "teams", "teamSize": 15, "primaryFramework": "gdpr" } } }Output: Formatted Markdown enterprise procurement memorandum ready for immediate insertion into internal RFCs, Confluence wikis, or enterprise purchase requisitions.
๐ก๏ธ Standalone CLI: ps-guard
PrivacyScrubber bundles ps-guard for Unix pipe, pre-commit, and agentic workflows:
# Run on-demand via scoped npx (zero external lookup):
cat .env | npx -y -p @privacyscrubber/mcp-server ps-guard --profile dev
# Or install globally for direct command access:
npm install -g @privacyscrubber/mcp-server
# Pipe any output through RAM redaction
cat .env | ps-guard --profile dev
# Execute commands through the ZTDS safety wrapper
ps-guard -- npm test
# Review git diff with secrets redacted
ps-guard --diff --staged
# Generate rules & deterministic hooks (.cursor/hooks.json, .claude/settings.json, .cursorrules, CLAUDE.md)
ps-guard --rules
# Deterministic IDE Lifecycle Hook Handler (Claude Code PreToolUse & Cursor v1.7+ beforeReadFile/beforeShellExecution)
# Blocks native reads of .env*, *.pem, *.key, id_rsa, *credentials*.json and redirects the agent to guard_read_file / guard_exec:
npx -y @privacyscrubber/mcp-server --hook๐ Browser Extension & Web Client
Looking for real-time protection directly inside your web browser?
Chrome Extension: Get the PrivacyScrubber Chrome Extension to sanitize prompts directly inside ChatGPT, Claude, and Gemini in real-time.
Web Sandbox: Use the zero-server browser sanitization tools at PrivacyScrubber Homepage.
๐ License & Commercial Upgrade
By default, the server runs under the Free Tier (15,000 characters per request on the General PII profile and a 5,000-character trial quota per request across all 30 specialized industry profiles). To unlock unlimited throughput across all 30 specialized engineering, medical, legal, and financial PII profiles, as well as team-wide custom rules, you can purchase a commercial license.
Commercial Plan & Feature Comparison
Feature | Community Free | PRO Tier | TEAMS Tier | Developer SDK |
Execution Architecture | Local Stdio RAM | Local Stdio RAM | Local Stdio RAM | In-Process Node/WASM |
Volatile Tokenization | Yes (RAM-only) | Yes (RAM-only) | Yes (RAM-only) | Yes (RAM-only) |
Standard PII Masking | Yes | Yes | Yes | Yes |
Max Character Throughput | 15,000 chars / call | Unlimited | Unlimited | Unlimited |
30 Industry Profiles | General Only (5k trial) | All 30 Profiles | All 30 Profiles | All 30 Profiles |
Custom Regex Rules | Locked | Unlimited | Unlimited | Unlimited |
Team Rules Sync (GPO) | No | No | Yes (Shared Link) | Yes (Configurable) |
Microservice / RAG Export | No | No | No | Yes ( |
Subprocessor Liability | 0 (Client-side) | 0 (Client-side) | 0 (Client-side) | 0 (In-Process Node/WASM) |
Licensing Cost | $0 | $15/mo or $110 Lifetime | $99/mo Flat Rate | $299/mo or $2,990/yr |
Direct Activation | Default included |
๐ Acquire a Commercial License Key at privacyscrubber.com/pricing
๐ After Purchase: Activate PRO in Your MCP Client
After purchasing a PRO license at privacyscrubber.com/pricing, you will receive a license key. Add it to your MCP client config as an environment variable: PRIVACYSCRUBBER_KEY.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_LICENSE_KEY_HERE"
}
}
}
}Restart Claude Desktop after saving.
Cursor
Go to Settings โ Features โ MCP Servers.
Find
privacyscrubberand click Edit.Add the environment variable:
PRIVACYSCRUBBER_KEY=YOUR_LICENSE_KEY_HERE.Restart Cursor.
Alternatively, export it system-wide so all tools pick it up:
# macOS / Linux โ add to ~/.zshrc or ~/.bashrc
export PRIVACYSCRUBBER_KEY="YOUR_LICENSE_KEY_HERE"Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server"],
"env": {
"PRIVACYSCRUBBER_KEY": "YOUR_LICENSE_KEY_HERE"
}
}
}
}Verify Activation
After adding the key, ask your AI agent to call check_status:
Use the check_status tool from PrivacyScrubber MCP๐ Ecosystem & Production Architecture Guides
๐ Web App: https://privacyscrubber.com
๐ฆ Node.js / TypeScript SDK: @privacyscrubber/sdk (npm)
๐งฉ Chrome Extension: Chrome Web Store
๐ก๏ธ RAG & Vector Databases: Sanitizing PII Before Vector DB Ingestion (Pinecone, Chroma, Qdrant)
๐ค LangChain & LlamaIndex: In-Memory PII Middleware for AI Agent Pipelines
โก AWS Comprehend Alternative: In-Memory Redaction Without Egress or Cloud Overhead
๐ Academic Foundations & Regulatory Verification
PrivacyScrubber and the Zero-Trust Data Sanitization (ZTDS) protocol are backed by published scientific, clinical, and legal treatises:
Repository / Archive | DOI / Identifier | Focus Area | Regulatory & Compliance Scope |
IETF Specification | The ZTDS Protocol for Frontier AI Ingestion (Internet-Draft) | Global AI Privacy, Zero-Egress Architecture | |
Zenodo / CERN | Zero-Trust Data Sanitization (ZTDS) Protocol Foundation | Cross-Border AI Privacy, ISO 27001 A.8.11 | |
OSF (Center for Open Science) | Empirical Latency Benchmark & Memory Profiling (<2ms RAM) | Performance vs Cloud DLP Proxies | |
SSRN / Elsevier | Enterprise Generative AI Governance | EU AI Act, UK GDPR, US State Privacy | |
medRxiv (Cold Spring Harbor) | Multi-Center Clinical Trial De-Identification | HIPAA Safe Harbor Section 164.514(b) | |
Law Archive / OSF | Preserving Attorney-Client Privilege in AI Workflows | ABA Model Rules & Legal Ethics |
Citing PrivacyScrubber in Research & Audits
@software{sibiryakov2026privacyscrubber,
author = {Sibiryakov, Ilya},
title = {PrivacyScrubber: Zero-Trust Data Sanitization (ZTDS) Engine & MCP Server},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.22058770},
url = {https://github.com/moxno/privacyscrubber-mcp}
}๐ License
MIT ยฉ Ilya Sibiryakov (BrandMeWeb)
โ๏ธ Intellectual Property & Patent Disclosures
The Zero-Trust Data Sanitization (ZTDS) architecture, in-memory deterministic tokenization, cryptographic session handoff, and stdio execution methods implemented in this package are proprietary technology of Ilya Sibiryakov (BrandMeWeb) and are protected under Patent Pending status:
Legal Status: U.S. & International Patents Pending
Priority Framework: Paris Convention Art. 4 & 35 U.S.C. ยง 119 Priority (Active 12-Month Window)
Patent Status: U.S. & International Patents Pending (Priority Locked)
Official Title: SYSTEM AND METHOD FOR CLIENT-SIDE ZERO-TRUST DATA SANITIZATION AND CRYPTOGRAPHIC SESSION HANDOFF IN ARTIFICIAL INTELLIGENCE WORKFLOWS
Patent Disclosures Hub: privacyscrubber.com/patents/ (formal verification via counsel NDA).
๐ Internet Engineering Task Force (IETF) Specification
Specification Title: The Zero-Trust Data Sanitization (ZTDS) Protocol for Frontier Artificial Intelligence Ingestion
Document Category: IETF Internet-Draft (Individual Submission)
IETF Datatracker: https://datatracker.ietf.org/doc/draft-sibiryakov-ztds-protocol/
Archive Plaintext: https://www.ietf.org/archive/id/draft-sibiryakov-ztds-protocol-01.txt
Available Tools
23 toolsaudit_contextARead-onlyIdempotent
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.
Inputs: text (required), format, sector, profile.
audit_directory_for_piiBRead-onlyIdempotent
Scans a local directory for leaks of secrets, keys, and PII. Returns a summary report. Use this tool for Security Auditing.
Inputs: directory_path (required), sector, profile, extensions, +1 more.
check_statusARead-onlyIdempotent
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.
Inputs: no named parameters.
create_agent_rulesBIdempotent
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.
Inputs: agent_types, workspace_dir.
create_default_configAIdempotent
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.
Inputs: no named parameters.
export_audit_logAIdempotent
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.
Inputs: text, format, department, session_id, +2 more.
generate_compliance_reportARead-onlyIdempotent
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.
Inputs: format, department, session_id, company_name.
generate_procurement_memoCRead-onlyIdempotent
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).
Inputs: format, app_name, developer, team_size, +2 more.
guard_apply_patchAIdempotent
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.
Inputs: content (required), file_path (required), session_id, create_backup.
guard_execBDestructive
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.
Inputs: command (required), cwd, sector, profile, +2 more.
guard_git_diffARead-onlyIdempotent
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.
Inputs: cwd, sector, staged, profile, +1 more.
guard_rag_chunkARead-onlyIdempotent
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.
Inputs: chunks (required), sector, profile, session_id.
guard_rag_restoreARead-onlyIdempotent
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.
Inputs: results (required), session_id.
guard_read_fileARead-onlyIdempotent
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.
Inputs: file_path (required), sector, profile, max_lines, +1 more.
guard_session_infoARead-onlyIdempotent
Zero-Trust Agentic Guard: Returns diagnostic metrics on active in-memory sessions, token counts, and memory footprint with zero plaintext leakage.
Inputs: session_id.
guard_session_resetBRead-onlyIdempotent
Zero-Trust Agentic Guard: Explicitly purges the in-memory token map for a specific session_id or all sessions upon agent task completion.
Inputs: all, session_id.
guard_unmask_argsARead-onlyIdempotent
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.
Inputs: tool_args (required), session_id.
mark_false_positiveARead-onlyIdempotent
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.
Inputs: token (required), session_id.
redact_fileADestructive
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.
Inputs: file_path (required), sector, dry_run, profile, +1 more.
reveal_textARead-onlyIdempotent
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).
Inputs: text (required), flush, stream, session_id.
sanitize_fileARead-onlyIdempotent
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.
Inputs: file_path (required), sector, compact, profile, +1 more.
sanitize_textARead-onlyIdempotent
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)
Inputs: text (required), sector, compact, profile, +2 more.
stream_reveal_textARead-only
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.
Inputs: chunk (required), flush, reset, session_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 23 tools
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.
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.
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.
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
Related MCP Connectors
Detect and redact PII and secrets (API keys, tokens) in text, HTML or PDF before it reaches an LLM.
Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.
Find and redact leaked secrets, wallet keys and PII before an AI agent sends text.
Detects and redacts PII (emails, phones, SSNs, names, addresses) from text. $0.02/call via x402.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal-first CLI and MCP server for redacting sensitive text before sharing logs, configs, and errors with AI tools.MIT
- FlicenseAqualityBmaintenancePII sanitization layer for autonomous AI agent pipelines. Detects and redacts emails, phone numbers, national IDs, private keys, and financial data before text reaches LLMs. Supports EN, ES (LATAM), PT (BR/PT), DE, JA.12-
- AlicenseAqualityDmaintenanceScans prompts for PII and masks or redacts sensitive data locally before sending to an LLM, supporting multiple anonymization modes.1MIT
- AlicenseBqualityBmaintenanceEnables local, in-memory de-identification of PII, PHI, and credentials with deterministic reversible surrogate tokens before LLM transmission, then restores originals from volatile session mappings and audits for exposures without network egress or disk writes.5115 npm1Apache 2.0