Skip to main content

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 running locally:
    docker compose up
    
  • 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 recorded in the immutable Ed25519-signed audit log.

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 access is logged in a tamper-evident, Ed25519-signed audit trail
  • You remain the data controller — Ocultar is a local processor under your full control

Security Model

  • refine_text is safe to expose to any Le Chat session
  • reveal_tokens requires OCULTAR_AUDITOR_TOKEN and every call is logged with actor, timestamp, and Ed25519 signature
  • 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocultar_mistral_mcp-0.3.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocultar_mistral_mcp-0.3.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file ocultar_mistral_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: ocultar_mistral_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ocultar_mistral_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 67a113aa93ff28f6f4340318f278d31aca82a31b2b138f330d5b11ff66a99282
MD5 9ca91e5f30ea4397ec1dd7bf5e5180c7
BLAKE2b-256 0d6998db8aaf51aa2e9c00a079212a70a11c93bffe14dda3b19df55127d8b2e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocultar_mistral_mcp-0.3.0.tar.gz:

Publisher: mcp-publish.yml on ocultar-dev/ocultar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ocultar_mistral_mcp-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ocultar_mistral_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe961b49264307a25865d99a28f106a504edfb9263e8cc01bc793a820bf41fa2
MD5 527ec1dbac3f0edda4405f8d0cdf9b02
BLAKE2b-256 6b4e9a02ac6bfcd8f18832de0ce2a98e73830da886c615f4f2c61e7d5a2d87f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocultar_mistral_mcp-0.3.0-py3-none-any.whl:

Publisher: mcp-publish.yml on ocultar-dev/ocultar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page