
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
eu-pii-redact
Advanced tools
Redact European personal data (names, national IDs, IBANs, emails, phones) before it reaches an LLM, and restore it afterwards. Python client and MCP server.
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.
Hi, my name is Karina Dahl. I was charged twice for order 88412.
Please refund to DK50 0040 0440 1162 43 or call me on +45 32 12 34 56.
Karina
becomes
Hi, my name is [PERSON_1]. I was charged twice for order 88412.
Please refund to [IBAN_1] or call me on [PHONE_1].
[PERSON_1]
Name: labels, sign-offs, or a
first name from 140,000 European names. "Best Practices" and "Court of Justice" stay as they are.You need a RapidAPI key with a plan for the API. The
free plan gives 500 requests a month.
Set it as RAPIDAPI_KEY.
pip install eu-pii-redact
from eu_pii_redact import Redactor
with Redactor() as r: # reads RAPIDAPI_KEY
redaction = r.redact(ticket)
reply = ask_llm(redaction.text) # the model only sees placeholders
print(redaction.restore(reply)) # real values back in the answer
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.
pip install "eu-pii-redact[langchain]"
from eu_pii_redact.langchain import protect, PIIRedactionTransformer
safe_llm = protect(llm) # any model or chain that takes a string
safe_llm.invoke("Draft a reply to Karina Dahl about her refund to DK50 0040 0440 1162 43")
# the model sees [PERSON_1] and [IBAN_1]; the returned message has the real values again
docs = PIIRedactionTransformer().transform_documents(docs) # e.g. before indexing for RAG
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.
| Tool | What it does |
|---|---|
redact_text | Redact a text; returns the redacted text and entities (no original values) |
redact_file | Redact a UTF-8 file into a new file; writes a restore mapping (owner-only permissions) |
restore_file | Put the original values back into a file using that mapping, offline |
Claude Code
claude mcp add eu-pii-redact -e RAPIDAPI_KEY=your-key -- uvx eu-pii-redact
Claude Desktop / Cursor / other hosts (mcpServers config)
{
"mcpServers": {
"eu-pii-redact": {
"command": "uvx",
"args": ["eu-pii-redact"],
"env": { "RAPIDAPI_KEY": "your-key" }
}
}
}
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.
MIT for this client package. The API itself is a hosted service.
FAQs
Redact European personal data (names, national IDs, IBANs, emails, phones) before it reaches an LLM, and restore it afterwards. Python client and MCP server.
We found that eu-pii-redact demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.