Skip to Content
IntegrationsMCP Server

MCP Server

The Expunct MCP server (@pii-redactor/mcp) exposes all redaction capabilities as tools for Claude Code, Claude Desktop, and any MCP-compatible client.

Package: @pii-redactor/mcp on npm

Quick Setup

Add the following to .mcp.json in your project root, or to ~/.claude/.mcp.json for global access:

{ "mcpServers": { "pii-redactor": { "command": "npx", "args": ["@pii-redactor/mcp"], "env": { "PII_REDACTOR_API_KEY": "pk_live_...", "PII_REDACTOR_BASE_URL": "https://api.pii-redactor.dev" } } } }

For Claude Desktop, add the same configuration to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).

Configuration

Environment VariableRequiredDefaultDescription
PII_REDACTOR_API_KEYYesAPI key (pk_live_... or pk_test_...)
PII_REDACTOR_BASE_URLNohttps://api.pii-redactor.devAPI endpoint URL

Available Tools

ToolDescriptionSync
pii_redactor_sanitize_textRedact PII from text (27+ entity types)Yes
pii_redactor_sanitize_fileSubmit file/URI for async redactionNo
pii_redactor_sanitize_batchBatch redact 1-100 URIsNo
pii_redactor_check_statusPoll job progressRead-only
pii_redactor_list_entity_typesList all supported entity typesRead-only
pii_redactor_get_findingsGet detected PII for a completed jobRead-only

Example Usage in Claude Code

> Redact PII from this text: "John Smith lives at 123 Main St" Claude will use pii_redactor_sanitize_text and return: "[PERSON] lives at [ADDRESS]"

For file-based redaction, Claude will automatically use the async workflow — submitting the file with pii_redactor_sanitize_file, then polling with pii_redactor_check_status until the job completes.

Troubleshooting

  • “Tool not found” errors — Make sure the MCP server is running. Check npx @pii-redactor/mcp runs without errors.
  • Authentication failures — Verify your API key starts with pk_live_ or pk_test_ and is valid.
  • Connection refused — If self-hosting, confirm PII_REDACTOR_BASE_URL points to your running instance.