secretscan
secretscan-mcp-server
diff、ファイルの内容、または貼り付けられたスニペットをスキャンして、誤ってコミットされたシークレットを検出する MCP サーバーです。これにより、MCP互換のエージェントは、コミット、PRの開始、またはログの抜粋をどこかに貼り付ける前に、自身の変更を自己チェックできます。完全にローカルで動作し、APIキーもネットワーク呼び出しも不要で、MCP SDKとZod以外の依存関係はありません。
なぜ
漏えいした認証情報は、アカウントやインフラの侵害の最も一般的な原因の1つであり、大きなdiffの中で犯しやすいミスの1つです。実際のAPIキーを含むデバッグ用のconsole.log、誤ってコミットされた設定ファイル、助けを求めるためにチャットに貼り付けられた.envなどです。コミット、プッシュ、またはテキスト共有をしようとしているエージェントは、手軽にチェックする方法があれば、その前にこれを検出するのに適した位置にあります。
Related MCP server: opzyai
ツール
scan_for_secrets
固定されたプロバイダー形式のシグネチャに加えて、一般的なエントロピーでゲートされたヒューリスティックを使用してテキストをスキャンします:
検出器 | 検出内容 |
| AWSアクセスキーID( |
| AWSシークレットキー(文脈上ラベル付けされている場合) |
| GitHub PAT( |
| Slackトークン( |
| Stripeのシークレットキー/公開可能キー |
| Google APIキー( |
| npm公開トークン( |
| PEM秘密鍵ブロック |
| JSON Webトークン |
| シークレットらしい変数名( |
検出結果は常にマスクされます -- AKIAIOSFODNN7EXAMPLE は AKIA************MPLE (20 chars) として報告され、完全な形では決して報告されません。したがって、ツール自体の出力は、見つかったものをさらに拡散することなく、ログや表示に安全に使用できます。
これは固定パターン+ヒューリスティックスキャンであり、網羅的ではありません。クリーンな結果は「既知のパターンに一致しなかった」という意味であり、「絶対に安全」という意味ではありません。アプリ内の出力にはその旨が明示されています。
インストールと設定
git clone https://github.com/wedo911/secretscan-mcp-server.git
cd secretscan-mcp-server
npm install
npm run buildMCPクライアントの設定に追加します(例:claude_desktop_config.json、またはClaude Codeのプロジェクトの.mcp.json):
{
"mcpServers": {
"secretscan": {
"command": "node",
"args": ["/absolute/path/to/secretscan-mcp-server/dist/index.js"]
}
}
}テストを実行する
npm run build
node --test tests/entropy.test.mjs tests/detectors.test.mjs24のテストがあり、名前付きの各検出器、汎用検出器のプレースホルダーおよび低エントロピーフィルタリング動作、そしてマスクされた出力に完全なシークレット値が含まれないことを明示的にチェックするテストが含まれています。
クライアントなしで試す
npx @modelcontextprotocol/inspector --cli node dist/index.js \
--method tools/call --tool-name scan_for_secrets \
--tool-arg text='aws_access_key_id = AKIAIOSFODNN7EXAMPLE'(これはAWSの公式公開ドキュメントに記載されている例のキーであり、実際の認証情報ではありません。)
ライセンス
MIT — LICENSEを参照してください。
Maintenance
Tools
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables scanning diffs or code blobs for leaked secrets, returning a verdict with severity and masked findings, all processed locally with no data sent externally.1MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first security check for AI coding agents — finds hardcoded secrets, exposed .env files, git-history leaks and vulnerable dependencies (OSV), entirely on your machine. Ask your agent "is this safe to ship?" and get a Launch Readiness score with a fix for every finding.MIT
- AlicenseNot gradedqualityAmaintenanceScans text and files for common secrets (AWS, GitHub, etc.) and redacts them to prevent credential leakage in AI-assisted development. Runs entirely locally with no telemetry.MIT
- AlicenseAqualityDmaintenanceScans projects for hardcoded secrets, unprotected .env files, and console.log leaks to prevent credential exposure.544MIT
Related MCP Connectors
Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
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/wedo911/secretscan-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server