Local encrypted secret broker for AI agents: request keys by name, approve each use over MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Store your API keys once. Let any AI tool request them with your approval β without ever seeing the value.
keyward is an open-source, local, encrypted secret broker for AI coding agents. Instead of pasting API keys into chat (where they leak into context and transcripts) or re-entering the same key in every new session, project, and IDE, you keep your keys in one encrypted vault. When Claude Code, Cursor, Gemini CLI, or any MCP-capable tool needs a key, it requests it by name, you approve that single request in a native OS prompt, and keyward injects only that key into your project. The model never receives the value.
.env files β no single source of truth; you forget which key lives where.~/.keyward/vault.age, 0600). The master key lives in the OS keystore (macOS Keychain / Windows Credential Manager / Linux libsecret), never on disk in plaintext.list_keys, request_key) for AI tools, and a keyward CLI for everything else.list_keys returns names only; request_key returns a confirmation; the audit log records the decision but never the value.Pre-built binaries (macOS/Windows/Linux, amd64+arm64) are also attached to each release. See INSTALL.md for per-OS notes (incl. Linux libsecret) and TROUBLESHOOTING.md if something doesn't work.
keyward is a standard stdio MCP server, registered the same way as the official MCP servers. Two steps:
1. Install the binary (once) β go install above, or Homebrew/Scoop (soon),
or a release binary.
2. Register it with your AI tool:
Or add it to the config by hand (~/.claude.json, or a project .mcp.json):
Cursor, Windsurf, Cline, and other MCP clients use the same command/args
shape in their MCP settings. Restart the tool and ask it to use a key by name.
Why not "paste a repo URL"? No MCP client auto-installs a server from a GitHub link β by design, clients won't run arbitrary remote code. keyward is also intentionally local (it needs your OS keystore and writes to your local files), so it isn't a remote/hosted URL server. The two steps above are the standard, secure install path. Full walkthrough in USAGE.md.
| Command | Description |
|---|---|
keyward init | Create the encrypted vault and master key |
keyward import [root] | Import secrets from .env files under root, grouped by project |
keyward add NAME --ns NS | Add/update one secret, value read from stdin (for non-.env creds) |
keyward ls [--ns NS] | List key names and namespaces (never values) |
keyward inject NAME --ns NS --into PATH | Inject one key into a target env file (prompts for approval) |
keyward serve-mcp | Run the MCP server over stdio |
request_key injects it into a target file and returns only a confirmation.~/.keyward/audit.jsonl records tool, key, namespace, target, decision β no value) and never printed by ls/inject.age; the master key lives in the OS keystore.These invariants are enforced by automated tests. Details and threat model in SECURITY.md.
| keyward | envchain | pass / sops | 1Password CLI | |
|---|---|---|---|---|
| Encrypted local store | β | β (Keychain) | β | β (cloud) |
| Agent requests a key by name | β | β | β | β |
| Per-request human approval | β | β | β | β |
| Value never reaches the model | β | n/a | n/a | n/a |
| MCP server for AI tools | β | β | β | β |
| Open source | β (MIT) | β | β | β |
The encrypted-storage problem is solved; keyward adds the missing agent-facing, approval-gated broker on top. See docs/comparisons for honest long-form comparisons (including when each alternative is the better choice).
Full detail in ROADMAP.md. Highlights:
target: "env" injection.Contributions welcome β see CONTRIBUTING.md. Found a security issue? See SECURITY.md for responsible disclosure.
MIT Β© 2026 Artur Ayupov
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/keyward)<a href="https://allmcps.com/mcp/keyward"><img src="https://allmcps.com/api/badge/keyward?style=directory" alt="Keyward on AllMCPs" /></a>