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 コンテキストや永続化されたトランスクリプトに到達したら、シークレットは事実上外部に持ち出されたことになります。
このサーバーは、決定的に次の問いに答えます:
このテキストにはどのシークレットが含まれているか、そしてどこかに送信される前に安全に redact できるか?
Related MCP server: ai-security-gateway-mcp
検出カバレッジ(決定的プロファイル)
ファミリー | 例 |
AI プロバイダーキー |
|
クラウド / GitHub |
|
ID / 認証 | JWT( |
代入 |
|
エンドポイント / DSN | Discord ウェブフック、Slack |
スキャンはシークレットの値を決して返しません—型、数、位置のみを返します。これはテストによって強制される厳格な安全契約です。
ツール(MCP)
ツール | 目的 |
| redact / mask / hash でシークレットを処理し、スクラブ済みテキストを返します(値を返すことはありません) |
| どのシークレットタイプが存在するかを検出します(変更は行いません) |
| スキャンと redact を一度の呼び出しで行い、スクラブ済みプレビューと検出結果を返します |
| サポートされているすべての検出プロファイルを一覧表示します |
モード:
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" }
}}Streamable 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 のコアチェック(検出、編集(redaction)、決定性、無漏洩契約、良性/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 deployed
Maintenance
Related MCP Connectors
Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.
Secrets for developers and agents—secure context and workflows without exposing secret values.
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Detects and redacts PII (emails, phones, SSNs, names, addresses) from text. $0.02/call via x402.
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
- AlicenseAqualityAmaintenanceSanitizes text and files by removing PII, secrets, and custom patterns locally before sending to LLMs, with optional reverse-scrubbing.31,224 npm2MIT
- FlicenseAqualityCmaintenanceDetects and redacts sensitive personal information such as names, emails, phone numbers, ID numbers, and locations in text before it is processed by AI agents, using configurable mask, hash, or remove strategies.1-