Skip to Content
IntegrationsMCP Server

MCP Server

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

Package: @expunct/mcp on npm

Quick Setup

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

{ "mcpServers": { "expunct": { "command": "npx", "args": ["@expunct/mcp"], "env": { "EXPUNCT_API_KEY": "pk_live_...", "EXPUNCT_BASE_URL": "https://api.expunct.ai" } } } }

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
EXPUNCT_API_KEYYesAPI key (pk_live_... or pk_test_...)
EXPUNCT_BASE_URLNohttps://api.expunct.aiAPI endpoint URL

Available Tools

ToolDescriptionSync
expunct_sanitize_textRedact PII from text (27+ entity types)Yes
expunct_sanitize_fileSubmit file/URI for async redactionNo
expunct_sanitize_batchBatch redact 1-100 URIsNo
expunct_check_statusPoll job progressRead-only
expunct_list_entity_typesList all supported entity typesRead-only
expunct_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 expunct_sanitize_text and return: "[PERSON] lives at [ADDRESS]"

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

Troubleshooting

  • “Tool not found” errors — Make sure the MCP server is running. Check npx @expunct/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 EXPUNCT_BASE_URL points to your running instance.