
keyward
io.github.arturayupovPublished by GitHub account arturayupovv0.1.1Updated Oct 24, 2026
Local encrypted secret broker for AI agents: request keys by name, approve each use over MCP.
Overview
Local encrypted secret broker that lets an AI agent request API keys by name, with each use approved in a native OS prompt and the value never shown to the…
- What you can do
- List stored secret names and namespaces, without values
- Request a named key for a project, which injects it into a target env file after approval
- Record each request and decision in a local audit log
- Manage the vault outside the agent through a companion CLI: create it, import keys from .env files, add or list secrets, inject one key
- When to use it
- Useful when you keep API keys for coding agents and want to stop pasting them into chat or re-entering them per session, project or IDE, while keeping per-request human approval and a local encrypted store.
- Requirements
- A local binary installed via Homebrew, Scoop, go install or a release build; it runs as a stdio MCP server registered with the client's command and args. Needs an OS keystore (macOS Keychain, Windows Credential Manager, or Linux libsecret) and a vault created with the CLI first. Desktop only; no remote endpoint.
Installation
In SourceWeft
- Open keyward in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[keyward — a secret broker for AI agents]
keyward
Store your API keys once. Let any AI tool request them with your approval — without ever seeing the value.
[CI] [MIT] [MCP compatible] [cross platform]
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.
The problem
- Leaking keys into AI chat — paste a key into a prompt and it lands in context, transcripts, and logs.
- Re-entry tax — you type the same key again in every new session, project, IDE, and machine.
- Scattered
.envfiles — no single source of truth; you forget which key lives where. - Zero control — an agent can read or grab every secret at once instead of the one it needs.
- Tool lock-in friction — switch IDE or model and you redo all key setup.
How it works
- Vault — an age-encrypted file (
~/.keyward/vault.age,0600). The master key lives in the OS keystore (macOS Keychain / Windows Credential Manager / Linux libsecret), never on disk in plaintext. - Two faces — an MCP server (
list_keys,request_key) for AI tools, and akeywardCLI for everything else. - Out-of-band approval — the approval dialog is fired by keyward itself, not rendered in the agent's stream, so the agent cannot auto-approve. Choose Approve once, Approve for session, or Deny.
- Value-free by construction —
list_keysreturns names only;request_keyreturns a confirmation; the audit log records the decision but never the value.
Install
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.
Quickstart
Use it as an MCP server
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.
CLI reference
Security model
- The secret value is never returned to the AI agent —
request_keyinjects it into a target file and returns only a confirmation. - The value is never written to the audit log (
~/.keyward/audit.jsonlrecords tool, key, namespace, target, decision — no value) and never printed byls/inject. - Approval is out-of-band: a native OS dialog the agent cannot click. All dialog backends fail closed — any error or cancellation is a Deny.
- The vault is encrypted at rest with
age; the master key lives in the OS keystore.
These invariants are enforced by automated tests. Details and threat model in SECURITY.md.
How it compares
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).
Roadmap
Full detail in ROADMAP.md. Highlights:
- v0.2 — signed/notarized binaries (no keystore prompt), Homebrew/Scoop, biometric approval (Touch ID / Windows Hello), Windows ACL hardening.
- v1.0 — tray/menubar app, per-key policy & allowlists, rotation reminders,
target: "env"injection. - v2.0 — encrypted multi-device sync (user-owned backend), team mode.
Contributing
Contributions welcome — see CONTRIBUTING.md. Found a security issue? See SECURITY.md for responsible disclosure.
License
MIT © 2026 Artur Ayupov
Source: README.md at commit 8877a0d
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts