Gupt
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GUPT_MODE | No | Default replacement mode: placeholder, synthetic, hash, mask, or label. | placeholder |
| GUPT_CONFIG | No | Path to a JSON/TOML configuration file. Environment variables override file settings. | |
| GUPT_ENGINE | No | Detection engine: pattern, ner (requires spaCy), or auto. | pattern |
| GUPT_POLICY | No | Default policy pack(s), e.g. all, pii, hipaa, gdpr, dpdp, pci, financial, secrets, india, government_ids, contact. Can combine and subtract, e.g. dpdp,secrets or all,-URL,-IP_ADDRESS. | all |
| GUPT_AUDIT_LOG | No | Enable audit records. Records contain types and counts only, never values. | off |
| GUPT_DENY_LIST | No | Comma-separated terms that are always redacted. | |
| GUPT_ALLOW_LIST | No | Comma-separated terms that are never redacted. | |
| GUPT_AUDIT_FILE | No | Audit output file. Records contain types and counts only, never values. | off |
| GUPT_SECRET_KEY | No | Key for hash/synthetic determinism across restarts. Defaults to a random per-process value. | |
| GUPT_NOISE_FLOOR | No | Below this score a finding is ignored. | 0.3 |
| GUPT_SPACY_MODEL | No | spaCy model used by the NER engine. | en_core_web_sm |
| GUPT_ALLOWED_DIRS | No | Folders the file tools may read/write, separated by os.pathsep. A filesystem root is refused. Defaults to the server's working directory. | server's working dir |
| GUPT_ON_UNCERTAIN | No | Low-confidence finding behavior: redact it anyway, or block the whole call. | redact |
| GUPT_TRUST_THRESHOLD | No | Below this score a finding is considered uncertain. | 0.5 |
| GUPT_EXPOSE_TOKEN_MAP | No | Return the token map from redact tools. Only for non-LLM clients. | false |
| GUPT_VAULT_TTL_MINUTES | No | Idle sessions expire after this many minutes. | 240 |
| GUPT_ALLOW_RESTORE_TEXT | No | Set to false for zero-exposure mode, where only restore_file can restore. | true |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Gupt is a privacy firewall. Use it to keep personal data (PII), health data (PHI) and secrets out of model context, logs and third-party tools.
Workflow:
Prefer the file tools for user data on disk:
redact_filereads the file inside the server and returns only the redacted version, so raw values never enter this conversation.scan_filesaudits a folder and returns counts plus masked samples.For text you must forward to another tool, API or agent, call
redactfirst and sendredacted_textonward. Tokens look like <<EMAIL_ADDRESS_1>>; keep them intact (do not reformat or translate them) so they can be restored.Reuse the returned
session_idon later calls: the same value then always maps to the same token, across texts, files and JSON.To put real values back, call
restore_file(writes to disk, never shows the values here).restorereturns the values into the conversation; use it only when the user wants to see them.The original values are held in a server-side vault and are never returned by redact; you only see the session_id. Modes: placeholder (default), synthetic (realistic fakes), hash, mask, label. Policies: all, pii, hipaa, phi, gdpr, dpdp, pci, financial, secrets, india, government_ids, contact; combine with commas, exclude with '-TYPE'.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| redactA | Replace PII/PHI/secrets in text with tokens. Returns redacted_text and a session_id; the original values stay in the server vault. |
| restoreA | Put the original values back into text. This reveals them in the conversation; prefer restore_file to write the result to disk. |
| scanA | Report the sensitive data found in text (type, position, confidence, masked preview) without changing it. |
| redact_jsonA | Redact a JSON document while keeping its structure. Field names count as evidence: values under keys like 'name' or 'address' are redacted whole. |
| restore_jsonB | Put original values back into a redacted JSON document. |
| redact_fileA | Read a local file inside the server and return/write only its redacted version, so raw contents never enter the conversation. JSON, JSONL and CSV keep their structure; everything else is treated as text. |
| restore_fileA | Restore real values and write the result to disk. The restored content is not returned, so the values never appear in the conversation. |
| scan_filesA | Audit a file or folder: per-file counts of PII/PHI/secrets with masked samples and line numbers. Raw values are never returned. |
| forget_sessionB | Delete a session's stored originals now. Its tokens can no longer be restored. |
| list_entitiesB | List the sensitive-data types Gupt detects, and the policy packs. |
| gupt_statusA | Server configuration and vault statistics (no sensitive values). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| safe_file_workflow | Guide the model through redact -> work on tokens -> restore to disk. |
| privacy_audit | Ask the model to audit a folder and summarise the risks. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| entities | Catalog of detectable entity types |
| policies | Available policy packs |
TDQS
Scored across 11 tools
The tool set has clear format/scope distinctions: text vs JSON vs file vs folder auditing. The main possible confusion is between redact/redact_json/redact_file and restore/restore_json/restore_file, but the descriptions clarify input types and output behavior well enough.
All names use consistent snake_case and generally follow a verb_noun or clear action pattern. A few bare verbs (redact, restore, scan) and the prefixed gupt_status are minor deviations but remain predictable.
Eleven tools is well-scoped for a PII redaction/restoration server, covering redaction, scanning, restoration, file handling, session cleanup, and status/introspection without obvious filler.
The surface covers the core lifecycle: scan, redact, restore, file variants, session cleanup, and introspection. Minor gaps exist around session listing/management and policy configuration, but core workflows are well supported.