Secret Sentinel
Scan code, commits and MCP configs for API keys, and redact secrets before they leak
Secret Sentinel is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, macOS
- Runs
- Locally
- Version
- 0.3.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-secret-sentinel -- uvx mcp-secret-sentinelAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-secret-sentinel": {
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-secret-sentinel": {
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-secret-sentinel": {
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-secret-sentinel": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-secret-sentinel -- uvx mcp-secret-sentinelOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-secret-sentinel]
command = "uvx"
args = ["mcp-secret-sentinel"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-secret-sentinel": {
"command": "uvx",
"args": [
"mcp-secret-sentinel"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Or run: gemini mcp add -s user mcp-secret-sentinel uvx -- mcp-secret-sentinel
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-secret-sentinel": { "command": "uvx", "args": [ "mcp-secret-sentinel" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Secret Sentinel
Secret Sentinel is a local guard for AI coding agents. It runs 64 base64-aware detectors, never shows a full secret in output, and makes no network calls and needs no account. Agent hooks for Claude Code, Codex and Cursor deny tool calls that write a key into a tracked file or command, block prompts that contain a key, and replace secrets in tool output with a redaction marker before the model sees them. Writes to git-ignored files such as a local .env are allowed, and edits to its own config ask for confirmation so an agent cannot quietly loosen the guard.
The MCP tools scan raw text, files, directories, staged changes, a push range, recent git history and agent or MCP client config files such as .mcp.json, and a redact_text tool masks secrets in logs. All are read-only and return the same structure with severity and remediation advice. By default hooks block high and critical findings, and anything unexpected fails open so the hook cannot wedge the agent.
It also ships a CLI, a pre-commit hook and a GitHub Action, installs from PyPI or as a Claude Code plugin, and offers three prompts plus a patterns resource. The README cites an external report on rising leaked-secret counts to explain the motivation.
Tools this server provides (9)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 9 tools reads data; 8 names don't say.
From the server's own tool labels and tool names; not verified by us.
- scan_text
- Scan a raw snippet for secrets.
- scan_file
- Scan one file for secrets.
- scan_directory
- Scan a directory recursively.
- scan_git_staged
- Scan lines in staged git changes.
- scan_git_range
- Scan commits in a git range such as the next push.
- scan_git_history
- Scan lines added by recent commits.
- scan_agent_configs
- Audit MCP client configs and agent instruction files.
- redact_text
- Replace every secret in text with a redaction marker.
- list_patternsName suggests: reads
- List active detectors, severity and advice.
What it does
- 64 detectors
- Finds API keys, tokens, private keys and passwords, including base64-encoded.
- Agent hooks
- Block risky tool calls and prompts, and redact tool output.
- Git-aware scans
- Checks staged changes, push ranges and history.
- Agent config audit
- Reviews MCP client and instruction files for keys.
- Redaction
- Masks secrets while keeping the rest of the text.
- Fully local
- No account and no network calls.
Good for
- Stop an agent from committing an API key
- Audit .mcp.json and similar files for leaked secrets
- Check what the next git push would publish
- Mask secrets in logs before sharing them
Pricing
Open source
Open-source Python package
Secret Sentinel FAQ
Does Secret Sentinel send data anywhere?
No, it makes no network calls and needs no account.
Which agents have hooks?
Claude Code, Codex and Cursor.
What severity does Secret Sentinel block by default?
High and critical findings; medium ones pass unless you use a stricter setting.
Does Secret Sentinel print the secret it finds?
No, the full value never appears in output.
Is Secret Sentinel free?
Yes. Secret Sentinel is open source, so you can use and self-host it for free.
How do I add Secret Sentinel to Claude Code?
Run this command in your terminal: claude mcp add mcp-secret-sentinel -- uvx mcp-secret-sentinel
What are the best alternatives to Secret Sentinel?
The closest alternatives to Secret Sentinel are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


