ztds-mcp
You can use it as a local zero-egress privacy firewall for AI text, handling sanitization, restoration, auditing, and session cleanup.
Sanitize sensitive PII and secrets in prompt text into reversible surrogate tokens before LLM use.
Restore original cleartext values from local in-memory token mappings in LLM-generated output.
Audit text for PII/credential exposure and generate an attestation receipt with risk information.
Retrieve ZTDS RFC v1.0, IETF specification details, and enterprise upgrade guidance.
Reset and zeroize volatile token mappings for a specific session or all sessions.
Provides configuration for Windsurf/Codeium MCP clients, enabling the ZTDS local security firewall to intercept and sanitize sensitive data inside the IDE.
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., "@ztds-mcp Mask the PII in this support ticket before sending it to the LLM."
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.
ZTDS MCP Server (ztds-mcp)
Local Security Firewall for AI Agents & IDEs (Cursor, Claude Code, Windsurf)
Open-source reference implementation of the Zero-Trust Data Sanitization (ZTDS) protocol for the Model Context Protocol (MCP) ecosystem. Conforms to the open architectural specification RFC v1.0 and IETF Standards Track sibiryakov-ztds-protocol.
Runs 100% locally in device volatile memory (RAM) with zero network calls, zero external subprocessors, zero disk writes, and zero telemetry.
1-Click Quickstart (Automated Setup)
Auto-configure your installed AI IDEs and clients with a single command:
npx ztds-mcp initThe configurator automatically:
Detects installed clients: Cursor IDE, Claude Desktop, and Windsurf.
Creates or safely merges the
ztdsserver block into their local configuration files.Executes an in-memory cryptographic self-test to verify zero-leakage tokenization.
To verify existing client configurations:
npx ztds-mcp statusRelated MCP server: privacy-gateway-mcp
Standalone CLI Pre-Execution Auditor
Audit sensitive files, configuration directories, or CI/CD pipelines for credential leakage prior to AI agent ingestion:
# Scan a single sensitive file
npx ztds-mcp audit .env
# Scan an entire repository/source directory
npx ztds-mcp audit ./src
# Machine-readable JSON output for CI/CD gates (exits 1 on violation)
npx ztds-mcp audit --jsonOutputs line-by-line category breakdowns, risk assessment, and cryptographic SHA-256 attestation receipts.
Why AI IDEs Leak Data & How ZTDS Stops It
Autonomous agents in modern IDEs (Cursor, Claude Code, Windsurf) routinely index repository files, including .env secrets, database credentials, production logs, customer emails, and API keys. When an agent crafts a prompt or calls a tool, these sensitive strings are transmitted in cleartext across the internet to frontier LLM APIs.
ZTDS MCP acts as an in-memory local security firewall:
Intercepts: Tools and prompt text are evaluated inside client RAM prior to transmission.
De-identifies: Real credentials and PII are replaced with bijective, context-preserving synthetic tokens (
[API_SECRET_TOKEN_1],[EMAIL_TOKEN_1]).Restores: When the model returns code or instructions containing synthetic tokens, the local MCP server re-maps the cleartext back into the IDE response.
Zero Egress: Real private keys and customer data never touch the network unmasked.
The 4 Core Protocol Invariants
Invariant 1: Zero External Egress Prior to Sanitization
Cleartext PII, PHI, and credentials never cross the local execution boundary unmasked.Invariant 2: Deterministic Context-Preserving Reversible Tokenization
Sensitive values are replaced by synthetic tokens maintaining syntactic and semantic context for LLMs.Invariant 3: Verifiable Ephemeral RAM Isolation (Theorem 2 Zeroization)
Mapping tables exist strictly in volatile memory and are zeroized upon session termination.Invariant 4: Subprocessor Chain Exclusion
Operates strictly as a local computational utility under GDPR Recital 26, rendering Data Processing Agreements (DPAs) unnecessary.
Manual Client Configuration
If you prefer configuring your clients manually without npx ztds-mcp init:
1. Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ztds": {
"command": "npx",
"args": ["-y", "ztds-mcp"]
}
}
}Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
2. Cursor IDE
Add to .cursor/mcp.json in your workspace root:
{
"mcpServers": {
"ztds": {
"command": "npx",
"args": ["-y", "ztds-mcp"]
}
}
}3. Windsurf / Codeium
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"ztds": {
"command": "npx",
"args": ["-y", "ztds-mcp"]
}
}
}Available MCP Tools, Resources & Prompts
MCP Tools (tools/list & tools/call)
Tool | Input Schema | Description |
|
| Masks sensitive PII/credentials with deterministic surrogate tokens prior to LLM transmission. |
|
| Restores original cleartext from volatile in-memory mapping into LLM output. |
|
| Scans text for exposed credentials and PII, returning SHA-256 integrity receipt and risk score. |
|
| Retrieves RFC v1.0 standard details, academic citations, and enterprise documentation. |
|
| Purges and zeroizes all volatile session token mappings (Theorem 2). |
MCP Resources (resources/list & resources/read)
Resource URI | MIME Type | Description |
|
| Formal ZTDS RFC v1.0 / IETF |
|
| Real-time volatile RAM session count and zero-egress attestation status. |
MCP Prompts (prompts/list & prompts/get)
Prompt | Arguments | Description |
|
| Activates the ZTDS Zero-Trust Data Sanitization guardrail in Claude or Cursor. |
Certified Commercial Reference Implementation (PrivacyScrubber)
ZTDS is an open, vendor-neutral standard. The open-source ztds-mcp package serves as the reference implementation covering universal baseline entities (Email, Phone, SSN, Credit Cards, IPv4, IBAN, API Secrets).
For production enterprise workloads requiring continuous regulatory compliance and air-gapped guarantees, PrivacyScrubber is the pioneer certified implementation offering:
30 Specialized Industry Profiles: HIPAA PHI (18 identifiers), PCI-DSS 4.0, GLBA Financial, SEC 17a-4, CJIS Law Enforcement, FERPA Student Records, Defense ITAR/CMMC, FRE-502 Legal Work-Product.
Agentic Guard Automation: Autonomous zero-trust tool wrappers (
guard_exec,guard_read_file,guard_apply_patch).Air-Gapped Node Licensing: Disconnected Ed25519 cryptographic tokens without cloud telemetry.
Headless SDK: Backend RAG pipeline redaction for Node.js / TypeScript / Python (
@privacyscrubber/sdk).SOC 2 Type II Evidence Binder: Automated audit artifacts (
ztds-evidence-binder.json) for Drata, Vanta, and AuditBoard.
Deploy the commercial implementation:
# Production MCP Server
npm install -g @privacyscrubber/mcp-server
# Headless Backend SDK
npm install @privacyscrubber/sdkWebsite: https://privacyscrubber.com
Verification & Self-Test
To run the offline test suite:
node test.jsConforms to standard JSON-RPC 2.0 stdio protocol. Zero runtime dependencies.
License
Apache-2.0. Maintained by the ZTDS AI Consortium (Working Group WG-1).
Website: https://ztds.ai
Lead Architect: Ilya Sibiryakov (Author of ZTDS RFC v1.0, IETF Standards Track sibiryakov-ztds-protocol, U.S. & Int'l Patents Pending).
Available Tools
5 toolsztds_auditC
Audit text for PII/secrets exposure against ZTDS RFC v1.0 standard and generate an attestation receipt.
Inputs: text (required).
ztds_infoB
Retrieve ZTDS open specification details (RFC v1.0, IETF Standards Track) and enterprise upgrade guide.
Inputs: no named parameters.
ztds_reset_sessionC
Zeroize and purge volatile in-memory token mappings (Theorem 2 RAM zeroization).
Inputs: sessionId.
ztds_restoreB
Restore authentic cleartext values into LLM-generated output from local in-memory token mapping.
Inputs: text (required), sessionId.
ztds_sanitizeB
Sanitize sensitive PII and secrets in prompt text locally using ZTDS RFC v1.0 zero-egress invariants.
Inputs: text (required), sessionId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct role: specification info, auditing, sanitization, restoration, and session zeroization. Audit vs. sanitize is disambiguated by the attestation receipt focus, and restore vs. reset_session by their opposite data-mapping operations.
All tools use the ztds_ prefix and snake_case, giving a predictable namespace. Minor inconsistency exists because ztds_info is noun-based while most others are verbs, and ztds_reset_session is the only multiword action name.
Five tools is well-scoped for this domain, with each tool earning its place across info, sanitize, audit, restore, and reset operations. There is no obvious redundancy or missing sibling tool at this count.
The surface covers the core lifecycle: read the standard, sanitize text, audit for compliance, restore mappings, and zeroize session data. Minor gaps remain around explicit session/status inspection or policy configuration, but core agent workflows are supported.
Maintenance
Related MCP Connectors
Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.
Detect and redact PII and secrets (API keys, tokens) in text, HTML or PDF before it reaches an LLM.
Find and redact leaked secrets, wallet keys and PII before an AI agent sends text.
Zero-retention GDPR PII redaction gate (IBAN, Tax-ID, HRB, Names) with signed Ed25519 VC.
Related MCP Servers
- AlicenseBqualityBmaintenanceZero-Trust local PII & secrets masking MCP (ZTDS RFC v1.0). Zero server logs. Features: 23 zero-trust tools, 30 industry profiles, offline OCR, RAM-only masking. Run: npx -y @privacyscrubber/mcp-server. Website: https://privacyscrubber.com SDK: https://www.npmjs.com/package/@privacyscrubber/sdk423687 npm3MIT
- AlicenseAqualityBmaintenanceEnables safe interaction with cloud LLMs by redacting sensitive entities into reversible placeholders, enforcing deterministic egress policies with human approval, and rehydrating responses so real data never leaves the process.4MIT
- AlicenseBqualityBmaintenanceEnables local grammar-preserving masking of sensitive content, entities, and code identifiers into synthetic tokens before sending prompts to LLMs, then restores the original text and symbols from responses using session-scoped in-memory mappings.52Apache 2.0
- AlicenseAqualityBmaintenanceZero-dependency in-memory PII airgap & reversible masking proxy for Cloud LLMs (GDPR Art. 32 compliant).44Apache 2.0