Pseudonymise and restore patient identifiers & PII in text β local, HIPAA Safe Harbor mode.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Pseudonymise medical and clinical documents before they're processed by AI or
shared. Redacta replaces patient identifiers with labelled tokens β
[PATIENT_NAME_1], [NHS_NUMBER_1], [DATE_OF_BIRTH_1], β¦ β while leaving the
clinical meaning intact, and returns a redaction report alongside the cleaned
text.
It started as an Agent Skill and is now one engine shipped across eight surfaces β an iOS app, agent skill, MCP server, a self-hosted HTTP service with a Kubernetes deployment, two libraries, a CLI, and a FigJam whiteboard plugin.
Running this in production? Redacta offers a small number of fixed-price design-partner integrations for teams shipping AI agents on clinical or patient data β deployment in your environment, one real workflow integrated, and a data-flow document written for your DPO. Details β
| Surface | Folder | Get it |
|---|---|---|
| iOS app β iPhone (app, Share Extension, widget) | ios-app/ | Build with Xcode β see ios-app/README.md |
| Agent skill (Claude Code / apps / API) | SKILL.md, scripts/ | openclaw skills install redacta (ClawHub) |
| MCP server (Claude Desktop, Cursor, β¦) | mcp-server/ | npx -y redacta-mcp (npm Β· MCP Registry Β· Anthropic MCP Directory) |
| TypeScript library | npm-package/ | npm i @pharmatools/redacta (npm) |
| Python library | python-package/ | pip install redacta (PyPI) |
| Command-line tool | cli-package/ | npx redacta-cli (npm) |
| Self-hosted HTTP service + Kubernetes | gateway-service/ | docker build β see gateway-service/README.md |
| FigJam plugin | figjam-plugin/ | Figma Community |
The detection logic lives in one place β the TypeScript engine
(@pharmatools/redacta, in npm-package/), which the MCP server and the
FigJam plugin consume, and which the iOS app runs on-device via JavaScriptCore.
The Python package mirrors it for pip users; the agent skill adds LLM reasoning
for free-text names on top of the deterministic patterns.
Two layers:
scripts/redact_structured.py,
Python standard library only, no network) matches fixed-format identifiers:
NHS numbers (Modulus-11 validated), UK National Insurance numbers, dates of
birth, UK postcodes, phone numbers, emails, and hospital/MRN numbers. US SSN
and ZIP codes are also handled.It also works in reverse. Re-identification (scripts/reinstate.py) takes the
token map from an earlier redaction and restores the original values β so you can
redact a document, run it through another AI tool, and put the real details back
locally. Redact β process β re-identify is a complete round trip, and identifiers
only ever exist on your machine.
Safe Harbor mode. Ask for HIPAA Safe Harbor (or "US de-identification") and Redacta applies a stricter pass: all dates (not just the date of birth), all specific ages, and the remaining HIPAA identifiers β fax, certificate/licence, device serial, VIN, and health-plan beneficiary numbers.
Organisations that can't let identifiable text leave their environment can
run Redacta inside their own infrastructure: a small HTTP service
(gateway-service/) deployable into an existing
Kubernetes cluster with plain YAML β two stateless replicas behind a
Service for redact/reinstate, an optional single-replica session boundary
for the protect β release loop, health probes, resource limits, restrictive
security defaults, and no-PHI logging. Text is pseudonymised before it
reaches any external AI service, and the processing boundary stays under
your control. Walkthrough (local kind cluster included):
gateway-service/k8s/README.md Β·
concepts: docs/KUBERNETES.md.
Deploying somewhere a DPO will ask questions? There's a one-page security &
data-protection summary at
pharmatools.ai/redacta-security.
Claude Code
Then invoke it with /redacta, or let it trigger automatically when you ask to
redact or de-identify clinical text.
Claude apps / API
Zip the repository folder and upload it as a skill.
| Path | What it is |
|---|---|
SKILL.md | The skill β instructions plus metadata |
reference.md | Pattern specs, the Modulus-11 algorithm, NI prefix rules, the date-of-birth vs clinical-date rule, token vocabulary, limitations |
scripts/redact_structured.py | The deterministic pattern layer |
scripts/reinstate.py | The re-identification layer (restore originals from a token map) |
scripts/test_redact_structured.py | Tests for the pattern layer |
scripts/test_reinstate.py | Tests for the re-identification layer |
evaluations.json | Example evaluation scenarios |
Run the tests:
Redacta is a strong first line of defence, not a guarantee. It won't catch every possible identifier and isn't a substitute for formal data-protection processes. Always review the redaction report before sharing text.
MIT-0 (MIT No Attribution). Built by PharmaTools.AI.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/redacta-mcp)<a href="https://allmcps.com/mcp/redacta-mcp"><img src="https://allmcps.com/api/badge/redacta-mcp?style=directory" alt="Redacta MCP on AllMCPs" /></a>