Gupt
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gupt Redact the PII in customers.csv and write a clean copy to output.csv"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gupt · गुप्त
A privacy firewall for AI. Gupt is an MCP server and CLI that finds personal data (PII), health data (PHI) and secrets, replaces them before they reach a language model, and puts the real values back afterwards. It runs entirely on your machine and makes zero network calls.
"Patient: Rahul Verma, Aadhaar 2341 2341 2346, PAN ABCPE1234F, +91 98765 43210, rahul@okaxis"
placeholder → Patient: <<PERSON_1>>, Aadhaar <<IN_AADHAAR_1>>, PAN <<IN_PAN_1>>, <<IN_PHONE_1>>, <<IN_UPI_ID_1>>
synthetic → Patient: Rohan Khan, Aadhaar 7884 7999 3022, PAN WGNPA3172J, +91 91751 06834, noah479@okaxis
mask → Patient: R**** *****, Aadhaar XXXX XXXX 2346, PAN A*********, +** ***** *3210, r****@******Why Gupt
Most redaction MCP servers return the token map (the real values) as the tool result. In MCP the caller is the model, so that hands the model exactly what you meant to hide. Gupt is designed around that problem:
Typical redaction server | Gupt | |
Original values kept out of the model's context | ❌ token map returned to the model | ✅ server-side vault, model sees only a |
Redact files without the model ever reading them | ❌ | ✅ |
Consistent tokens across many calls | ❌ | ✅ sessions: same value → same token |
Entity types | ~20 | 125+ across 35+ countries |
India (Aadhaar/Verhoeff, PAN, GSTIN, UPI, ABHA, DL, vehicle…) | ❌ | ✅ checksum-validated |
API keys & secrets (OpenAI, Anthropic, AWS, GitHub, Stripe, Razorpay…) | ❌ | ✅ 25 secret types |
Redaction modes | 1 | 5: placeholder, synthetic, hash, mask, label |
Compliance policy packs | ❌ | ✅ HIPAA, GDPR, DPDP (India), PCI, secrets… |
JSON / CSV aware (field names count as evidence) | ❌ | ✅ |
CI / pre-commit leak scanner | ❌ | ✅ |
Current MCP SDK (2.x) | often pinned to 1.x | ✅ |
Related MCP server: mcp-privacy-shield
Install
pip install gupt-mcp # or: uvx gupt-mcpOnly dependency: the official MCP SDK. Optional statistical NER for free-text names and places:
pip install "gupt-mcp[ner]" && python -m spacy download en_core_web_sm
# then set GUPT_ENGINE=auto (or ner)For better name/place accuracy (especially Indian names) use the larger model: python -m spacy download en_core_web_lg and set GUPT_SPACY_MODEL=en_core_web_lg.
Connect it to your AI client
Claude Code
claude mcp add gupt -e GUPT_ALLOWED_DIRS="$PWD" -- uvx gupt-mcpClaude Desktop / Cursor / Windsurf / VS Code (mcpServers block):
{
"mcpServers": {
"gupt": {
"command": "uvx",
"args": ["gupt-mcp"],
"env": { "GUPT_ALLOWED_DIRS": "/path/to/your/data" }
}
}
}More ready-to-paste configs in examples/.
Tools
Tool | What it does |
| Replace sensitive data in text. Returns |
| Put originals back into text (reveals them in the chat; can be disabled). |
| Report findings (type, position, confidence, masked preview) without changing text. |
| Structure-preserving redaction; field names like |
| Read a local file inside the server; only the redacted version reaches the model. JSON, JSONL, CSV keep their structure. |
| Write the restored result to disk. Content is never returned to the model. |
| Audit a folder: counts per file, line numbers, masked samples. |
| Delete a session's originals immediately. |
| Catalog, policies, configuration. |
Also exposes resources gupt://entities, gupt://policies and two prompts: safe_file_workflow and privacy_audit.
The zero-exposure workflow
Ask your assistant to "summarise complaints in tickets.csv and draft replies to replies.csv" with Gupt connected:
The model calls
redact_file("tickets.csv"). Gupt reads it locally and returns only<<PERSON_3>>,<<IN_PHONE_7>>… plus asession_id.The model writes replies using the tokens.
The model calls
restore_file(session_id, text=…, output_path="replies.csv"). Real names and numbers are filled in on disk.
The model completed the task without ever seeing a single real identifier.
For agent pipelines (send text to an external API, a translation service, another agent), use redact → forward redacted_text → restore with the same session_id.
Redaction modes
Mode | Example ( | Reversible | Use when |
|
| ✅ | Clear, typed, numbered tokens the model can reason about |
|
| ✅ | The model should read natural text. Fakes keep the format and valid checksums (Aadhaar/Verhoeff, cards/Luhn, GSTIN, NPI) |
|
| ✅ | Stable pseudonyms across runs (set |
|
| ❌ | Human-readable partial masking (UIDAI-style for Aadhaar) |
|
| ❌ | Irreversible redaction |
Per-type overrides: "entity_modes": {"CREDIT_CARD": "mask"}.
Policy packs
all (default) · pii · hipaa / phi (18 Safe-Harbor identifiers) · gdpr · dpdp (India DPDP Act 2023) · pci · financial · secrets · india · government_ids · contact
Combine and subtract: policy="dpdp,secrets", policy="all,-URL,-IP_ADDRESS".
What it detects (125+ types)
Every identifier that has a check digit is validated, so look-alikes are discarded instead of redacted. Format-less identifiers are context-anchored (they need a nearby word like "passport" or "NHS"). Known false-positive contexts (e.g. "order id", "invoice", "txn") veto a match.
India: Aadhaar (Verhoeff), Aadhaar VID, PAN, GSTIN (mod-36), UPI ID (80+ PSP handles), mobile (+91 / 10-digit), passport, voter ID (EPIC), driving licence, vehicle registration (incl. BH series), UAN, ration card, IFSC, ABHA number & address. Hindi context words (आधार, मोबाइल, जन्म तिथि…).
Healthcare: NPI, DEA, MRN / UHID / IP-OP numbers, Medicare MBI & HICN, CLIA, health-plan member IDs, medical licence, ICD-10 codes, admission/discharge dates, NHS number, Australian Medicare, ABHA.
Personal & contact: names (honorifics like Dr./Mr./Shri/Smt., labelled fields, JSON/CSV keys, or NER), street addresses (US/UK/India), postal codes, DOB, ages over 89, GPS coordinates, usernames, email, phone (NANP + international), URL, IPv4/IPv6, MAC.
Financial & crypto: cards (Luhn), IBAN (mod-97), SWIFT/BIC, bank accounts, ABA routing, Bitcoin (Base58Check/bech32 verified), Ethereum.
Government IDs, 35+ countries: US (SSN, ITIN, EIN, passport, DL), Canada SIN, Brazil CPF/CNPJ, Mexico CURP/RFC, UK NINO, Spain DNI/NIE, Italy codice fiscale, France NIR, Germany Steuer-ID, Netherlands BSN, Poland PESEL, Sweden personnummer, Finland HETU, Portugal NIF, Belgium NRN, Ireland PPSN, Turkey TCKN, Australia TFN/ABN, NZ IRD, Singapore NRIC, Hong Kong ID, China resident ID, Japan My Number, Korea RRN, Thailand, Malaysia, Indonesia, Philippines, Pakistan CNIC, Bangladesh, Sri Lanka, Nepal, Israel, UAE Emirates ID, Saudi ID, South Africa, Nigeria NIN/BVN, Kenya.
Devices & vehicles: VIN (check digit), IMEI, device / implant serials.
Secrets: AWS, GitHub, GitLab, OpenAI, Anthropic, Google, Hugging Face, Groq/Replicate/Perplexity/xAI, Stripe, Razorpay, Slack, Discord & Slack webhooks, Telegram, Twilio, SendGrid, npm, PyPI, Shopify, DigitalOcean, Azure storage, JWTs, PEM private keys, passwords in connection strings,
password=/api_key=assignments (placeholders like${VAR}ignored).
Run gupt entities (or gupt entities --region IN) for the full list.
CLI
gupt redact notes.txt -o notes.safe.txt --map notes.map.json # token map stays on your disk
gupt restore llm_reply.txt --map notes.map.json
cat data.json | gupt redact --json --mode synthetic
gupt scan src/ config/ --policy secrets --fail # exit 1 if anything leaks
gupt scan . --format json > privacy-report.json
gupt serve --http --port 8765 # streamable HTTP transportBlock leaks in CI / pre-commit
# .pre-commit-config.yaml
repos:
- repo: https://github.com/parthagni22/gupt-mcp
rev: v0.1.0
hooks:
- id: gupt-scan# GitHub Actions
- run: pip install gupt-mcp && gupt scan . --policy secrets,government_ids --failPython library
from gupt_mcp import Gupt
g = Gupt()
out = g.redact("Mail rahul@example.com, PAN ABCPE1234F", policy="dpdp")
print(out["redacted_text"]) # Mail <<EMAIL_ADDRESS_1>>, PAN <<IN_PAN_1>>
reply = call_your_llm(out["redacted_text"])
print(g.restore(reply, session_id=out["session_id"])["text"])Configuration
Zero config works. Everything is set through the client's env block or a JSON/TOML file at GUPT_CONFIG; environment variables win.
Variable | Default | Meaning |
| server's working dir | Folders the file tools may read/write ( |
|
| Default policy pack(s) |
|
| Default replacement mode |
|
| Low-confidence finding: |
|
| Below this a finding is "uncertain" |
|
| Below this a finding is ignored |
|
|
|
|
| spaCy model for the NER engine |
| random per process | Key for |
|
| Return the token map from redact tools (only for non-LLM clients) |
|
| Set |
|
| Idle sessions expire after this |
| – | Comma-separated terms always / never redacted |
| off | Audit records: types and counts only, never values |
Config file (see examples/gupt.config.json):
{
"policy": "dpdp,secrets",
"entity_modes": { "CREDIT_CARD": "mask" },
"entity_thresholds": { "URL": 0.9 },
"deny_list": ["Project Falcon", "Acme Hospital"],
"allow_list": ["support@yourcompany.com"],
"rules": [
{ "entity": "EMPLOYEE_ID", "pattern": "\\bEMP-\\d{5}\\b", "score": 0.9, "context": ["employee"] }
],
"field_hints": { "emp_code": "EMPLOYEE_ID" }
}Custom rules may borrow any built-in check digit by name ("check": "verhoeff", "luhn", "iban"…). Config supplies data, never code. A malformed config stops startup instead of silently weakening protection.
Security model, honestly
Fail-safe: a detection-engine error blocks the call. A low-confidence finding is redacted anyway (or blocks, with
on_uncertain=block). Overlapping findings are merged into their union, so no flagged byte leaks.Exact restore: tokens are unique and collision-checked against the input, and restore is single-pass, so
restore(redact(x)) == x. This is property-tested with Hypothesis across all reversible modes.Local only: no network calls, no telemetry. The vault lives in memory and is never written to disk.
Limits: no detector catches everything, and regexes cannot find a bare name in free prose (enable the NER engine, use field hints, or a deny-list). Text the user already pasted into the chat has already reached the model; Gupt protects files, downstream tools, logs and APIs. Gupt is one technical control, not a compliance certification (HIPAA, GDPR, DPDP compliance concern your whole system and organisation).
See docs/ARCHITECTURE.md and SECURITY.md.
Development
git clone https://github.com/parthagni22/gupt-mcp && cd gupt-mcp
pip install -e ".[dev]"
pytest && ruff check src testsAdding an identifier is a great first contribution: one Rule(...) in src/gupt_mcp/recognizers/, an optional validator in checksums.py, a catalog entry in entities.py, and a test row in tests/test_detection.py. Use synthetic data only.
License
MIT © parthagni22
Available Tools
11 toolsforget_sessionForget a sessionB
Delete a session's stored originals now. Its tokens can no longer be restored.
Inputs: session_id (required). Returns: object
gupt_statusGupt statusARead-onlyIdempotent
Server configuration and vault statistics (no sensitive values).
Inputs: no named parameters. Returns: object
list_entitiesList entity typesBRead-onlyIdempotent
List the sensitive-data types Gupt detects, and the policy packs.
Inputs: region, category. Returns: object
redactRedact textA
Replace PII/PHI/secrets in text with tokens. Returns redacted_text and a session_id; the original values stay in the server vault.
Inputs: text (required), mode, policy, session_id. Returns: object
redact_fileRedact a 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.
Inputs: path (required), mode, policy, overwrite, +3 more. Returns: object
redact_jsonRedact JSONA
Redact a JSON document while keeping its structure. Field names count as evidence: values under keys like 'name' or 'address' are redacted whole.
Inputs: data (required), mode, policy, session_id, +1 more. Returns: object
restoreRestore textARead-onlyIdempotent
Put the original values back into text. This reveals them in the conversation; prefer restore_file to write the result to disk.
Inputs: text (required), session_id (required). Returns: object
restore_fileRestore to a fileA
Restore real values and write the result to disk. The restored content is not returned, so the values never appear in the conversation.
Inputs: session_id (required), output_path (required), path, text, +1 more. Returns: object
restore_jsonRestore JSONBRead-onlyIdempotent
Put original values back into a redacted JSON document.
Inputs: data (required), session_id (required). Returns: object
scanScan textARead-onlyIdempotent
Report the sensitive data found in text (type, position, confidence, masked preview) without changing it.
Inputs: text (required), policy. Returns: object
scan_filesScan files for sensitive dataARead-onlyIdempotent
Audit a file or folder: per-file counts of PII/PHI/secrets with masked samples and line numbers. Raw values are never returned.
Inputs: path (required), policy, exclude, include, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Maintenance
Related MCP Connectors
Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.
Find and redact personal and sensitive data in text and documents, with reviewable redactions.
Detect and redact PII and secrets (API keys, tokens) in text, HTML or PDF before it reaches an LLM.
Classify data safety before storing or sharing. GDPR, HIPAA, PCI-DSS, CCPA. AI-powered.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to redact PII from text, summarize redacted content, and manage custom redaction patterns across multiple languages.-
- AlicenseNot gradedqualityDmaintenanceEnables sanitizing PII from text, classifying data into sovereignty zones, and monitoring compliance scores to keep sensitive information out of AI outputs.MIT
- AlicenseBqualityBmaintenanceEnables local, in-memory de-identification of PII, PHI, and credentials with deterministic reversible surrogate tokens before LLM transmission, then restores originals from volatile session mappings and audits for exposures without network egress or disk writes.51Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables local, in-memory sanitization of sensitive text before LLM ingestion by replacing PII, PHI, and credentials with deterministic reversible tokens, then restoring the originals in responses. It also audits content for exposed secrets and PII and provides compliance receipts without external network egress or disk writes.10 npm1Apache 2.0