Server data from the Official MCP Registry
Sub-millisecond reversible PII & secret anonymizer in Rust for LLMs, agents, and MCP
About
Sub-millisecond reversible PII & secret anonymizer in Rust for LLMs, agents, and MCP
Security Report
Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.
13 files analyzed · No issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Install command not verified. See the repository for install instructions.
View repositoryDocumentation
View on GitHubFrom the project's GitHub README.
🛡 pii-veil: Ultrafast Reversible PII & Secret Anonymizer
[!IMPORTANT] Need Enterprise On-Premise deployment, SOC2/HIPAA compliance logs, or custom rules? Contact our enterprise security and infrastructure team at founder@glastor.es for on-premise air-gapped VPCs, custom compliance rules, and SLAs.
pii-veil is a sub-millisecond, zero-bloat Rust engine for detecting, anonymizing, and restoring PII and secrets across LLM prompts, MCP agents, HTTP/SSE proxies, JSON/NDJSON logs, CSVs, and multi-gigabyte SQL dumps.
Designed with the 6-in-1 Multi-Market Architecture:
crates/veil-core(crates.iolibrary:pii-veil-core)crates/veil-cli(crates.io/ Homebrew CLI binary + built-in MCP Server & HTTP/SSE Proxy:veil)crates/veil-ffi(crates.ioC-ABIcdylib/staticlib+pii_veil.h:pii-veil-ffi)crates/veil-py(PyPIpackage viaPyO3&maturin:glastor-pii-veil)crates/veil-node(npmpackage vianapi-rs:pii-veil-node)sdks/go(Go SDK +net/httpDLP middleware + Rustveil mcpbridge:github.com/glastor-core/pii-veil/sdks/go)
✨ Key Capabilities
- Reversible LLM Roundtrip & Real-Time SSE Streaming (
PlaceholderMode): Replaces sensitive data with semantic tokens ([EMAIL_1],[CREDIT_CARD_1],[IBAN_1]), restores full responses in $O(N)$ viaaho-corasick, or restores live UTF-8 token streams chunk-by-chunk ([EMA+IL_1]) viaStreamingRestorerwith a pre-compiled automaton cache. - Built-in Model Context Protocol (
veil mcp) & Enterprise HTTP/SSE Proxy (veil proxy):veil mcp: Zero-dependency JSON-RPC 2.0 MCP server overstdioexposingveil_redact(preserving fullVeilPolicyacross mode overrides),veil_restore,veil_redact_json, andveil_scandirectly to Claude Desktop, Cursor, and Windsurf.- Official MCP Registry Name:
mcp-name: io.github.glastor-core/pii-veil veil proxy: Production-ready HTTP/SSE reverse proxy (127.0.0.1:8080) with per-request isolated vaults, optional multi-turn TTL sessions (X-Veil-Session-Id,--session-ttl),10 MiB413DoS protection, and Zero-PII PrometheusGET /metrics(counters, active sessions gauge, microsecond latency histogram).
- 19 Built-in Detectors & 12 Global National IDs (
100.00%Precision /100.00%Recall onaccuracy_eval):- Financial: Credit Cards (IIN/BIN + Luhn checksum) and IBANs (ISO 13616 Mod-97 checksum).
- Global National IDs: US SSN, Spain DNI/NIE (Mod-23), Argentina CUIT/CUIL (AFIP prefix + Mod-11), Chile RUT (Mod-11), Brazil CPF & CNPJ (dual Mod-11), Mexico CURP (RENAPO Mod-10), Canada SIN (Luhn), UK NINO (HMRC rules), India Aadhaar (Verhoeff dihedral checksum) & PAN, and Germany Steuer-ID (ISO/IEC 7064 Mod 11,10).
- Cloud, AI & Infra Secrets: Database Connection URIs (
postgres://,mysql://,mongodb+srv://,redis://), Slack/Discord Webhooks, OpenAI, Anthropic, AWS, GitHub, Slack, Google API, Stripe keys (filtered with $O(N)$ Shannon entropy & anti-placeholder checks), JWTs, and PEM Private Keys. - Network & Contact: Emails (asset-extension filtered), Phones (date/port/repeat filtered), IPv4 (version & leading-zero filtered), IPv6 (
Ipv6Addr+ context guard), and MAC addresses.
- SARIF 2.1.0 Code Scanning (
veil scan --format sarif): Emits GitHub Code Scanning SARIF 2.1.0 reports with zero raw PII leakage in alert messages. - Layered Defense NER Opt-in (
NerDetectortrait &--features ner): Plug in custom ONNX/Candle models viaVeilEngine::with_ner_detector(...), or enable--features nerfor the built-in zero-downloadHeuristicNerDetector(EN/ESPERSONnames &ADDRESSlocations) without bloating the default< 15 MBbinary. - Authenticated Encrypted Vaults (
--vault-pass): Export and restore.vaultfiles encrypted and authenticated with PBKDF2-HMAC-SHA256 + ChaCha20-Poly1305 AEAD (version: 2) for safe storage in Redis, S3, or disk. - Constant-Memory Streaming (
Lines,NDJSON,SQL,CSV): Anonymize and restore multi-gigabytepg_dumpSQL streams (COPY ... FROM stdin), column-aware.csvfiles, and.jsonllogs in $O(1)$ memory per line.
🚀 Quickstart
1. Interactive Demo & Benchmark (Rust CLI)
cargo run --release -p pii-veil-cli -- demo
cargo run --release -p pii-veil-cli -- bench
2. Local HTTP/SSE DLP Proxy (veil proxy)
# Start in local LLM echo/SSE simulator mode (or pass --upstream host:port)
veil proxy --listen 127.0.0.1:8080 --echo
3. Redact & Restore with Encrypted Vault (--vault-pass)
# Redact text and save an authenticated encrypted vault
veil redact \
--text "Charge maria@startup.io (CUIT 20-12345678-6) on card 4532-0151-1283-0366" \
--vault-out vault.enc \
--vault-pass "my-secret-passphrase"
# Restore original values from LLM response
veil restore \
--text "Invoice sent to [EMAIL_1] (tax ID [NATIONAL_ID_1]) for card [CREDIT_CARD_1]." \
--vault vault.enc \
--vault-pass "my-secret-passphrase"
4. Stream Multi-GB SQL Dumps, CSVs, or NDJSON Logs
# Anonymize a PostgreSQL dump with deterministic synthetic data (Luhn & Mod-97 valid)
pg_dump mydb | veil stream --format sql --mode synthetic --key "prod-seed" > anon_dump.sql
# Anonymize a CSV file (detects sensitive column headers like password/api_key + regex PII)
veil stream --input users.csv --output anon_users.csv --format csv --vault-out csv.vault
# Stream-restore a huge file in O(1) memory per line
veil restore --file anon_users.csv --output restored_users.csv --vault csv.vault --stream
5. Go SDK (sdks/go)
cd sdks/go
go test -v ./...
6. GitHub Action (glastor-core/pii-veil@v1)
Use pii-veil as a sub-millisecond DLP gatekeeper in any GitHub Actions workflow:
- name: 🛡 PII & Secret DLP Audit
uses: glastor-core/pii-veil@v1
with:
path: "."
exclude: "examples,tests"
fail-on-detect: "true"
7. MCP Server Setup (Claude Desktop, Cursor & Windsurf)
pii-veil ships with a zero-dependency Model Context Protocol (MCP) server (veil mcp) over stdio exposing four tools: veil_redact, veil_restore, veil_redact_json, and veil_scan.
Official MCP Registry identifier: mcp-name: io.github.glastor-core/pii-veil
Add to your claude_desktop_config.json, Cursor (~/.cursor/mcp.json), or Windsurf MCP config:
Using the native Rust binary (cargo install pii-veil-cli):
{
"mcpServers": {
"pii-veil": {
"command": "veil",
"args": ["mcp"]
}
}
}
Using Docker (< 15 MB Distroless image):
{
"mcpServers": {
"pii-veil": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/glastor-core/pii-veil:latest", "mcp"]
}
}
}
8. Accuracy Evaluation, SARIF 2.1.0, Fuzz Testing & SemVer Verification
# Run verifiable Precision / Recall / F1 & adversarial false-positive gate (100% / 100%)
cargo test -p pii-veil-core --test accuracy_eval -- --nocapture
# Scan a repository and emit a zero-PII SARIF 2.1.0 report for GitHub Code Scanning
veil scan --path . --exclude "examples,tests" --format sarif > pii-veil.sarif
# Run multi-thousand iteration fuzz smoke test across all boundary conditions
cargo test -p pii-veil-core --test fuzz_smoke
# Enable optional Tier-1 Layered Defense NER (EN/ES Person Names & Street Addresses)
cargo test -p pii-veil-core --features ner
Every pull request is mathematically audited by GLASTOR Specter against Trojan Breaking Changes. Read our SemVer Stability & Specter Contract Guarantee.
📊 Scientific Benchmarks & Independent Reproducibility
| DLP Engine / Solution | Latency (p99) | RAM Footprint | LLM SSE Streaming | Network Egress | Cost Model |
|---|---|---|---|---|---|
| pii-veil (Rust / WASM) | ~100 µs (0.1 ms) | < 15 MB | ✅ Native Token-by-Token | 0 (100% In-Process) | Open Source (Apache-2.0 / MIT) |
| Microsoft Presidio (Python) | ~35,000 µs (35 ms) | ~1,200 MB (spaCy) | ❌ High buffer latency | Local Python server | High Cloud Server Costs |
| AWS Comprehend DLP | ~120,000 µs (120 ms) | N/A (Cloud API) | ❌ No streaming | External Cloud Egress | $0.0001 per unit (Metered) |
| Google Cloud DLP | ~150,000 µs (150 ms) | N/A (Cloud API) | ❌ No streaming | External Cloud Egress | $3.00 per GB inspected |
🐳 Reproduce on your own hardware: Don't trust self-reported numbers. Run the built-in apples-to-apples Docker +
k6suite comparingpii-veilvs. Microsoft Presidio under identical2 vCPUs / 2 GiB RAMquotas right from this repo (cd benchmarks/presidio-vs-veil && ./run-pii.sh), or viaglastor-core/benchmarks/pii-dlp.For in-depth statistical Criterion reports (AVX2/NEON micro-benchmarks), see BENCHMARKS.md.
📂 Production Examples (examples/)
examples/python_fastapi_llm_streaming.py— FastAPI + OpenAI/Anthropic SSE streaming withStreamingRestorerand encrypted Vaults.examples/typescript_nextjs_ai_sdk.ts— Next.js / Vercel AI SDKTransformStreamwithVeilStreamingRestorer.examples/go_http_dlp_middleware.go— Gonet/httpDLP middleware (piiveil.NewDlpMiddleware) & SSE restorer.examples/git_pre_commit_hook.sh— Git pre-commit DLP hook powered byveil scan --fail-on-detect.
⚖ Trade-offs & Limitations
pii-veil is intentionally engineered for deterministic, sub-millisecond protection rather than probabilistic NLP:
- Structured PII & Infrastructure Secrets (Tier-0 Fast Path): Emails, payment cards (Luhn), IBANs (Mod-97), regional national IDs (SSN, DNI/NIE, CUIT/CUIL, RUT), API keys, JWTs, PEM keys, and database URIs achieve near-zero false positives at
~100 µslatency and< 15 MBRAM. - Unstructured Free-Text Names & Addresses (The Layered Defense Pattern): Rather than forcing 100% of traffic through heavy 500+ MB transformer models (which adds 50 ms of artificial lag and consumes massive GPU compute), enterprise teams use
pii-veilas the Fast-Path Gatekeeper that eliminates 90%+ of structured risk, delegating only residual or flagged unstructured text to local quantized NER models (ONNX / Candle). See our architectural guide: Layered Defense & NER Architecture. - Encrypted Vaults & Stateless Scaling: Reversible restoration requires passing or persisting the encrypted
.vault(e.g., in Redis or request-scoped memory) across distributed workers.
🏢 Enterprise & Commercial Support
Are you deploying LLMs or AI agents in production and need guaranteed compliance with GDPR, HIPAA, PCI-DSS, or SOC 2?
We offer enterprise licenses and dedicated infrastructure solutions:
- On-Premise & Air-Gapped Deployments: Hardened Kubernetes Helm charts, high-availability sidecars, and zero-external-egress setups for banks, healthcare, and fintech.
- Enterprise SIEM & Telemetry: Live audit streaming to Datadog, Splunk, AWS CloudWatch, and OpenTelemetry collector endpoints.
- Custom DLP Detectors & Proprietary Rules: Tailored regex patterns, custom checksum algorithms, and domain-specific sensitive data classifications.
- 24/7 SLA & Architecture Review: Priority engineering support, guaranteed response times, and LLM streaming pipeline benchmarking.
📩 Need Enterprise On-Premise deployment, SOC 2 / HIPAA compliance logs, or custom rules? Contact us directly at: founder@glastor.es
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
