Zero-Trust Local PII MCP Server
Stop sending sensitive corporate databases, API keys, and private code to the cloud. Deploy a local PII MCP server that automatically masks data "on the fly" directly on your developers' machines before the context ever reaches OpenAI Codex, ChatGPT Desktop, Cursor, Claude Desktop, or Windsurf. Full compliance with zero data leaks.
Enterprise DLP: Your Code Never Touches Our Network
PrivacyScrubber MCP is built from the ground up for zero-friction developer integration and absolute enterprise compliance.
Auto-Profile Switching
The PII MCP reads all 23 custom profiles from tool schemas. Based on your prompt (e.g. database query, medical log), it automatically applies the correct specialized ruleset.
Custom Local Rules
Declare proprietary database ID structures, custom ticket patterns, and internal company naming formats in a local privacyscrubber.json config file.
Offline Validation
License verification is performed 100% locally using RSA signatures. Trial expirations are verified locally against your system clock. Zero data is sent to external APIs.
IDE & SDK Ready
Connects out of the box with OpenAI Codex / ChatGPT Desktop, Claude Desktop, Cursor IDE, Windsurf, or custom developer pipelines like the Antigravity SDK using a single-line command.
Automated Directory Audits & Action/Redact
Don't just detect leaks — fix them. With the Action/Redact tool, your AI agent can physically rewrite files on your local disk, replacing API keys and PII with safe tokens ([EMAIL_1]) while automatically generating .bak backups. Requires a TEAMS or ENTERPRISE subscription for cryptographic rule synchronization across your organization.
The Action/Redact Tool
Don't just mask data in transit. Empower your local AI agent to physically rewrite files, remove secrets, and generate safe backups directly on your disk.
How to Trigger in Cursor / Claude
Because the PII MCP server natively registers the redact_file and audit_directory_for_pii tools, triggering an automated scrub is as simple as asking your AI assistant in plain English.
- Zero Configuration: The LLM understands the schema automatically.
- Safe Execution: Original files are preserved with a
.bakextension. - 100% Local: The actual redaction happens on your CPU via the PrivacyScrubber regex engine.
Role-Based Use Cases
DevOps / SRE
Scrubbing Terraform .tf files or CI/CD pipelines of hardcoded AWS, GCP, and Stripe API keys before pushing to a shared repository.
Data Science
Anonymizing raw .csv and .jsonl datasets containing PII before running them through Jupyter Notebooks or Claude Data Analysis.
QA Engineering
Sanitizing production database dumps (.sql) to instantly generate safe, realistic staging environments for testing without exposing real user data.
Security / CISO
Executing automated nightly sweeps across monolithic codebases to catch and redact secrets accidentally committed by junior developers.
Industry-Specific Applications
Healthcare
Stripping PHI (Patient Names, SSNs, Medical IDs) from clinical trial datasets locally before using an LLM to summarize the trial results or extract insights.
Finance
Redacting credit card numbers, SWIFT codes, and IBANs from transaction logs before asking Cursor to write a custom parser for those logs.
LegalTech
Masking client names, addresses, and case numbers in legal briefs before uploading them to an AI contract analyzer for summarization.
How It Works: Zero-Trust Local Processing
The PrivacyScrubber PII MCP server acts as a local security gateway between your IDE (Cursor, Claude, Windsurf) and external LLM endpoints.
Local Interception
Your prompt, file attachments, or codebase files are intercepted on your machine before they are sent to the AI.
Zero-Trust Masking
Identified PII and secrets are instantly replaced with tokens like [EMAIL_1]. The original data remains strictly inside your local RAM.
Sanitized Inference
The remote LLM processes only secure tokens. There is zero risk of downstream data retention or training on proprietary info.
Interactive Reveal
When the AI responds using placeholders, the MCP server automatically swaps tokens back to their original values inside the IDE.
DevSecOps Directory Audit Engine
The same core engine that powers the PrivacyScrubber PII MCP server is natively embedded into our Web Dashboard. Perform 100% offline, zero-server repository scans directly from your browser to proactively detect hardcoded API keys before they leak to AI tools.
- Secret & IP Detection: Hardcoded rules catch AWS Credentials (AKIA...), JSON Web Tokens (JWT), Cryptographic Private Keys, and Intellectual Property leaks (e.g. Proprietary/Trade Secret headers) in your source code.
- Zero-Trust Architecture: Using the modern File System Access API, your repository files are read directly into browser memory. No data is ever uploaded to a server.
- Actionable Audit Reports: Generate instant security summaries showing exactly which files contain leaked secrets before you commit code or grant AI workspace access.
PII MCP Server — Model Context Protocol Tool Reference
These tools are automatically declared to your AI client (Cursor, Windsurf, Claude) upon starting the PrivacyScrubber server.
| Tool Name | Parameters | Function & Description | Tier |
|---|---|---|---|
| sanitize_text | text: string, profile?: string | Scrubs PII and API keys from prompt text or code. Supports 22 custom industry profiles (e.g. 'Dev', 'Medical', 'Legal'). | FREE / PRO |
| reveal_text | text: string | Swaps masked [TOKEN_N] labels back to their original values inside the AI's response using the local session map. | FREE / PRO |
| sanitize_file | file_path: string, profile?: string | Reads a file path from your workspace, sanitizes it locally, and feeds the sanitized data to the AI agent. | PRO / TEAMS |
| create_default_config | None | Creates a default configurations file (privacyscrubber.json) in the active workspace root directory. | PRO / TEAMS |
| check_status | None | Returns current PrivacyScrubber tier status, request usage counts, and lists active custom rules. | FREE / PRO |
Workspace Custom Rules
Declare proprietary database structures, internal project identifiers, or custom security profiles locally. Create a privacyscrubber.json file at the root of your project or home folder. The local server automatically loads and merges these rules.
Regex Collision Prevention
Rules are sorted by length descending automatically to prevent token collision.
Exclusion Lists
Define safe terms (e.g. localhost, system keywords) that must never be redacted.
{ "customRules": [ { "pattern": "\\\\b[A-Z]{3}-\\\\d{4}-\\\\d{2}\\\\b", "label": "INTERNAL_DB_ID", "enabled": true } ], "exclusions": [ "localhost", "main_production_db", "PrivacyScrubber" ]
}Hardening AI Coding Workflows
Address data leakage risks in Cursor IDE, Claude Desktop, and terminal agents without breaking code syntax or development velocity.
Automated Token Rehydration
Instruct the AI client to automatically run the reveal_text tool as its last step. Add this instruction to your system prompt presets so original values (e.g. database keys, emails) are automatically restored in the editor viewport:
Zero-Frustration Code Auditing
Security regexes can sometimes redact programming syntax, breaking build compiles. PrivacyScrubber's default template automatically excludes standard developer keywords from sanitization, keeping code fully functional:
process.env.*and environment hookslocalhostand127.0.0.1addressesnode_modulesdirectory paths- Standard console methods (
console.log)
Terminal Shell Sanitization
If an AI agent (Cursor Agent or Claude Code) executes terminal command lines directly, secrets or user data can leak through stderr/stdout. Wrap any command in our lightweight execution utility to sanitize logs and outputs locally before they display or egress:
Quick Integration Guides
Integrate with Cursor IDE
Configure Cursor to scrub prompt context locally before letting Claude/GPT-4 write your code or analyze workspace files.
- Open Cursor Settings (Gear Icon top right or Ctrl/Cmd + ,).
- Go to Features > MCP.
- Click + Add New MCP Tool.
- Configure the tool settings in the modal:
- Name:
PrivacyScrubber - Type:
command - Command:
npx -y @privacyscrubber/mcp-server
- Name:
PRIVACYSCRUBBER_KEY. Frequently Asked Questions
Find quick answers to common questions about the PrivacyScrubber MCP Server deployment, features, and security architecture.
scrubber-core.cjs) to scan, mask, and redact Personally Identifiable Information (PII) and secret credentials inside volatile RAM. No prompt context or telemetry is ever stored or transmitted over the network. [SECRET_CREDENTIAL_N]) before transmission to Cursor's AI models, ensuring API keys never leave your workspace. reveal_text tool (Reverse Scrubbing). Once the remote LLM responds with placeholders (such as [NAME_1] or [EMAIL_1]), the local IDE or agent pipeline invokes this tool to swap the tokens back to their original values in the local viewport. The lookup dictionary exists purely in-memory and is isolated per-session. privacyscrubber.json in your home directory. The MCP server automatically parses and prioritizes these custom rules descending by length to prevent overlaps. PRIVACYSCRUBBER_KEY passed directly by Claude Desktop, Cursor, or ChatGPT Desktop. This keeps your credentials safe from local configuration sniffing or plaintext leakage in local JSON configuration files. 