secretmgr
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
secretmgr
Keep secrets out of AI agent chats. A local vault, a dashboard, shell integration and an MCP server.
Instead of pasting DATABASE_URL=... into Claude Code, you store it once. The agent writes
PGPASSWORD="$PG_PASS" psql ..., the shell expands the variable, and the value never appears in the
conversation. Output is redacted on the way back.
Quick start
Requires Node 22 or newer.
npm install
npm run build:dashboard # builds the React UI into dashboard/dist
npm link # puts `secretmgr` on your PATH (optional)
secretmgr init # vault + shell hooks + Claude Code hook and MCP server (asks first)
secretmgr dashboard # prints a one-time URL; open itOpen a new terminal afterwards. secretmgr uninstall removes every hook; your vault is left alone.
Related MCP server: vault-mcp
How it works
Piece | What it does |
Vault |
|
Groups and environments | A group (a project) holds environments ( |
Your terminals |
|
Agent Bash commands | A Claude Code |
MCP server |
|
Kill switch | Dashboard button or |
Two environments at once
Every active environment exposes suffixed names (PG_PASS__DEV, PG_PASS__PROD). The primary environment also
exposes the plain name (PG_PASS).
Guidance per environment
Each environment has a guidance level the agent is told when it calls activate_env, and which every command
banner repeats ([secretmgr env=dev:FULL*,prod:READ-ONLY]):
Read-only: only read; change nothing; stop and ask.
Write: may write; no destructive operations.
Full: may operate; ask before anything destructive.
With Enforce on, the Bash hook also blocks commands that reference that environment's variables and look mutating (read-only) or destructive (write): SQL, redis-cli, kubectl, terraform, helm, docker, git push, aws, curl with a write method, migration tools. Full only advises.
Commands
secretmgr init | install | uninstall | dashboard
secretmgr use <env> [group] (shell function) load an environment into this terminal
secretmgr unload (shell function)
secretmgr shell --env <env> subshell with an environment loaded
secretmgr set KEY --env dev value from a hidden prompt or stdin, never argv
secretmgr import .env --env dev [--dry-run] [--delete-source]
secretmgr export --env dev (interactive terminals only)
secretmgr reveal KEY --env dev (interactive terminals only)
secretmgr list --env dev | group create <name> | group list | status
secretmgr kill [--off]What this protects against, and what it does not
It prevents accidental exposure and prompt-injection-driven exfiltration through the chat. It is not a sandbox.
The agent runs as your OS user. A determined agent could try to read the key file or the keychain. Keep
prodatnonefor agents, use read-only database users, and turn on approval for sensitive environments.Redaction matches known values and their base64, URL-encoded and JSON-escaped forms. A command that transforms a value (
echo $X | rev) can defeat it. The Bash hook blocks the obvious print commands (env,printenv,echo $SECRET, reads of~/.secretmgr), but that list is a heuristic.Guidance enforcement is a heuristic over the command text. It cannot see SQL inside a file, or a script that does something harmful. Use real permissions (database roles, IAM) for hard guarantees.
secretmgr env,revealandexportrefuse to run without an interactive terminal, so the agent's Bash tool cannot call them.The dashboard binds to
127.0.0.1, needs a one-time bearer token, and checksHostandOriginheaders.Output is only redacted for secrets the vault knows. A secret you pasted into the chat earlier is already in the context.
Status
Tested on Linux (bash, zsh) with automated tests (npm test): vault, redaction, policy, Bash wrapper, hook,
shell hooks, installer, API, MCP over stdio, guidance rules.
Written but not tested on real systems: macOS Keychain, Windows DPAPI, PowerShell, fish, cmd (sm), the
macOS and Windows terminal launchers for "Open shell".
Claude Code hook behaviour to verify on your version (claude --debug): the hook returns updatedInput
nested inside hookSpecificOutput. By default it does not set permissionDecision, so your normal permission
prompts stay in charge. To auto-approve wrapped commands, set {"hookAutoApprove": true} in ~/.secretmgr/config.json.
Releasing
Releases are published by GitHub Actions with npm trusted publishing (no stored token) and signed provenance:
npm version patch # or minor / major: bumps package.json, commits, tags
git push --follow-tags # the tag triggers .github/workflows/release.ymlDevelopment
npm test # unit and end-to-end tests (isolated temp HOME)
secretmgr dashboard --no-open # API on :7777
npm run dev -w dashboard # Vite dev server on :5173 with /api proxyTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Secrets for developers and agents—secure context and workflows without exposing secret values.
A secret store for AI agents: the agent never sees the plaintext.
Project memory, documentation and controlled secret access for AI coding agents.
Encrypted secret store and rotation for autonomous agent credentials
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to securely use secrets by running commands with environment-injected credentials and sanitizing output to prevent leakage.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to securely inject API keys and secrets into environment files, configs, or commands without the agent ever seeing the secret values.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to scan and audit environment files for leaked secrets, sanitize them, encrypt/decrypt vaults, and run processes with zero-disk secret injection.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to manage and use API keys and secrets without ever seeing their values, by checking availability, listing names, requesting missing values, and running commands with injected secrets and redacted output.50 npmMIT