Wundervault MCP is a zero-knowledge key vault for AI agents, provided in the form of a Model Context Protocol (MCP) server. Its core idea is: the agent never receives the key itself. When you paste an API key into an agent chat or a .env file, the key enters the context window, conversation records, and provider logs; Wundervault's approach is to have the agent only make work requests (for example, "run this deployment with that key"), while a local daemon decrypts the key, injects it into the subprocess environment, zeroes the buffer, and completes sanitization before the agent sees any output.
This repository is the MCP server that exposes this workflow, and it can be used with any MCP client, including Claude Code, Cursor, Cline, and others.
Main capabilities
- Zero knowledge: the encrypted key exists only in the MCP server process; the Wundervault server can never see it.
- Burn after reading: the plaintext key is never returned to the calling agent; after decryption, the agent only receives "Secret retrieved and burned."
- Execution sanitization: the command's stdout/stderr is stripped of plaintext before being returned; before decryption, shell escape patterns ($(), backticks, sh -c, eval) and file redirection of the key are rejected.
- Instruction integrity: the server-side instruction signature is verified before releasing any key (PBKDF2-HMAC-SHA256, 600,000 iterations).
- Timing safety: HMAC comparison uses crypto.timingSafeEqual.
- Tiered access: access levels are set per entry and enforced by the server; high-level keys require human approval before the agent can use them.
Tool set
- vault_entries_list: lists all vault entries available to the agent, returning only entry IDs and key names, not values.
- vault_entry_get: retrieves and decrypts a vault key, and optionally uses it to execute a command.
- Secure execution mode (sudo example): do not use echo $WUNDERVault_SECRET | sudo -S, as that exposes the key in process logs. This tool executes shell commands locally or on a remote host via SSH, and injects the vault key as an environment variable; after the key is injected into the subprocess, the buffer is immediately zeroed, and escape patterns are [handled] before decryptionis rejected. When used with remote_host.ssh_key_entry_id, the SSH key is retrieved from the vault and is never written to disk.
- vault_entry_inject_env: writes vault secrets directly into configuration files (~/.npmrc, ~/.netrc, ~/.docker/config.json, or the project .env), with the plaintext never passing through the agent.
- Syncs a local directory to a remote host via rsync over SSH, with the SSH key retrieved from the vault and the temporary key file deleted immediately after transfer.
- vault_entry_forget: discards the local reference; it is a no-op on the server side.
Secret resolution
The MCP server itself does not hold secrets, nor does it receive secrets from the command line. On the first tool call, resolution proceeds as follows: WUNDERVAULT_AGENT_NAME (required) specifies which registered agent this process is; the agent token is read from WUNDERVAULT_AGENT_TOKEN or ~/.wundervault/agents/<name>.token; that token is submitted to the local daemon via ~/.wundervault/agents/<name>.sock, which returns the API key, encryption key, and vault URL. If the daemon is not running, the tool call fails with an explanation rather than falling back to a weaker source. Run onboard.py to register an agent and start the daemon. There are no --api-key, --enc-key, or --credentials parameters; unknown options are rejected. Secrets are never placed in the MCP configuration. New accounts can generate this configuration through the 90-second agent onboarding flow at wundervault.com.
Usage and verification
The claimed zero-knowledge properties can be independently verified: it takes about 5 minutes at your network boundary (browser DevTools or a mitmproxy canary test); the guide and official test records are at wundervault.com/verify. Secrets are encrypted client-side (AES-256-GCM via Web Crypto) before upload; the hosting service stores only ciphertext and cannot derive keys, passphrases, or plaintext.
Platform support
Linux is the verified platform. macOS can be used for secret delivery; Windows is not supported. The delivery mechanism is POSIX by construction Dedicated: the sudo recipe pipes through /bin/sh, and the git / ssh-passphrase recipes require mkfifo and setsid; on Windows these mechanisms return an explicit "not supported" error rather than failing deep down. The single-instance lock has two implementations: a kernel-held abstract socket on Linux, and a loopback port elsewhere; only the Linux version has test coverage. CI runs on both platforms, and the lock test suite runs on Linux.
Agent wallet (x402)
An x402 payment is essentially a signature, and the wallet key is no different from any other vault key. Store the key as level 2, and let the agent sign payment payloads via vault_exec, with the key injected into a local signing subprocess—it never enters the model context, and every use requires prior owner approval (denied agent calls carry a request ID; approval is scoped to that agent + that key, and can be granted once or for a 15/60-minute window). Official end-to-end verification was done on Base Sepolia. Payment-specific policies (spending caps, payee allowlists) are not yet built: compatible, but not productized.
Sandbox / demo mode
Setting WUNDERVAULT_MOCK=1 runs the server without the wundervault-agent daemon or any credentials. In this mode every tool call returns a representative response clearly labeled [DEMO MODE] without contacting the vault—no real keys are involved. This lets you try the tool surface without an account, and also makes it easy for MCP directory scanners and CI (such as Glama) to start the server, call tools one by one, and verify the build without a live vault. This mode is off by default and is never enabled in production.
Limitations
The platform is open core: this MCP server and the browser-side encryption use AGPL-3.0, so every part that touches keys is auditable, but the hosted service itself is not open source. The local daemon must run alongside the agent, and fully air-gapped environments are not supported. By design, the agent can never read the value of a key—if your workflow requires the model to reason about the key itself, this is not suitable. Source build instructions and release history are in the repository and official update channels. The license is the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).