PII信息脱敏服务

一个提供PII(个人身份信息)脱敏功能的MCP服务器,适用于AI助手如Claude Desktop、Cursor和Windsurf。

  • by klyph-io
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 klyph-io/pii-redactor-mcp

使用说明

PII Redactor MCP服务器

MCP(模型上下文协议)服务器,为Claude Desktop、Cursor和Windsurf等AI助手提供PII(个人身份信息)编辑功能。

由 PII Redactor API 在RapidAPI上。

特性

  • sanitize_text --从任何文本(电子邮件、电话号码、信用卡、SSN、IBAN、IP地址、加密钱包)中检测并编辑PII
  • health_check -验证API是否可用

快速开始

1.获取API密钥

注册地址: 快速API 并订阅PII Redactor API。

2.配置您的AI助手

克劳德桌面版

添加 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %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"
      }
    }
  }
}

光标

添加到光标MCP设置中:

{
  "mcpServers": {
    "pii-redactor": {
      "command": "npx",
      "args": ["-y", "pii-redactor-mcp"],
      "env": {
        "PII_REDACTOR_API_KEY": "your-rapidapi-key-here"
      }
    }
  }
}

帆板运动

添加到您的Windsurf MCP配置中:

{
  "mcpServers": {
    "pii-redactor": {
      "command": "npx",
      "args": ["-y", "pii-redactor-mcp"],
      "env": {
        "PII_REDACTOR_API_KEY": "your-rapidapi-key-here"
      }
    }
  }
}

3.使用它

问你的AI助手:

“Redact PII发件人:我的名字是约翰,电子邮件john@acme.com,序列号123-45-6789“

助理会打电话给 sanitize_text 工具并返回编辑后的文本。

工具

sanitize_text

从文本中编辑PII。

参数 类型 必填 说明
text string 是 要扫描和编辑的文本
entities string[] 否 要检测的实体类型(默认值:all)。选项: email, phone, credit_card, ssn, iban, ip_address, crypto_wallet
default_country string 否 用于电话检测的两个字母的国家代码(默认值: US)

health_check

检查API的可用性。没有参数。

配置

环境变量 必填 说明
PII_REDACTOR_API_KEY 是 您的RapidAPI密钥来自 PII Redactor

发展

# 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

许可证

麻省理工学院