Zero-egress PII redaction for Claude. Runs locally β no data leaves your infrastructure.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Ocultar is an open-source local PII/PHI masking engine for AI workflows.
It runs as a local HTTP sidecar. Send it text before it reaches a cloud LLM; it returns the
same text with every piece of personal data replaced by a deterministic, reversible token
([EMAIL_9c8f7a1b], [PERSON_3a12b4cd], β¦). Originals are encrypted and stored in a
local vault. Callers with the auditor token can restore them.
No PII ever reaches the upstream model.
GET /api/healthReturns engine status. No authentication required.
POST /api/refineMask PII in text or JSON. No authentication required.
Request body: raw text string or any JSON value.
Response:
refinedis a JSON-encoded string β parse it once to get the masked payload.
POST /api/revealRestore vault tokens back to originals.
Authentication: Authorization: Bearer <OCU_AUDITOR_TOKEN> header required.
Returns 403 if OCU_AUDITOR_TOKEN is not set on the server.
Request body:
Response:
GET /api/entities Β· POST /api/entities Β· POST /api/entities/seedManage the persistent entity registry (pre-seed canonical names so all variants map to the
same token). Requires Authorization: Bearer <OCU_AUDITOR_TOKEN>.
Ocultar runs two detection tiers before any text leaves the machine:
| Sub-tier | Shield | What it catches |
|---|---|---|
| 0 | Dictionary | VIP names, org names from configs/protected_entities.json |
| 0.5 | Pattern + Entropy | High-entropy strings (API keys, secrets) via Shannon scoring |
| 1 | Rule Engine | EMAIL, SSN, IBAN, credit cards, 50+ national ID formats |
| 1.1 | Phone Shield | libphonenumber validation |
| 1.2 | Address Shield | Heuristic street address parser (EN/FR/ES/DE) |
| 1.5 | Contextual | Names in greetings, signatures, interrogative sentences |
Sends text to a local AI sidecar for named-entity recognition. The scanner is always
initialized but produces no results unless a compatible sidecar is running at SLM_SIDECAR_URL.
Point it at a privacy-filter or llama.cpp instance to activate NER.
Use SLM_ADAPTER=openai-chat for a llama.cpp / Qwen endpoint, or leave unset for the
privacy-filter protocol (default).
[EMAIL_9c8f7a1b], β¦) are the only data forwarded to the upstream model. Raw text is not transmitted.vault.db) on the local filesystem using AES-256-GCM with HKDF-SHA256. The vault file is never transmitted.OCU_AUDITOR_TOKEN β without an auditor token the reveal endpoint returns 403 and the diff view is inaccessible.5xx error and stops β it does not forward raw text as a fallback.| Variable | Required | Default | Purpose |
|---|---|---|---|
OCU_MASTER_KEY | Yes (production) | insecure dev key | 32+ byte AES key material for HKDF |
OCU_SALT | Yes (production) | built-in default | Per-deployment HKDF salt |
OCU_AUDITOR_TOKEN | Yes | β | Bearer token for /api/reveal and /api/entities |
OCU_VAULT_PATH | No | vault.db | DuckDB vault file path |
SLM_SIDECAR_URL | No | http://localhost:8085 | Tier 2 NER sidecar endpoint |
SLM_ADAPTER | No | privacy-filter | Sidecar protocol: privacy-filter or openai-chat |
Requires Go 1.24+ with CGO enabled (DuckDB and libphonenumber need a C compiler).
Run tests:
Apache 2.0 β see LICENSE.
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/ocultar-pii)<a href="https://allmcps.com/mcp/ocultar-pii"><img src="https://allmcps.com/api/badge/ocultar-pii?style=directory" alt="Ocultar Pii on AllMCPs" /></a>