# redacta-mcp

Redacts patient identifiers locally before an AI agent processes a clinical document. Useful when raw medical details must stay on the machine.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: nickjlamb
- License: MIT-0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nickjlamb/redacta
- Updated: 2026-10-06
- HTML: https://affpapa.org/en/nevibecode/mcp/redacta-mcp

## What it does

redacta-mcp pseudonymises clinical and medical documents before they reach an AI tool. It turns patient names, birth dates, contact details and other identifiers into labelled tokens, then returns a report describing the changes. A local token map can later restore the original values.

The MCP server uses a shared TypeScript detection engine with fixed-format matching. Agent reasoning handles free-form names, relatives, addresses and ages, followed by a pass that checks for identifiers missed earlier. HIPAA Safe Harbor mode adds stricter handling for dates, ages and further healthcare identifiers. For clinical data, the boundary is concrete: raw identifiers remain on the local machine while the AI receives tokenised text.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add redacta-mcp -- npx -y redacta-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add redacta-mcp -- npx -y redacta-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "redacta-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "redacta-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "redacta-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "redacta-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add redacta-mcp npx -y redacta-mcp
```

## When to use it
- redact patient identifiers from a clinical file
- prepare medical text for AI processing
- restore original values after agent work
- scan output for identifiers that slipped through
- apply HIPAA Safe Harbor handling

## Example prompts
- Redact patient identifiers in `case-notes.txt` before sending the document to another AI tool.
- Process this clinical note, return the redaction report, and restore the original values locally afterward.
- Use HIPAA Safe Harbor mode on this document and remove the additional identifiers it covers.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110
- [Robin: AI-Powered Dark Web OSINT](https://affpapa.org/en/nevibecode/mcp/robin-ai-powered-dark-web-osint.md) — MCP server · ★ 7718
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2066
- [OpenOSINT](https://affpapa.org/en/nevibecode/mcp/openosint.md) — MCP server · ★ 1816

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
