# Stop Handing AI Agents Your Password Manager and .env Files: Zero-Knowledge Agent Vaults with MCP

> Source: <https://dev.to/keyrook/stop-handing-ai-agents-your-password-manager-and-env-files-zero-knowledge-agent-vaults-with-mcp-52j3>
> Published: 2026-12-01 04:10:33+00:00

**Key takeaway:** Passhold's MCP server exposes nine tools that inject secrets only on allowlisted hosts and methods and scrub raw, base64, hex and URL-encoded secrets from responses, so agents can call credentials without the raw value entering context.

As teams move from chat copilots to autonomous coding tools, browser agents, cloud VMs, and 24/7 bots, credential handling has become the weakest link in the stack.

Right now, most setups fall into one of three dangerous habits:

`.env` files`otpauth://` seeds to an agent
We built **[Passhold Agents](https://keyrook.com/agents/)** (GPL-3.0, zero-knowledge) to enforce a strict boundary: **give an AI agent the capability to invoke a credential without ever letting the raw secret enter the model's context window.**

All agent credentials live in **dedicated agent vaults** encrypted with AES-256-GCM keys that are completely separate from personal and family vaults. An enrolled agent machine never receives a key capable of decrypting personal logins or passkeys.

Instead of unlocking your everyday password manager inside an agent's Chrome, Edge, or Firefox profile, enroll a dedicated profile in **Agent Browser Mode**:

`get_totp` without rendering raw passwords or TOTP base32 seeds in the popup DOM.
Cloud sandboxes can't run local stdio pipes into your laptop. Passhold CLI (`0.6.0`) ships a hardened **Streamable HTTP MCP (2025-03-26)** transport:

```
passhold mcp --http --port 3847 --allowed-host tunnel.example.com --expires 8h
```

Key hardening details:

`127.0.0.1` — never exposed directly on `0.0.0.0`; put your own HTTPS tunnel or reverse proxy in front.` Host` header against `--allowed-host`, rejects browser `Origin` headers, and authenticates with a constant-time Bearer token.`--expires`) plus a one-tap Run `passhold mcp` locally over stdio with 9 focused MCP tools:

| Tool | What it does | 
|---|---|
| `list_items` | Returns granted item metadata, allowed hosts, methods, and approval rules — never values. | 
| `http_request` | Injects secrets only on allowlisted hosts, paths, and HTTP methods; refuses redirects; ignores proxy env vars; scrubs raw, base64, hex, and URL-encoded secrets from responses before returning to the model. | 
| `run_command` | Spawns with `shell: false` , strips Passhold auth env vars from the child process, and scrubs stdout/stderr. | 
| `fill_login` | Verifies target origin and fills credentials via the local browser bridge. | 
| `get_totp` | Verifies allowed host and returns only an ephemeral 6-digit RFC 6238 code + `secondsRemaining` . | 
| `save_api_key` | Seals newly minted tokens directly into an Agent Inbox for human review (preferring `from_command` so stdout never enters context). | 
| `request_access` | Requests owner approval for an ungranted action with an explicit human-readable reason. | 
| `status` /`reveal` | Machine state check; raw `reveal` is off by default and requires explicit grant + one-time approval. | 

Generate client configs and install the portable agent workflow skill in two commands:

```
passhold machine config --client openclaw   # or: hermes, cursor, claude, vscode, cloud
npx skills add keyrook/passhold
```

Per-agent guides: [OpenClaw](https://keyrook.com/agents/openclaw/) · [Hermes](https://keyrook.com/agents/hermes/)

`io.github.keyrook/passhold`
`--http`), and isolated Agent Browser Mode.
How are you currently isolating API keys, browser logins, and 2FA codes for your autonomous agents? Would love feedback on the threat model and scrubbing edge cases in the comments!
