# Redact MCP

Replaces sensitive records with deterministic dummy values before an LLM inspects them. Built for security audits on external systems.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: r3352
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/r3352/redact-mcp
- Updated: 2026-03-23
- HTML: https://affpapa.org/en/nevibecode/mcp/redact-mcp

## What it does

The server scrubs sensitive records using nineteen regex patterns paired with a local `Xenova/bert-base-NER` model. It detects hostnames, connection strings, and names. If model loading fails, it silently falls back to regular expressions.

Each original value receives a persistent fake substitute across the session via a bidirectional lookup table. Eight MCP tools handle file reading, manual mapping adjustments, and HTTP proxying. The proxy tool dispatches real HTTP calls, sanitizing both headers and payload before the assistant receives the output.

Initial execution downloads an ONNX model file of roughly 110MB. Without network access, entity recognition will not work.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `REDACT_AUDIT_LOG`, `REDACT_DATA_DIR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env REDACT_AUDIT_LOG=<REDACT_AUDIT_LOG> --env REDACT_DATA_DIR=<REDACT_DATA_DIR> --transport stdio redact-mcp -- npx -y @mattzam/redact-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add redact-mcp --env REDACT_AUDIT_LOG=<REDACT_AUDIT_LOG> --env REDACT_DATA_DIR=<REDACT_DATA_DIR> -- npx -y @mattzam/redact-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "redact-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@mattzam/redact-mcp"
            ],
            "env": {
                "REDACT_AUDIT_LOG": "<REDACT_AUDIT_LOG>",
                "REDACT_DATA_DIR": "<REDACT_DATA_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "redact-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mattzam/redact-mcp"
            ],
            "env": {
                "REDACT_AUDIT_LOG": "<REDACT_AUDIT_LOG>",
                "REDACT_DATA_DIR": "<REDACT_DATA_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e REDACT_AUDIT_LOG=<REDACT_AUDIT_LOG> -e REDACT_DATA_DIR=<REDACT_DATA_DIR> redact-mcp npx -y @mattzam/redact-mcp
```
Replace <…> with your own values

## When to use it
- strip credentials and private keys from model inputs
- mask target IP addresses and customer hostnames
- send sanitized HTTP requests using an outbound proxy tool
- log replacement history into local JSONL files

## Example prompts
- Read `client_scan.log` using `redact_read_file` and summarize the open ports.
- Query the endpoint through `redact_proxy_request` without exposing target tokens.
- Display active token replacements via `redact_show_mappings`.

## 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
