
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 分