MCP Server: IDE Prompt Security Gateway
Zero-Trust Agentic Pipelines: Secure Your IDE Localhost

AI Summary / Key Takeaways
"Defend your codebase against supply chain leaks and autonomous AI agents. The PrivacyScrubber MCP Server runs on your localhost, providing a secure gateway that sanitizes context windows, logs, and files before your IDE sends them to external LLMs. Available for Cursor, Windsurf, and Claude Desktop."
Enterprise-Grade AI Privacy
Add custom redaction rules and priority support with PRO.
The Challenge with AI Data Workflows
Developers using AI-powered IDEs like Cursor often run "codebase-wide analysis" that inadvertently uploads hardcoded API keys, customer emails in test databases, and production log dumps to external LLMs.
How It Works
Install the MCP Server
Run 'npx @privacyscrubber/mcp-server' or add it to your .cursor/mcp.json config. The server starts locally on stdio — no network port, no HTTP, no authentication required.
Call sanitize_file or sanitize_text
Use 'audit_directory_for_pii' to scan an entire codebase for leaked secrets before ingestion. Then call the 'sanitize_file' tool with a file path, or 'sanitize_text' with raw content. The MCP server applies the active detection profile and returns a tokenized version with a session token map.
Reveal with reveal_text
After the AI model processes your tokenized prompt, paste the response into 'reveal_text'. Tokens ([NAME_1], [EMAIL_2]) are restored to original values from the in-memory session map. Zero persistence, zero server.
What Teams Achieve with Local PII Masking
Swipe to read more
Supported Formats & Limitations
Supported Formats
System Limitations
- Requires Node.js runtime for the local MCP server
- Operates via stdio transport (no network ports exposed)
- Designed for developer environments and automated CI/CD staging
MCP Tool Reference
| Tool | Input | Output |
|---|---|---|
| sanitize_text | Plain text string | Tokenized string + token_count |
| sanitize_file | Absolute file path (.txt, .md, .csv, .json, .log, .docx) | Tokenized file content as string |
| reveal_text | Tokenized string containing [TYPE_N] tokens | Original string with tokens restored |
Configuration Reference
Add to .cursor/mcp.json (Cursor) or claude_desktop_config.json (Claude Desktop):
{ "mcpServers": { "privacyscrubber": { "command": "npx", "args": ["-y", "@privacyscrubber/mcp-server"], "env": { "PS_PROFILE": "general", "PS_TIER": "pro" } } }
}For browser-based IDE-adjacent workflows, see the Universal Scrub feature (right-click on any selected text) or the Chrome Extension for in-page scrubbing inside web-based IDEs.
Feature Reliability & Audit
This enterprise feature is powered by our Local-First Sanitization Engine. Unlike legacy cloud DLP tools, PrivacyScrubber processes your MCP Server: IDE Prompt Security Gateway logic 100% within your browser's V8 sandbox. This architectural decision ensures that even the most complex detection patterns never expose raw data to an external API.
Airplane Mode
Verified feature operational integrity without network connectivity.
Step-by-Step Guide
How to use this feature
Add to mcp.json
In Cursor: open .cursor/mcp.json → add { "name": "privacyscrubber", "command": "npx", "args": ["-y", "@privacyscrubber/mcp-server"] }. Restart Cursor.
Open any file
In your IDE, open a file containing sensitive data (code with API keys, config files, CSV exports, logs, DOCX transcripts).
Call sanitize_file
Ask your AI agent: 'Scrub PII from this file using PrivacyScrubber'. The agent calls the MCP tool automatically with the file path.
Review tokenized output
The tool returns a clean version with [NAME_1], [API_KEY_1], etc. replacing sensitive values. Token map is held in RAM for the session.
Reveal after AI response
After the AI returns its analysis or suggestion, call reveal_text on the response to restore original values for your records.
Frequently Asked Questions
Which IDEs and AI agents are supported?
Any MCP-compatible client: Cursor, Claude Desktop, VS Code with Copilot (via MCP extension), Windsurf, Continue.dev, and any agent framework implementing the Model Context Protocol specification. The server communicates over stdio — no HTTP port, no authentication.
What tools does the MCP server expose?
Three tools: (1) sanitize_text — accepts a string, returns tokenized output + session token count. (2) sanitize_file — accepts a file path, reads the file locally, returns tokenized content as string (supports .txt, .md, .csv, .json, .log, .docx). (3) reveal_text — accepts a tokenized string, restores original values from the in-memory session map. Session map is cleared when the MCP server process exits.
Does the MCP server send any data to external APIs?
Zero. The entire processing pipeline runs in the local Node.js process. No HTTP requests are made during sanitize_text, sanitize_file, or reveal_text operations. The session map is held in process RAM and cleared on exit. This is a ZTDS-compliant tool call — verifiable by inspecting the source code on npm.
Does the MCP server support industry-specific detection profiles?
Yes. PRO users can set the active profile (Legal, Finance, Medical, HR, DevOps, Security, etc.) via a tool parameter or server config. Free tier uses the General PII profile covering names, emails, phone numbers, and common identifiers. PRO unlocks all 22+ profiles including API key detection, IBAN masking, and medical PHI extraction.
How do I verify the MCP server is processing locally?
Run the server with the --verbose flag: 'npx @privacyscrubber/mcp-server --verbose'. All tool calls are logged to stderr with input byte counts and output token counts. No URLs, no external hostnames appear in the logs — confirming purely local execution.
Can I push custom rules to my engineering team's IDEs?
Yes. With the TEAMS tier, admins can use Centralized Rule Sync to push custom regex rules (e.g., internal API token formats or proprietary IDs) directly to their developers' PII MCP Servers. This ensures consistent 'Team-Synced IDE MCP' protection across your entire engineering department.
Protect Your Team's AI Prompts in Under 30 Seconds
Protect My TeamNo server uploads. Works 100% offline in browser RAM.
