privacyscrubber-mcp
The privacyscrubber-mcp server locally scrubs sensitive data (PII, secrets, credentials) from text and files before it's sent to an LLM, then restores the original data from LLM responses — all with zero data leaving your machine.
Sanitize Text (
sanitize_text): Redacts PII, API keys, passwords, emails, and other credentials from text or code, replacing them with safe placeholders like[EMAIL_1]or[API_KEY_1], with original values kept in local RAM only.Reveal Text (
reveal_text): Detokenizes masked LLM responses by swapping placeholders back to their original private values, entirely locally.Sanitize Files (
sanitize_file): Reads local files (plain text, source code, logs, CSV, JSON, Markdown,.docx) and returns a redacted version safe for AI analysis.Industry Detection Profiles: Choose from
General(free) or 22+ PRO profiles — includingDev,Medical,Legal,Finance,HR,Security,CCPA, and more — to tailor detection to your domain.100% Local Processing: All sanitization and token mapping happens in-memory on your machine; no sensitive data is ever transmitted externally.
Client Integration: Designed to integrate with LLM clients like Claude Desktop, Cursor, and Windsurf for seamless prompt masking workflows.
Click on "Install 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-mcpscrub 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.
🔒 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. 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-clients2. Instant Run with NPX
Run the server directly without local installation:
npx -y @privacyscrubber/mcp-server⚙️ 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 / Windsurf
Navigate to Settings -> Features -> MCP.
Add new MCP server:
Name:
privacyscrubberType:
commandCommand:
npx -y @privacyscrubber/mcp-server
Optional: Set
PRIVACYSCRUBBER_KEYas an environment variable in your system shell.
🛠️ 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.
🌐 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 (restricted to 50,000 characters per request and the basic General PII profile). To unlock advanced engineering, medical, legal, and financial PII profiles, as well as team-wide custom rules, you can purchase a commercial license.
Feature Comparison
Feature | Free Tier | PRO Tier | TEAMS Tier |
Volatile Tokenization | ✅ Yes | ✅ Yes | ✅ Yes |
Standard PII Masking | ✅ Yes | ✅ Yes | ✅ Yes |
Max Character Length | 50,000 chars | ♾️ Unlimited | ♾️ Unlimited |
Industry Profiles | General Only | 22+ Profiles | 22+ Profiles |
Custom Regex Rules | ❌ Locked | ♾️ Unlimited | ♾️ Unlimited |
Team Rules Sync (GPO) | ❌ No | ❌ No | ✅ Yes (Shared Link) |
Licensing Cost | $0 | $110 Lifetime | $99/mo Flat Rate |
👉 Acquire a PRO / TEAMS License Key at privacyscrubber.com/pricing
4. 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 v1.6.6 ║ ╠══════════════════════════════════════════════════╣ ║ 🔓 Tier: FREE ║ ║ 📊 Session requests: 5 ║ ║ 📁 Input size limit: 50,000 characters per request║ ╠══════════════════════════════════════════════════╣ ║ 🏷️ Profiles: General only — PRO unlocks 22 more ║ ║ 📋 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/features/mcp/?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server ║ ╚══════════════════════════════════════════════════╝
🔐 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 MCPThe dashboard should show Tier: PRO and all profiles unlocked.
📚 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 |
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)
Available Tools
3 toolsreveal_textA
Replaces masked tokens (e.g., [EMAIL_1], [API_KEY_1]) in the LLM's response back with the original private data from the local volatile RAM-only session map.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The AI generated response containing placeholders to restore. |
Output Schema
| Name | Required | Description |
|---|---|---|
| text | Yes | The detokenized text with original values restored. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It reveals that the tool accesses a 'local volatile RAM-only session map' and performs replacement, but it does not mention authentication requirements, rate limits, side effects on the session map, or error handling for missing tokens. The description adds moderate transparency beyond schema fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 25 words with no redundant information. It is front-loaded with the core action and provides precise details efficiently. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (single parameter, no nested objects, has output schema), the description covers the input, process, and data source adequately. It does not describe the output schema contents or edge cases like missing tokens, but these are not critical due to the existence of an output schema. The description is sufficiently complete for an AI agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for the sole parameter 'text' (description: 'The AI generated response containing placeholders to restore.'). The tool description adds value by specifying the format of placeholders (e.g., [EMAIL_1], [API_KEY_1]) and the source of original data (local volatile RAM-only session map), which enhances understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific verb 'replaces' and identifies the resource: masked tokens like [EMAIL_1], [API_KEY_1] in the LLM's response, using original private data from a local session map. This distinguishes it from sibling tools sanitize_file and sanitize_text, which perform the inverse operation (masking).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used after an LLM response contains masked tokens, but it does not explicitly state when to use it versus the sibling tools, nor does it provide when-not-to-use guidance or prerequisites. The usage context is clear but not formally outlined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sanitize_fileA
Reads a local file, sanitizes its contents using the selected profile, and outputs the safe version for AI analysis. Securely keeps original identifiers in memory.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | The detection profile to use. Available: 'General' (Free), or PRO profiles: 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal'. Defaults to 'General'. | |
| file_path | Yes | Absolute path to the file to sanitize. |
Output Schema
| Name | Required | Description |
|---|---|---|
| text | Yes | The sanitized content of the file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description adds value by stating that original identifiers are securely kept in memory. However, it omits details on read behavior, file modification, error handling, or concurrency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. The first sentence states the core action, and the second adds a critical security detail. Efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with an output schema, the description covers the essential operation. It could mention error conditions or output format, but the presence of an output schema reduces the need. Overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description does not add new parameter meaning beyond what is already in the schema; it only references 'selected profile' without elaboration.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (reads and sanitizes), the resource (local file), and the outcome (outputs safe version for AI analysis). It distinguishes from sibling 'sanitize_text' by specifying file input.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'sanitize_text' or 'reveal_text'. The description lacks context on prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sanitize_textA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The raw text, code, or logs to sanitize. | |
| profile | No | The detection profile to use. Available: 'General' (Free), or PRO profiles: 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal'. Defaults to 'General'. |
Output Schema
| Name | Required | Description |
|---|---|---|
| text | Yes | The sanitized text output. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that scrubbing is local (no data leak) and replaces matches with safe placeholders. It does not detail performance or determinism but provides sufficient behavioral insight.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with zero waste. The first sentence states the action and the second provides a practical recommendation. Front-loaded with essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description need not explain return values. It covers the core purpose and usage context. Could mention that output is also text with placeholders, but not necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both parameters documented. The description adds value by listing all available profiles (e.g., 'Dev', 'Medical') and noting defaults, but this is also partly in the schema's description. Minor extra context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool scrubs PII, secrets, and credentials from text and replaces them with placeholders. It specifies the action is local and differentiates from siblings like 'sanitize_file' (for files) and 'reveal_text' (presumably reverse).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises using the tool before passing data to an LLM to keep data secure. It implies when to use and emphasizes 'Locally' to indicate no data is sent externally, but does not explicitly mention when not to use or name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.2- Changed
reveal_text1 field changed- changed
Output schema / (root)Previous value: -nullNew value: +{ + "properties": { + "text": { + "description": "The detokenized text with original values restored.", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" +}
- Changed
sanitize_file4 fields changed- removed
Input schema / properties / filePathRemoved value: -{ - "description": "Absolute path to the file to sanitize.", - "type": "string" -} - added
Input schema / properties / file_pathAdded value: +{ + "description": "Absolute path to the file to sanitize.", + "type": "string" +} - changed
Input schema / requiredPrevious value: -[ - "filePath" -]New value: +[ + "file_path" +] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "properties": { + "text": { + "description": "The sanitized content of the file.", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" +}
- Changed
sanitize_text1 field changed- changed
Output schema / (root)Previous value: -nullNew value: +{ + "properties": { + "text": { + "description": "The sanitized text output.", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" +}
3 tool updates
v1.0.1- First observed
reveal_text - First observed
sanitize_file - First observed
sanitize_text
TDQS
Scored across 3 tools
Each tool has a distinct purpose: sanitizing text, sanitizing files, and reversing the sanitization. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with underscores (reveal_text, sanitize_file, sanitize_text).
With 3 tools, the server covers the core workflow of sanitization and reversal. Could benefit from an explicit session management tool, but is well-scoped overall.
The set covers sanitization for both text and files, plus the necessary reveal operation. Missing a tool to manage profiles or clear the session, but the core lifecycle is covered.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Detects and redacts PII (emails, phones, SSNs, names, addresses) from text. $0.02/call via x402.
Stateless PII redaction over MCP/REST. Free ≤1000 words or $0.01/call; file upload supported.
Scan configs, files, or text for leaked secrets and obvious misconfigurations. Nothing stored.
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-

classifinder-mcpofficial
AlicenseAqualityBmaintenanceEnables AI agents to scan text for leaked secrets and prompt injection markers, and redact them before reaching an LLM.21MIT- AlicenseAqualityDmaintenanceScans prompts for PII and masks or redacts sensitive data locally before sending to an LLM, supporting multiple anonymization modes.1MIT