MCP server for PII Redactor — redact PII from text via AI assistants
PII Redactor MCP Server
An MCP (Model Context Protocol) server that provides PII (Personally Identifiable Information) redaction capabilities to AI assistants like Claude Desktop, Cursor, and Windsurf.
Powered by the PII Redactor API on RapidAPI.
Features
sanitize_text— Detect and redact PII from any text (emails, phone numbers, credit cards, SSNs, IBANs, IP addresses, crypto wallets)health_check— Verify the API is available
Quick Start
1. Get an API Key
Sign up at RapidAPI and subscribe to the PII Redactor API.
2. Configure Your AI Assistant
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %AppData%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"pii-redactor": {
"command": "npx",
"args": ["-y", "pii-redactor-mcp"],
"env": {
"PII_REDACTOR_API_KEY": "your-rapidapi-key-here"
}
}
}
}
Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"pii-redactor": {
"command": "npx",
"args": ["-y", "pii-redactor-mcp"],
"env": {
"PII_REDACTOR_API_KEY": "your-rapidapi-key-here"
}
}
}
}
Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"pii-redactor": {
"command": "npx",
"args": ["-y", "pii-redactor-mcp"],
"env": {
"PII_REDACTOR_API_KEY": "your-rapidapi-key-here"
}
}
}
}
3. Use It
Ask your AI assistant:
"Redact PII from: My name is John, email john@acme.com, SSN 123-45-6789"
The assistant will call the sanitize_text tool and return the redacted text.
Tools
sanitize_text
Redact PII from text.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| text | string | Yes | Text to scan and redact |
| entities | string[] | No | Entity types to detect (default: all). Options: email, phone, credit_card, ssn, iban, ip_address, crypto_wallet |
| default_country | string | No | Two-letter country code for phone detection (default: US) |
health_check
Check API availability. No parameters.
Configuration
| Environment Variable | Required | Description |
|---------------------|----------|-------------|
| PII_REDACTOR_API_KEY | Yes | Your RapidAPI key from PII Redactor |
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run locally (set API key first)
export PII_REDACTOR_API_KEY=your-key
node build/index.js
License
MIT