
EU PII Redaction
io.github.JulianJohansen由 GitHub 账号 JulianJohansen 发布v0.1.0更新于 Oct 24, 2026
Redact EU personal data (names, national IDs, IBANs) in text and files; restore it later.
概览
通过 EU PII Redaction API 对文本和文件中的欧盟个人数据(姓名、国家证件号、IBAN、银行卡、邮箱、电话)进行脱敏,并可稍后还原。
- 可以做什么
- 对文本脱敏,返回脱敏后的文本以及实体列表(类型、偏移量和占位符),不含原始值。
- 将 UTF-8 文件脱敏写入新文件,助手无需读取文件内容,只报告统计数量。
- 使用保存的还原映射在本地离线把原始值写回文件。
- 可只对指定类型脱敏,或用星号掩码代替占位符。
- 适用场景
- 当含有欧洲个人数据的提示词、日志或文档需要经过大模型或用于 RAG 索引,且之后要把真实值还原到回答中时适用。也适合在不把文件内容暴露给对话的情况下批量脱敏文件。
- 运行要求
- 以 Python 包形式在本地运行,通过 uvx 启动(需要 Python 环境)。需要一个已订阅 EU PII Redaction API 的 RapidAPI 密钥,通过环境变量 RAPIDAPI_KEY 提供;免费方案每月 500 次请求。脱敏需要访问该 API 的网络连接,还原可离线完成。
安装
在 SourceWeft 中
- 打开 控制台中的 EU PII Redaction,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
eu-pii-redact
Keep European personal data out of LLM prompts and logs, and put it back in the answer. Python client, LangChain integration and MCP server for the EU PII Redaction API. Try it live without signing up · Quickstart · Privacy and data processing
becomes
- Names from evidence, not capital letters: titles, greetings, roles,
Name:labels, sign-offs, or a first name from 140,000 European names. "Best Practices" and "Court of Justice" stay as they are. - National ID numbers from 21 EU/EEA countries, checked by check digit and birth date (personnummer, HETU, DNI/NIE, codice fiscale, NIR, PESEL, BSN, CPR, ...).
- IBANs (mod-97), cards (Luhn), EU VAT numbers, emails, phones (with + prefix), IPs.
- Every mention of a person shares one placeholder; order and invoice numbers stay untouched.
You need a RapidAPI key with a plan for the API. The
free plan gives 500 requests a month.
Set it as RAPIDAPI_KEY.
Python
redaction.entities lists each finding with its type, offsets in the original text and placeholder
(national IDs also carry country and scheme). Texts longer than 50,000 characters are sent in pieces
with consistent placeholders. r.redact(text, types=["EMAIL", "IBAN"], mode="mask") masks with asterisks.
LangChain
MCP server
Lets an AI assistant redact text and, more importantly, files without reading them:
redact_file reads and writes the file itself and only reports counts, so the personal data
never enters the conversation. restore_file puts the values back locally.
Claude Desktop (one click): download eu-pii-redact-0.1.0.mcpb from the
latest release, open it, and paste
your RapidAPI key when asked. The bundle sources are in mcpb/.
Claude Code
Claude Desktop / Cursor / other hosts (mcpServers config)
Postman
Fork the public collection from the
EU PII Redaction workspace (or import
postman/eu-pii-redaction.postman_collection.json), set the collection variable rapidapi_key, and send:
four requests with example responses and built-in tests.
Limits
Rule-based, which keeps it fast (about 0.1 s for 50,000 characters) and predictable: no street addresses yet, phone numbers need an international prefix, and a name without any cue whose surname is an English word ("Will Smith") is missed on purpose. Use it as a strong first layer, not as a compliance guarantee.
License
MIT for this client package. The API itself is a hosted service.
来源:README.md,提交 fcb3406
工具
0版本历史
1- v0.1.0最新Oct 1, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分