# Secret Sentinel

> Secret Sentinel is an open-source MCP server for security. Scan code, commits and MCP configs for API keys, and redact secrets before they leak. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/alebrito124356/mcp-secret-sentinel
- **MCP Registry name:** io.github.AleBrito124356/mcp-secret-sentinel
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-secret-sentinel -- uvx mcp-secret-sentinel
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-secret-sentinel -- uvx mcp-secret-sentinel
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-secret-sentinel]
command = "uvx"
args = ["mcp-secret-sentinel"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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 (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-secret-sentinel": {
      "command": "uvx",
      "args": [
        "mcp-secret-sentinel"
      ]
    }
  }
}
```

## Tools

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_patterns` (name suggests: reads): List active detectors, severity and advice.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/secret-sentinel
