Skip to main content
Glama
moxno

privacyscrubber-mcp

by moxno

@privacyscrubber/mcp-server

NPM Version NPM Downloads License: MIT DOI OSF DOI SSRN Cursor Directory Glama.ai Security: 100% Local Parity: 100% Core Match

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-clients

2. 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.json

  • Windows: %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

  1. Navigate to Settings -> Features -> MCP.

  2. Add new MCP server:

    • Name: privacyscrubber

    • Type: command

    • Command: npx -y @privacyscrubber/mcp-server

  3. Optional: Set PRIVACYSCRUBBER_KEY as 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?

📄 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

  1. Go to Settings → Features → MCP Servers.

  2. Find privacyscrubber and click Edit.

  3. Add the environment variable: PRIVACYSCRUBBER_KEY=YOUR_LICENSE_KEY_HERE.

  4. 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 MCP

The 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

10.5281/zenodo.22058770

Zero-Trust Data Sanitization (ZTDS) Protocol Foundation

Cross-Border AI Privacy, ISO 27001 A.8.11

OSF (Center for Open Science)

10.17605/OSF.IO/5BYJF

Empirical Latency Benchmark & Memory Profiling (<2ms RAM)

Performance vs Cloud DLP Proxies

SSRN / Elsevier

SSRN ID: 7335581

Enterprise Generative AI Governance

EU AI Act, UK GDPR, US State Privacy

medRxiv (Cold Spring Harbor)

MEDRXIV/2026/361661

Multi-Center Clinical Trial De-Identification

HIPAA Safe Harbor Section 164.514(b)

Law Archive / OSF

LawArchive ID: 4wc86

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 tools
reveal_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe AI generated response containing placeholders to restore.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYesThe detokenized text with original values restored.

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNoThe 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_pathYesAbsolute path to the file to sanitize.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYesThe sanitized content of the file.

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe raw text, code, or logs to sanitize.
profileNoThe 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

ParametersJSON Schema
NameRequiredDescription
textYesThe sanitized text output.

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 3 tool updatesv1.0.2
    • Changedreveal_text1 field changed
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "text": {
        +      "description": "The detokenized text with original values restored.",
        +      "type": "string"
        +    }
        +  },
        +  "required": [
        +    "text"
        +  ],
        +  "type": "object"
        +}
    • Changedsanitize_file4 fields changed
      • removedInput schema / properties / filePath
        Removed value: -{
        -  "description": "Absolute path to the file to sanitize.",
        -  "type": "string"
        -}
      • addedInput schema / properties / file_path
        Added value: +{
        +  "description": "Absolute path to the file to sanitize.",
        +  "type": "string"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "filePath"
        -]New value: +[
        +  "file_path"
        +]
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "text": {
        +      "description": "The sanitized content of the file.",
        +      "type": "string"
        +    }
        +  },
        +  "required": [
        +    "text"
        +  ],
        +  "type": "object"
        +}
    • Changedsanitize_text1 field changed
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "text": {
        +      "description": "The sanitized text output.",
        +      "type": "string"
        +    }
        +  },
        +  "required": [
        +    "text"
        +  ],
        +  "type": "object"
        +}
  2. 3 tool updatesv1.0.1
    • First observedreveal_text
    • First observedsanitize_file
    • First observedsanitize_text

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: sanitizing text, sanitizing files, and reversing the sanitization. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (reveal_text, sanitize_file, sanitize_text).

Tool Count4/5

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.

Completeness4/5

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

ActivityActive
ResponsivenessNo issues

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

Related MCP Servers