3 v0.3.0 更新于 2026-10-19
Secret Sentinel MCP Server
Local secret guardrails: scan code, git changes and MCP configs for API keys; redact text
适用客户端
本地客户端
Claude Desktop、Claude Code、Cursor、Cline 等支持本地 MCP 的客户端
安装配置
本地运行(pypi)
{
"mcpServers": {
"mcp-secret-sentinel": {
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}将上方 JSON 加入 MCP 客户端配置(如 Claude Desktop 的 claude_desktop_config.json 或项目的 .mcp.json)即可接入;远程接入按客户端要求填写 URL 与鉴权头。
提供的工具 接入后 Agent 可调用这 9 个工具
scan_text
扫描原始文本片段(代码、配置、diff、日志)中的密钥并返回发现结果
scan_file
扫描单个文件中的密钥,自动解码 UTF-8/16/32 并跳过二进制和超大文件
scan_directory
递归扫描目录中的密钥,在 git 仓库内遵循 .gitignore 等排除规则
scan_git_staged
扫描 git 暂存区新增内容,即下次提交将发布的行
scan_git_range
扫描 git 提交区间(默认为上游到 HEAD)中新增的密钥,即下次 push 将发布的内容
scan_git_history
扫描最近 N 次提交(可含所有分支、标签和 stash)中新增的密钥并标注提交信息
scan_agent_configs
审计 MCP 客户端配置和 agent 指令文件中的密钥
redact_text
将文本中的所有密钥替换为 [REDACTED:<detector>] 并返回替换详情
list_patterns
列出启用的检测器、严重级别、修复建议及允许清单规则