Local AI Security

Zero-Trust Local PII MCP Serverfor Cursor, Claude Desktop, Windsurf & AI Coding Agents

Deploy a local PII MCP server that masks corporate databases, API keys, and private source code in volatile device RAM in under 1ms before context reaches Cursor, Claude Desktop, OpenAI Codex, or Windsurf, supporting GDPR Art. 32, HIPAA Safe Harbor, and SOC 2 technical safeguards with zero cloud data egress.

Free with Quota · Test in 30s · Zero Config · 100% Local stdio
Terminal (Offline)
# 1-Click auto-detect & configure all installed AI IDEs (Cursor, Claude, VS Code, Zed)
$npx -y @privacyscrubber/mcp-server install --all
> [Auto-Detect] Scanning for Cursor, Claude Desktop, Claude Code, VS Code, Zed, Windsurf...
> [Configured] Injected ZTDS™ privacyscrubber MCP server safely into client configs
> [Done] Ready! Restart your IDE to start scrubbing prompts in local RAM
Air-Gapped Local Stdio • 0 Phone-Home Pings • Safe Non-Destructive Config Merge

Quick IDE Integration Guides

Universal 1-Click Auto-Installer

Automatically discovers installed AI IDEs on your machine (Cursor, Claude Desktop, Claude Code, VS Code, Zed, Windsurf, Cline) and injects the Zero-Trust MCP configuration without overwriting or corrupting existing tools.

$npx -y @privacyscrubber/mcp-server install --all
Pro Tip: Pass your commercial key as an env var: PRIVACYSCRUBBER_KEY=your_key npx ...

Enterprise DLP: Your Code Never Touches Our Network

PrivacyScrubber MCP is built from the ground up for zero-friction developer integration and absolute enterprise regulatory compliance.

Auto-Profile Switching

The PII MCP reads all 30 specialized industry profiles from tool schemas. Based on your prompt (e.g. database query, medical log), it automatically applies the correct specialized ruleset.

30 Sector ProfilesAuto-Detected

Custom Local Rules

Declare proprietary database ID structures, custom ticket patterns, and internal company naming formats in a local privacyscrubber.json config file.

privacyscrubber.jsonCollision-Safe

Offline Validation

License verification is performed 100% locally using cryptographic signatures. Session quotas and license tiers are verified locally in-process. Zero data is sent to external APIs.

Ed25519 Signature0 API Calls

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.

10+ AI ClientsStdio Native
Unit 42 78.3% Cascading Trust & Proxy Comparison

Why Engineering & CISO Teams Choose In-RAM Stdio Over Cloud MCP Proxies (Strac)

Palo Alto Networks Unit 42 measured a 78.3% attack success rate across five connected MCP servers as poisoned tool outputs cascade into downstream calls. Cloud reverse-proxy connectors (such as Strac or webhook DLP gateways) receive unmasked cleartext on vendor servers, require new GDPR Art. 28 DPAs and HIPAA BAAs, and cannot inspect local desktop stdio pipes. PrivacyScrubber sanitizes payloads inside workstation RAM (<1ms, 0 cloud subprocessors) across Cursor, Claude Cowork, VS Code, and Linux Foundation AAIF stacks (MCP, goose, A2A) so exfiltration paths carry only [API_KEY_1] surrogates.

TEAMSENTERPRISE

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.

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. This zero-trust data sanitization architecture ensures no sensitive data ever leaves your machine.

1

Local Interception

Your prompt, file attachments, or codebase files are intercepted on your machine before they are sent to the AI.

stdio Transport
2

Zero-Trust Masking

Identified PII and secrets are instantly replaced with tokens like [EMAIL_1]. The original data remains strictly inside your local RAM.

<1ms Local RAM
3

Sanitized Inference

The remote LLM receives surrogate tokens rather than raw direct identifiers, materially reducing downstream data retention and model-training exposure.

0 Raw PII Egress
4

Interactive Reveal

When the AI responds using placeholders, the MCP server automatically swaps tokens back to their original values inside the IDE.

reveal_text Restore
Deep Dive

The Action/Redact Tool

Don't just mask data in transit. Enable 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 .bak extension.
  • 100% Local: The actual redaction happens on your CPU via the PrivacyScrubber ZTDS™ engine.
"Audit my `./config/` directory and redact any hardcoded AWS keys or database passwords."
Tool Used: audit_directory_for_pii
Found 3 files with secrets. Replaced with [SECRET_KEY_1]. Original files backed up as .bak.
Role-Based & Industry-Specific Use Cases (DevOps, Data Science, Healthcare, Finance, Legal)Expand to explore how SREs, QA teams, and regulated verticals automate disk-level secret redaction
Expand

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.

.tf / .envredact_file

Data Science

Anonymizing raw .csv and .jsonl datasets containing PII before running them through Jupyter Notebooks or Claude Data Analysis.

.csv / .jsonlsanitize_file

QA Engineering

Sanitizing production database dumps (.sql) to instantly generate safe, realistic staging environments for testing without exposing real user data.

.sql Dumpsredact_file

Security / CISO

Executing automated nightly sweeps across monolithic codebases to catch and redact secrets accidentally committed by junior developers.

Repo Sweepaudit_directory_for_pii

Industry-Specific Applications

HIPAA Compliance

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.

--profile medical18 PHI Identifiers
PCI-DSS Standard

Finance

Redacting credit card numbers, SWIFT codes, and IBANs from transaction logs before asking Cursor to write a custom parser for those logs.

--profile financePCI PAN & IBAN
Client Confidentiality

LegalTech

Masking client names, addresses, and case numbers in legal briefs before uploading them to an AI contract analyzer for summarization.

--profile legalPrivilege Guard
Secure Workspace Integration

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. Learn how this integrates with automated log sanitization workflows and GDPR/CCPA compliance requirements.

  • 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.
Audit Results Preview
src/config/.env.local1 Leak
AWS Credentials Detected
api/middleware/auth.ts2 Leaks
JSON Web Token (JWT) Detected

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.

Core Tool NameParametersFunction & DescriptionTier
sanitize_texttext: string,
profile?: string
Scrubs PII and API keys from prompt text or code. Supports 30 specialized industry profiles (e.g. 'Dev', 'Medical', 'Legal').FREE / PRO
reveal_texttext: stringSwaps masked [TOKEN_N] labels back to their original values inside the AI's response using the local session map.FREE / PRO
sanitize_filefile_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
guard_execcommand: string,
cwd?: string,
profile?: string
Executes terminal commands in a child process, intercepts stdout/stderr, and redacts secrets line-by-line in volatile RAM before the AI agent receives the output.FREE / PRO
guard_read_filefile_path: string,
profile?: string
Reads sensitive files (.env, configs, credentials) with in-RAM sanitization, token count, and CISO audit telemetry markdown.FREE / PRO
View All 10 Extended Governance, Git Diff & Compliance Toolsguard_git_diff · guard_apply_patch · generate_compliance_report · create_agent_rules · secure_ai_workflow + 5 more
Show All Tools
Extended Tool NameParametersFunction & DescriptionTier
create_default_configNoneCreates a default configurations file (privacyscrubber.json) in the active workspace root directory.PRO / TEAMS
check_statusNoneReturns current PrivacyScrubber tier status, request usage counts, and lists active custom rules.FREE / PRO
generate_compliance_reporttext: string,
framework?: string
Generates a compliance audit report mapping detected PII entities to regulatory frameworks (GDPR, HIPAA, SOC 2, PCI DSS, NIST). Outputs risk levels and remediation guidance.PRO / TEAMS
mark_false_positivetoken: string,
original: string
Marks a specific detection as a false positive so future sanitization runs skip it. Stored locally in the session exclusion list—never transmitted to any server.FREE / PRO
secure_ai_workflowtext: string,
profile?: string
End-to-end workflow tool: sanitizes input, sends to the AI, receives the response, and auto-reveals masked tokens in a single call. Ideal for automated DevSecOps pipelines.PRO / TEAMS
safe_redaction_workflowtext: stringCombines sanitization with an interactive confirmation step, allowing the developer to review and approve each redaction before committing. Designed for security-critical environments requiring human-in-the-loop verification.PRO / TEAMS
guard_git_diffstaged?: boolean,
profile?: string
Inspects git repository changes (staged or unstaged) with automated secrets redaction before transmitting code review to remote LLMs.FREE / PRO
guard_apply_patchfile_path: string,
content: string,
create_backup?: boolean
Writes code updates to disk, automatically rehydrating token placeholders back to authentic local secrets in RAM with safety backup (.bak).PRO / TEAMS
create_agent_rulesagent_types?: string[]Automatically generates and injects ZTDS security directives into .cursorrules, .windsurfrules, CLAUDE.md, and Copilot configs.FREE / PRO
generate_procurement_memotargetTier?: string,
teamSize?: number,
primaryFramework?: string
Generates an institutional CISO & DPO procurement memorandum, regulatory risk assessment (GDPR, HIPAA, SOC 2, PCI DSS), and ROI business case for commercial licensing.PRO / TEAMS
Autonomous Agent Firewall

Zero-Trust Agentic Guard: Protect Autonomous AI Agents

Autonomous coding agents (Cursor, Windsurf, Claude Code, GitHub Copilot) run terminal commands and read repository files on your behalf. PrivacyScrubber Agentic Guard forms an in-memory barrier, sanitizing CLI output and credentials before they hit cloud models.

CLI Output Interception

Replace raw shell runs with guard_exec or CLI wrapper ps-guard. Output is scrubbed line-by-line in volatile RAM.

cat .env | npx -y -p @privacyscrubber/mcp-server ps-guard --profile dev

Git Diff Sanitization

Inspect staged changes before commit reviews. Staged passwords, tokens, and proprietary keys are tokenized in RAM without polluting git state.

npx -y -p @privacyscrubber/mcp-server ps-guard --diff --staged

1-Click Agent Rule Injection

Instantly deploy Zero-Trust mandates to .cursorrules, .windsurfrules, CLAUDE.md, and .clinerules.

npx -y -p @privacyscrubber/mcp-server ps-guard --rules
3 Real-World AI Disasters PrivacyScrubber Stops Before They Happen1. The .env Secret Leak • 2. Dirty Terminal Error Dump • 3. Unchecked git diff Leak
Inspect Scenarios
Scenario 1 File Inspection

The .env Secret Leak

What Goes Wrong

You ask Cursor or Claude Code: "Add Stripe webhooks and test DB connection." The agent scans files, opens .env, and passes your live STRIPE_SECRET_KEY and DATABASE_URL directly into the prompt to external AI servers.

How PrivacyScrubber Saves You

The agent reads configs via guard_read_file. All live secrets turn into [API_KEY_1] in local RAM. When the agent saves code changes, guard_apply_patch puts real keys back on disk. Remote LLMs never see them.

Scenario 2 Shell Execution

The Dirty Error Log Dump

What Goes Wrong

A migration or test fails. You ask the agent: "Fix this error." The agent runs the command in terminal, and the output dumps an unhandled SQL error containing customer emails, phone numbers, or session tokens right into the AI's context window.

How PrivacyScrubber Saves You

Commands execute through guard_exec (or cat file | ps-guard). All terminal output is filtered in RAM in <1ms. The AI sees the stack trace to fix the bug, but every email and phone number is safely tokenized.

Scenario 3 Version Control

The Unchecked git diff Leak

What Goes Wrong

During rapid debugging, you temporarily pasted an API key into a test file. You ask the agent: "Generate a commit message from git diff." The agent sends the raw diff to the cloud model, exposing the temporary secret before you even commit.

How PrivacyScrubber Saves You

The agent reviews changes through guard_git_diff (or ps-guard --diff). Any staged or unstaged secrets are instantly masked in memory. The agent writes a clean commit message and alerts you to the leaked token.

Workspace Custom Rules (privacyscrubber.json) & AI Coding Workflow Hardening

Regex collision prevention, safe syntax exclusions (process.env.*, localhost), and automated token rehydration
Configure

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.

// privacyscrubber.json example
{
  "customRules": [
    {
      "pattern": "\\\\b[A-Z]{3}-\\\\d{4}-\\\\d{2}\\\\b",
      "label": "INTERNAL_DB_ID",
      "enabled": true
    }
  ],
  "exclusions": [
    "localhost",
    "main_production_db",
    "PrivacyScrubber"
  ]
}

Automated Token Rehydration

Instruct the AI client to automatically run the reveal_text tool as its last step:

"At the end of your response, if you used any masked placeholders like [EMAIL_1], you must call the reveal_text tool to restore them before displaying the code."
System Promptreveal_text Hook

Zero-Frustration Code Auditing

Default template automatically excludes standard developer keywords from sanitization:

  • process.env.* and environment hooks
  • localhost and 127.0.0.1 addresses
  • node_modules directory paths
  • Standard console methods (console.log)
Syntax Safe0 False Positives

Terminal Shell Sanitization

Wrap any command in our lightweight execution utility to sanitize logs and outputs locally before they display or egress:

npx pii-masking-run -- npm run dev
stdout / stderrStream Redacted
Agent-Led Growth (ALG) · SKILL.md Catalog

Drop-In Agent Skills (SKILL.md) for Claude Code, Cursor & Antigravity

Paste these zero-egress SKILL.md specifications into ~/.claude/skills/, .cursor/rules/, or ~/.gemini/config/skills/ so your AI coding agents automatically sanitize secrets, customer PII, and RAG payloads in local RAM.

SKILL 01 · IDE MCPFree / TEAMS $99/mo

privacyscrubber-mcp-guard/SKILL.md

Enforces pre-call file, shell, and diff sanitization via @privacyscrubber/mcp-server with automatic local token rehydration.

---
name: privacyscrubber-mcp-guard
description: Enforce zero-egress in-RAM PII and secret sanitization via @privacyscrubber/mcp-server.
---
# PrivacyScrubber MCP Guard Skill
1. Read sensitive files via `guard_read_file` and inspect diffs via `guard_git_diff`.
2. Execute shell commands that may log customer PII or tokens via `guard_exec`.
3. Call `reveal_text` locally as the final step to restore `[EMAIL_1]` / `[API_KEY_1]` placeholders.
SKILL 02 · NODE / WASM SDK$299/mo SDK

privacyscrubber-sdk-rag/SKILL.md

Instructs coding agents to wrap OpenAI, Anthropic, Gemini, and RAG vector pipelines with @privacyscrubber/sdk in <1ms local RAM.

---
name: privacyscrubber-sdk-rag
description: Wrap LLM API calls and RAG vector embeddings with @privacyscrubber/sdk in local RAM.
---
# PrivacyScrubber Headless SDK & RAG Skill
1. Install `@privacyscrubber/sdk` for Node.js, TypeScript, or Edge/WASM pipelines.
2. Call `scrubber.sanitize(payload, { profile })` before any OpenAI/Anthropic/Gemini request or vector DB upsert.
3. Rehydrate model completions locally via `scrubber.reveal(completion, tokenMap)` with 0 bytes cloud egress.
Get SDK ($299/mo) →
SKILL 03 · CISO AUDITSHA-256 Receipt

ciso-compliance-audit/SKILL.md

Automates pre-commit PII scanning and generates cryptographic SHA-256 compliance receipts for SOC 2 Type II, HIPAA Safe Harbor, and GDPR Art. 32.

---
name: ciso-compliance-audit
description: Run zero-egress static PII/secret audits and emit SHA-256 compliance receipts.
---
# CISO Zero-Egress Compliance Audit Skill
1. Run `npx ps-guard --diff` and `npx ztds-audit .` before merging pull requests.
2. Block commits containing raw API keys, IBANs, SSNs, or clinical PHI across 30 industry profiles.
3. Attach the generated SHA-256 compliance receipt to SOC 2 / ISO 27001 / GDPR Art. 32 evidence logs.
Enterprise Hub →

Frequently Asked Questions

Find quick answers to common questions about the PrivacyScrubber MCP Server deployment, features, and security architecture.

Does the PrivacyScrubber PII MCP Server support OpenAI Codex, ChatGPT Desktop, and OpenAI Agents?
Yes. PrivacyScrubber PII MCP server connects natively via stdio to ChatGPT Desktop, OpenAI Codex coding workflows in VS Code (via Roo Code, Cline, or Continue.dev), and custom Python/Node OpenAI Agent SDK pipelines. Sensitive API keys, database credentials, and customer PII are sanitized locally in volatile RAM before transmission to GPT-4o, o1, or Codex models.
How does the PrivacyScrubber PII MCP Server ensure 100% zero-trust data protection?
The PrivacyScrubber PII MCP Server runs entirely locally on your workstation. It imports our lightweight, zero-dependency ZTDS™ sanitization engine to scan, mask, and redact Personally Identifiable Information (PII) and secret credentials inside volatile RAM. No prompt context or raw PII is ever stored or transmitted over the network (optional anonymous operational CLI metrics contain zero PII and can be disabled via PRIVACYSCRUBBER_NO_TELEMETRY=1).
Can I use Claude Desktop with this MCP server to prevent HIPAA and GDPR data leaks?
Yes. Out of the box, Claude Desktop sends raw prompts and tool outputs to Anthropic's remote servers, which creates a data exposure risk. By using the local PrivacyScrubber MCP server, customer PII and HIPAA-regulated data are automatically masked locally before transmission, supporting GDPR Art. 32, HIPAA Safe Harbor, and CCPA technical compliance safeguards.
How do I prevent Cursor IDE from sending API keys, database passwords, or credentials to remote LLMs?
The server features a built-in credentials detector that instantly recognizes AWS, Stripe, GitHub, database keys, and other secrets. It replaces them with safe placeholders ([SECRET_CREDENTIAL_N]) before transmission to Cursor's AI models, ensuring API keys never leave your workspace.
Does the PrivacyScrubber PII MCP server support offline use in air-gapped environments?
Yes. In accordance with our Airplane Mode Standard, the server has no external API dependencies for sanitization. Licenses are validated locally using offline cryptographic signature checks against the embedded public key, making it 100% operational in restricted corporate networks or when disconnected from the internet.
How do developers decrypt or restore original values of masked PII tokens in Cursor/Claude?
The MCP server exposes a dedicated 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.
What is the latency or performance overhead when using this MCP server?
Because all parsing and ZTDS™ evaluations are executed locally on your CPU (no network round-trips), prompt processing takes under 15ms—completely imperceptible to developers.
How do I configure custom company-specific detection rules and exclusion lists?
You can declare custom detection patterns, unique database identifiers, or internal project naming schemes in a local config file named privacyscrubber.json in your home directory. The MCP server automatically parses and prioritizes these custom rules descending by length to prevent overlaps.
Where are the credentials and license keys stored for the PrivacyScrubber PII MCP server?
It reads your license key from the secure environment variable 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.
Is the PrivacyScrubber MCP Server free to try and use?
Yes, 100% free with built-in session quota directly in Cursor, Claude Desktop, Windsurf, and VS Code. No credit card or account registration is required for the Free Forever quota (and a 7-day TEAMS corporate pilot is available for evaluation). The free quota covers General PII and all 30 specialized industry profiles. A PRO ($15/mo or $110 Lifetime) or TEAMS license ($99/mo) unlocks unlimited character volume and centralized team policy synchronization.
How does PrivacyScrubber compare to Microsoft Presidio for developer environments?
Microsoft Presidio requires maintaining a 500MB+ Docker container running Python, spaCy, and custom NLP models, introducing 25ms-70ms HTTP hop latency and continuous container patching. PrivacyScrubber provides an air-gapped stdio MCP server for AI IDEs and an isomorphic zero-dependency Node.js/TypeScript SDK (@privacyscrubber/sdk, ~150KB) that executes in <1ms in local RAM with zero network egress, zero Docker overhead, and 1-line OpenAI/LLM client wrapping. For full benchmarks, see our PrivacyScrubber vs Microsoft Presidio Technical Audit.
$299/mo · $2,990/yr

Headless Developer SDK

Sanitize prompts, ETL streams, and RAG vector databases directly in your Node.js or Python backend. 1-line client wrapping, sub-1ms in-memory RAM execution, and 0 bytes cloud egress.

100% Free · In-Browser RAM

In-Browser Chrome Extension

Not using an IDE? Intercept and sanitize sensitive prompts as you type directly inside ChatGPT, Claude, and Gemini web interfaces with zero configuration.