Ocultar PII Refinery — Mistral Le Chat MCP Extension
Zero-egress PII protection for Mistral Le Chat workflows. Runs entirely in your infrastructure — no data ever leaves your environment.
Optimised for French and EU compliance: SIRET/SIREN, IBAN, RGPD Article 25, CNIL requirements.
Tools
| Tool | Description |
|---|---|
refine_text |
Redacts PII / DCP before sending text to Le Chat. Returns clean text + token map. |
reveal_tokens |
De-tokenizes tokens back to plaintext (auditor-only, requires OCULTAR_AUDITOR_TOKEN). |
register_entity |
Registers a canonical PII entity and its variants so they resolve to the same token across sessions (auditor-only, requires OCULTAR_AUDITOR_TOKEN). |
list_entities |
Lists all registered PII entities (auditor-only, requires OCULTAR_AUDITOR_TOKEN). |
seed_entities |
Bulk-registers PII entities, e.g. from a CRM roster (auditor-only, requires OCULTAR_AUDITOR_TOKEN). |
sombra_query |
Asks a redacted question via the Ocultar Sombra gateway — redacts PII, routes to the chosen LLM, rehydrates the response (requires OCULTAR_SOMBRA_TOKEN and Sombra running separately). |
Prerequisites
- Ocultar Refinery HTTP server running locally on port
4141:export OCU_MASTER_KEY=$(openssl rand -hex 32) export OCU_SALT=$(openssl rand -hex 16) export OCU_AUDITOR_TOKEN=$(openssl rand -hex 24) # reuse as OCULTAR_AUDITOR_TOKEN below docker run --rm -p 4141:4141 \ -e OCU_MASTER_KEY -e OCU_SALT -e OCU_AUDITOR_TOKEN \ -e SLM_ADAPTER=none \ ghcr.io/ocultar-dev/ocultar:latest
SLM_ADAPTER=noneruns the deterministic detection tiers only. Remove it once you run a Tier 2 sidecar (see the main README). Or from source:go run ./services/refinery/cmd/main.go -serve 4141.Note:
docker compose upin the repo root startsapps/proxyon port8081, not the Refinery HTTP server on port4141. The MCP extensions talk to the Refinery HTTP API (/api/refine,/api/reveal,/api/entities) on port4141(and optionallyapps/sombraon port8086forsombra_query). - Python 3.10+
Installation
pip install ocultar-mistral-mcp
Or with uvx (no install needed):
uvx ocultar-mistral-mcp
Mistral Le Chat Configuration
In Mistral Le Chat, open Settings → Tools → MCP Servers and add:
{
"mcpServers": {
"ocultar-pii": {
"command": "ocultar-mistral-mcp",
"env": {
"OCULTAR_URL": "http://localhost:4141",
"OCULTAR_API_KEY": "your-api-key"
}
}
}
}
Or with uvx (no prior install required):
{
"mcpServers": {
"ocultar-pii": {
"command": "uvx",
"args": ["ocultar-mistral-mcp"],
"env": {
"OCULTAR_URL": "http://localhost:4141",
"OCULTAR_API_KEY": "your-api-key"
}
}
}
}
Environment Variables
| Variable | Required | Description |
|---|---|---|
OCULTAR_URL |
Yes | URL of your local Ocultar Refinery (default: http://localhost:4141) |
OCULTAR_API_KEY |
No | Bearer token for Refinery auth |
OCULTAR_AUDITOR_TOKEN |
No | Enables reveal_tokens, register_entity, list_entities, seed_entities — must match OCU_AUDITOR_TOKEN on the server |
OCULTAR_SOMBRA_URL |
No | URL of your local Ocultar Sombra gateway (default: http://localhost:8086) |
OCULTAR_SOMBRA_TOKEN |
No | Enables sombra_query — Sombra rejects requests with no Bearer token |
Usage
Once connected, Le Chat will automatically call refine_text before processing sensitive data. You can also invoke it explicitly:
"Avant de traiter ce texte, filtre les DCP : Jean Dupont, jean.dupont@banque.fr, IBAN FR76 3000 6000 0112 3456 7890 189"
Le Chat returns:
{
"cleanText": "[NAME_a1b2c3d4e5f6a7b8], [EMAIL_9c8f7a1b2d3e4f50], IBAN [IBAN_7f3e9a2b1c4d5e60]",
"tokenMap": {
"[NAME_a1b2c3d4e5f6a7b8]": "NAME",
"[EMAIL_9c8f7a1b2d3e4f50]": "EMAIL",
"[IBAN_7f3e9a2b1c4d5e60]": "IBAN"
}
}
For authorized workflows that need to restore PII after AI processing:
"Reveal these tokens: [EMAIL_9c8f7a1b2d3e4f50], [IBAN_7f3e9a2b1c4d5e60]"
This call is logged to the Refinery's JSON audit log (audit.log, written by BasicFileLogger). Cryptographic Ed25519 + SHA-256 hash-chained audit logs are available when routing traffic through apps/proxy or apps/sombra.
Why This Matters for French Enterprises
Sending customer data to any external AI API — including Mistral's cloud — without redaction constitutes a RGPD violation under Article 25 (Privacy by Design). The CNIL has issued enforcement guidance specifically targeting AI pipeline data flows.
Ocultar ensures that:
- No raw PII ever reaches Le Chat's API endpoint
- SIRET, SIREN, IBAN, and French address formats are detected and tokenized
- Every vault reveal is recorded in the Refinery's audit log (
audit.log; for tamper-evident Ed25519 + SHA-256 hash-chained logs, route throughapps/proxyorapps/sombra) - You remain the data controller — Ocultar is a local processor under your full control
Security Model
refine_textis safe to expose to any Le Chat session (/api/refinedoes not require an auditor token)reveal_tokensrequiresOCULTAR_AUDITOR_TOKEN(matchingOCU_AUDITOR_TOKENon the Refinery server) and every call is logged in the Refinery's plain-JSONaudit.log(BasicFileLogger; Ed25519 + SHA-256 hash-chained logging is inapps/proxyandapps/sombra)- The Refinery vault uses AES-256-GCM with HKDF-SHA256 key derivation — tokens are useless without the master key
- If the Refinery is unreachable, both tools fail closed — raw PII is never forwarded
License
AGPLv3 — see LICENSE. Commercial licensing available for organizations that cannot comply with AGPLv3's source-disclosure requirements — see COMMERCIAL_LICENSE.md.
Metadata
Release files for ocultar-mistral-mcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ocultar_mistral_mcp-0.3.1.tar.gz | 9.9 kB | With provenance | Details for ocultar_mistral_mcp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocultar_mistral_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for ocultar_mistral_mcp-0.3.1-py3-none-any.whl |
Total release size: 17.9 kB
Release files / ocultar_mistral_mcp-0.3.1.tar.gz
| Download URL | ocultar_mistral_mcp-0.3.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24e38151c014be1b8043e91d74dcf0e9ff2125a5560f06d1aedbf469a1a2de3e
|
|
BLAKE2b-256 checksum How to use checksums |
bf67b027b1a087ccab06603f667e4aaf4341bb1aa17c45256454fdbc8b74cc14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / ocultar_mistral_mcp-0.3.1-py3-none-any.whl
| Download URL | ocultar_mistral_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68f1976ca49f2ccd627921e9bda987d37e692b3c186e150be964324a14c3768b
|
|
BLAKE2b-256 checksum How to use checksums |
736de1a2ac95a3fc49115461702f4d49bdcdbb1af6da2301011f2c1742ccc014
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for ocultar-mistral-mcp 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ocultar_mistral_mcp-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.