# Secret

> Secret is an open-source MCP server for security. Let coding agents use credentials by key name without reading their values. It runs locally on your machine and is started by your AI client.

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

## About

Secret is a local credential CLI with a names-only MCP server and a guard hook. The agent asks for a credential by key name, the CLI hands the chosen value straight to the program's environment, and secret run redacts loaded literal values from stdout and stderr. The MCP server exposes only key names, labels and paths for explicitly approved stores and never returns values.

You stash values yourself in a terminal with a hidden prompt. Agents may use show and run but must never enter or retrieve values. The MCP server is registered with an absolute path and an exact store reference that a human approved, such as a file store. There are also encrypted age stores and pass stores, and an exec command that launches other MCP servers with selected values, which the README says is unfiltered and can disclose values.

The README calls this accident prevention, not a sandbox. Redaction misses encodings such as base64 or URL encoding, the guard cannot contain a determined agent, and metadata can reveal names, labels, paths and account IDs. It is GPL-3.0-or-later and ships as a Claude Desktop MCPB bundle.

## Features

- **Names-only MCP:** Agents see key names, labels and paths, never values.
- **Direct injection:** Selected values go to a program's environment without passing through the agent.
- **Output redaction:** secret run redacts loaded literal values from stdout and stderr.
- **Guard hook:** Denies known store-reading operations in Claude Code and Codex.
- **Multiple stores:** Env files, encrypted age stores and pass stores.
- **Cross-platform:** Linux, macOS and Windows installers.

## Good for

- Run a deploy script that needs an API token without exposing it
- Let an agent list which credentials exist
- Launch another MCP server with a secret value
- Block agents from reading credential files

## Install

### Claude Code (Terminal)

```sh
claude mcp add secret -- npx -y https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "secret": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "secret": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "secret": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "secret": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "secret": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb"
      ]
    }
  }
}
```

## Tools

- `list`: Lists key names in an approved store.
- `show`: Shows names, labels and paths without values.
- `diff`: Compares store metadata.
- `health`: Checks the setup and store status.

## FAQ

### Can the agent read my secrets?

Not through the names-only interface, which never returns values. The README adds that this is accident prevention, not a sandbox.

### What does redaction miss?

Base64, URL encoding, substrings and other transformations.

### How do I store a value?

Run secret stash in your own terminal with a hidden prompt.

### What licence is Secret?

GPL-3.0-or-later.

### Is Secret free?

Yes. Secret is open source, so you can use and self-host it for free.

### How do I add Secret to Claude Code?

Run this command in your terminal: claude mcp add secret -- npx -y https://github.com/avhn/secret/releases/download/v0.6.2/secret-v0.6.2-desktop.mcpb

### What are the best alternatives to Secret?

The closest alternatives to Secret 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.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers 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.

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