SuperAPI AI Directory

redacta

Redacta is a privacy boundary tool for clinical text that, before AI processes or shares medical documents, replaces patient identifiers with labeled tokens (such as [PATIENT_NAME_1], [NHS_NUMBER_1]) while preserving clinical semantics and generating a redaction report. It offers multiple usage forms including an iOS app, Agent Skill, MCP server, self-hosted Kubernetes service, two libraries, a CLI, and a FigJam whiteboard plugin. The core detection logic resides in the TypeScript engine, with a Python package providing a mirrored implementation. It supports deterministic pattern matching (NHS numbers, UK National Insurance numbers, dates of birth, postcodes, phone numbers, emails, hospital/MRN numbers, US SSN and ZIP, etc.) and LLM reasoning (patient names, relatives/carers, addresses, identifying ages), and performs self-checks. It also supports reverse reinstatement (redact → process → re-identify) and a HIPAA Safe Harbor mode. Note: it is a strong first line of defense but not a guarantee, cannot replace formal data protection processes, and the redaction report should be reviewed before sharing.

Open website

About this tool

Redacta is a privacy boundary tool for clinical text, designed to pseudonymize patient identifiers before AI processes or shares medical documents. It replaces patient identifiers with labeled tokens (such as [PATIENT_NAME_1], [NHS_NUMBER_1], [DATE_OF_BIRTH_1], etc.) while preserving clinical meaning, and returns a redaction report and the cleaned text.

Purpose:

  • Remove or replace patient identity information in medical or clinical documents before handing them to AI for processing or sharing them externally.
  • Support a complete round trip of redact → process → re-identify, ensuring identifiers exist only on the local machine.

Key capabilities:

  • Deterministic pattern matching: built-in scripts (using only the Python standard library, no network) can match fixed-format identifiers, including NHS numbers (Modulus-11 checksum), UK National Insurance numbers, dates of birth, UK postcodes, phone numbers, emails, hospital/MRN numbers, and US SSN and ZIP codes.
  • LLM reasoning: Agent Skill adds LLM reasoning on top of deterministic patterns to handle content that patterns cannot cover, such as patient names (distinguished from treating clinicians), relatives and carers, mailing addresses, and identifying ages.
  • Self-check: the final stage re-reads the output, checks for any missed identifiers, and then generates the report.
  • Reverse reinstatement: using scripts/reinstate.py and the previous token mapping, redacted text can be restored to its original values.
  • Safe Harbor mode: when HIPAA Safe Harbor (or "US de-identification") is requested, Redacta performs stricter redaction, including all dates (not just dates of birth), all specific ages, and the remaining HIPAA identifiers (fax, certificate/license, device serial numbers, VIN, health plan beneficiary numbers).

Usage forms:

  • Multiple forms: iOS app, Agent Skill, MCP server, self-hosted HTTP service (including Kubernetes deployment), two libraries (TypeScript engine @pharmatools/redacta and Python package), CLI, FigJam whiteboard plugin.
  • The core detection logic resides in the TypeScript engine (@pharmatools/redacta in npm-package/), and the MCP server and FigJaThe m plugin uses this engine, and the iOS app runs on-device via JavaScriptCore. The Python package provides a mirror implementation for pip users.
  • In the Claude app/API, you can package the repository folder as a zip and upload it as a skill, then invoke it via /redacta, or have it trigger automatically when requesting redaction/de-identification of clinical text.
  • Self-hosted Kubernetes: a small HTTP service (gateway-service/) can be deployed as pure YAML to an existing Kubernetes cluster, including two stateless replicas for redact/reinstate, an optional single-replica session boundary for the protect→release loop, health probes, resource limits, strict security defaults, and no PHI logging. Text is pseudonymized before reaching any external AI service, and the processing boundary is controlled by the user.

Use cases:

  • When healthcare institutions, research teams, or developers build AI agents on clinical or patient data, they need to redact before processing.
  • Organizations that cannot let identifiable text leave their own environment can run it internally via the self-hosted Kubernetes service.
  • Round-trip workflows that need to redact documents before handing them to other AI tools for processing, then restore the real details locally.

Limitations:

  • Redacta is a strong first line of defense, but not a guarantee; it cannot catch all possible identifiers and cannot replace formal data protection processes.
  • You should always review the redaction report before sharing text.
  • Licensed under MIT-0 (MIT No Attribution), built by PharmaTools.AI.