io.github.nickjlamb/redacta-mcp

Registre officiel Santé

Keep patient identifiers out of AI agent context — a local privacy boundary for healthcare agents.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package redacta-mcp
Claude Code
claude mcp add redacta-mcp -- npx -y redacta-mcp@2.1.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "redacta-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "redacta-mcp@2.1.1"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Redacta
  2. One engine, many surfaces
  3. How it works
  4. Self-hosting on Kubernetes
  5. Install
  6. Contents
  7. A note on limits
  8. License

Redacta

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 →

One engine, many surfaces

SurfaceFolderGet 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 librarynpm-package/npm i @pharmatools/redacta (npm)
Python librarypython-package/pip install redacta (PyPI)
Command-line toolcli-package/npx redacta-cli (npm)
Self-hosted HTTP service + Kubernetesgateway-service/docker build — see gateway-service/README.md
FigJam pluginfigjam-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.

How it works

Two layers:

  • Patterns (deterministic). A bundled script (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.
  • Reasoning (judgement). The skill then has the agent handle what patterns can't: patient names (told apart from the clinicians treating them), relatives and carers, postal addresses, and identifying ages.
  • Self-check. A final pass re-reads the output for any identifier that slipped through before the report is written.

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.

Self-hosting on Kubernetes

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.

Install

Claude Code

git clone https://github.com/nickjlamb/redacta ~/.claude/skills/redacta

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.

Contents

PathWhat it is
SKILL.mdThe skill — instructions plus metadata
reference.mdPattern specs, the Modulus-11 algorithm, NI prefix rules, the date-of-birth vs clinical-date rule, token vocabulary, limitations
scripts/redact_structured.pyThe deterministic pattern layer
scripts/reinstate.pyThe re-identification layer (restore originals from a token map)
scripts/test_redact_structured.pyTests for the pattern layer
scripts/test_reinstate.pyTests for the re-identification layer
evaluations.jsonExample evaluation scenarios

Run the tests:

python3 scripts/test_redact_structured.py
python3 scripts/test_reinstate.py

A note on limits

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.

License

MIT-0 (MIT No Attribution). Built by PharmaTools.AI.

Questions fréquentes

Qu'est-ce que io.github.nickjlamb/redacta-mcp ?

Keep patient identifiers out of AI agent context — a local privacy boundary for healthcare agents.

Comment installer io.github.nickjlamb/redacta-mcp ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add redacta-mcp -- npx -y redacta-mcp@2.1.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.nickjlamb/redacta-mcp ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.nickjlamb/redacta-mcp est-il open source ?

Oui. Son code est sur GitHub sous licence MIT-0.

Qui maintient io.github.nickjlamb/redacta-mcp ?

Il est publié par nickjlamb. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.