mcp-secret-scrub
mcp-secret-scrub
mcp-name: io.github.sudo-ai-git/mcp-secret-scrub
确定性的、无 LLM 的 MCP 服务器,可在文本、日志和转录内容进入代理上下文之前清除其中的机密——并且绝不泄露机密值。
无 LLM。无网络。纯结构化检测。MIT 许可。不含核心机密。
它解决的问题
在将原始文本交给代理(或存储它、或将其传递给工具)之前,你往往不知道其中是否包含有效的机密。平台级清除器经常漏掉各种模式——私钥、nvapi- 令牌、github_pat_ 令牌、日志中段的 api_key= 赋值。如果这些文本进入 LLM 上下文或持久化的转录内容,机密实际上就等于被泄露了。
该服务器以确定性的方式回答:
这段文本中有哪些机密?在它被发送到任何地方之前,你能安全地将其编辑掉吗?
Related MCP server: ai-security-gateway-mcp
检测覆盖范围(确定性检测配置)
类别 | 示例 |
AI 提供商密钥 |
|
云服务 / GitHub |
|
身份 / 认证 | JWT( |
赋值 |
|
端点 / DSN | Discord Webhook、Slack |
扫描绝不返回机密值——只返回其类型、数量和位置。这是一项硬性安全契约,由测试强制执行。
工具(MCP)
工具 | 用途 |
| 编辑 / 掩码 / 哈希机密;返回清除后的文本(绝不返回机密值) |
| 检测存在哪些机密类型(不进行修改) |
| 一次调用完成扫描 + 编辑,返回清除后的预览 + 发现结果 |
| 列出所有受支持的检测配置 |
模式:
redact(默认)→[REDACTED:TYPE]mask→ 显示前 4 个 + 后 2 个字符hash→ 确定性 SHA-256 前缀(跨调用可重现)
快速开始(stdio)
pip install mcp-secret-scrub
mcp-secret-scrub # stdio (default)或者通过 uv/pipx 安装可用的控制台入口:
pipx install mcp-secret-scrubMCP 客户端配置:
{ "mcpServers": {
"secret-scrub": { "command": "mcp-secret-scrub" }
}}流式 HTTP(远程 / 可发布到 Smithery)
python3 mcp_server.py --http --port 8138 # serves on http://<host>:8138/mcp/确定性与安全保证
确定性:相同输入 → 每种模式、每次调用都产生完全相同的输出。
绝不泄露:
scan_text和scrub_text绝不输出原始令牌;_deterministic_hash使用 SHA-256(无盐),因此输出可重现。无 LLM、无网络:纯正则表达式 + 可达结构检测。
输入安全:非字符串输入返回干净的错误,而不是堆栈回溯。
验证
python3 test_detector.py— 14/14 项核心检查(检测、编辑、确定性、不泄露契约、无害/Unicode/空输入、错误模式)python3 test_e2e.py— 驱动真实的 MCP stdio 传输,并断言机密不会通过线路传输
许可证与来源
MIT 许可。属于 sudo-ai-git 确定性无 LLM 代理信任 MCP 系列的一部分(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.32912MIT
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