mcp-secret-scrub
Detects and redacts Discord webhook URLs in text, returning only the secret type, count, and position without exposing the value.
Detects and redacts GitHub tokens such as ghp_, gho_, ghu_, ghs_, ghr_, and github_pat_ credentials.
Detects and redacts Redis connection strings to prevent credential leakage in logs or agent context.
Detects and redacts Slack tokens (xox...) and related credentials in text.
Click on "Install 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., "@mcp-secret-scrubscrub secrets from this log before it goes to the agent"
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.
mcp-secret-scrub
mcp-name: io.github.sudo-ai-git/mcp-secret-scrub
Deterministic, no-LLM MCP server that scrubs secrets from text, logs, and transcripts before they enter agent context — and never leaks the value.
No LLM. No network. Pure structural detection. MIT. Crown-jewel-free.
The problem it solves
Before you hand raw text to an agent (or store it, or pass it to a tool), you
often don't know whether it contains a live secret. Platform scrubbers miss
patterns all the time — a private key, an nvapi- token, a github_pat_
token, an api_key= assignment mid-log. If that text reaches an LLM context
or a persisted transcript, the secret is effectively exfiltrated.
This server answers, deterministically:
Which secrets are in this text, and can you redact them safely before it goes anywhere?
Related MCP server: ai-security-gateway-mcp
Detection coverage (deterministic profiles)
family | examples |
AI provider keys |
|
Cloud / GitHub |
|
Identity / auth | JWTs ( |
Assignments |
|
Endpoints / DSNs | Discord webhooks, Slack |
The scan never returns the secret value — only its type, count, and position. That is a hard safety contract, enforced by test.
Tools (MCP)
tool | purpose |
| redact / mask / hash secrets; returns scrubbed text (never the value) |
| detect which secret types are present (no mutation) |
| scan + redact in one call, scrubbed preview + findings |
| list all supported detection profiles |
Modes:
redact(default) →[REDACTED:TYPE]mask→ shows first 4 + last 2 charshash→ deterministic SHA-256 prefix (reproducible across calls)
Quick start (stdio)
pip install mcp-secret-scrub
mcp-secret-scrub # stdio (default)Or via uv/pipx for an installable console entry:
pipx install mcp-secret-scrubMCP client config:
{ "mcpServers": {
"secret-scrub": { "command": "mcp-secret-scrub" }
}}Streamable HTTP (remote / Smithery-publishable)
python3 mcp_server.py --http --port 8138 # serves on http://<host>:8138/mcp/Determinism & safety guarantees
Deterministic: same input → identical output in every mode, every call.
Never leaks:
scan_textandscrub_textnever emit the original token;_deterministic_hashis SHA-256 (no salt) so output is reproducible.No LLM, no network: pure regex + reachable structure detection.
Input-safe: non-string input returns a clean error, not a traceback.
Verification
python3 test_detector.py— 14/14 core checks (detection, redaction, determinism, no-leak contract, benign/unicode/empty input, bad-mode)python3 test_e2e.py— drives the real MCP stdio transport and asserts the secret does NOT cross the wire
License & provenance
MIT. Part of the sudo-ai-git deterministic no-LLM agent-trust MCP family
(mcp-skill-sec · mcp-verify-claim · mcp-benchmark-hygiene ·
mcp-secret-scrub).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseAqualityBmaintenanceEnables AI agents to scan text for leaked secrets and prompt injection markers, and redact them before reaching an LLM.21MIT- AlicenseAqualityDmaintenanceScans prompts for PII and masks or redacts sensitive data locally before sending to an LLM, supporting multiple anonymization modes.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to redact PII from text, summarize redacted content, and manage custom redaction patterns across multiple languages.
- AlicenseAqualityBmaintenanceSanitizes text and files by removing PII, secrets, and custom patterns locally before sending to LLMs, with optional reverse-scrubbing.31141MIT
Related MCP Connectors
Deterministic trust gate for AI output: leaked-secret, prompt-injection & PII in one call.
PII scanning and redaction receipts for LLM traces and tool payloads.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sudo-ai-git/mcp-secret-scrub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server