Skip to content

Give an AI agent its first key

You’ll have an AI tool connected to a vault, and one request for a value answered by you and recorded in the log.

  • The keypaste command: the desktop app puts it on your PATH from Settings › keypaste in a terminal, or install the CLI alone.
  • An AI tool such as Claude Code, Codex or Cursor.
Terminal window
keypaste init ~/vault.kdbx
keypaste use ~/vault.kdbx
New master password:
Confirm master password:
Created /home/you/vault.kdbx
keypaste: agents and the CLI now use /home/you/vault.kdbx when no --vault is given.
keypaste: an AI tool's running bridge keeps the vault it started with until the tool restarts it.

Nothing can recover a forgotten master password. In the desktop app, Create a vault… does the same.

Terminal window
keypaste env set demo STRIPE_KEY
Master password:
Value for STRIPE_KEY:
Set STRIPE_KEY on env/demo/.env, created and tagged env:demo

Paste a fake value, such as sk_test_EXAMPLE_ONLY_not_a_real_key_0000: an AI tool can keep what it receives.

Terminal window
keypaste setup
claude-code claude mcp add --scope user --transport stdio keypaste -- …
cursor edit /home/you/.cursor/mcp.json: set mcpServers.keypaste …
Connect keypaste to these 2 tools? [y/N] y
claude-code configured
cursor configured; the original is kept as /home/you/.cursor/mcp.json.keypaste-backup; restart Cursor to load it

No master password goes into a tool’s configuration. In the desktop app, Agents › + does the same (Connect an AI tool).

Unlock the vault in the desktop app, or leave this running in a terminal of its own:

Terminal window
keypaste approve
Master password:
keypaste: watching /home/you/vault.kdbx
keypaste: listening on keypaste-vault-9f3a1c02b7d54e60 for unlock 5d0c8e1a…, 45 seconds to answer.

Start a new session in your AI tool and ask: “use keypaste to get STRIPE_KEY from the demo environment”. keypaste asks you:

keypaste: an agent is asking for a credential.
agent claude-code (claude-code)
item .env
group env/demo
field STRIPE_KEY
[d] deny [o] once [a] always 45s ›

Press o to allow this one request. The app shows the same question with Deny, Allow once and Always allow.

Terminal window
keypaste log --since 5m
2 records of 2 in /home/you/.keypaste/audit.jsonl, since 2026-07-27 09:53:07Z
time (UTC) agent item decision method
2026-07-27 09:57:42 claude-code - granted exposure
2026-07-27 09:57:42 claude-code env/demo/.env granted prompt

exposure is the agent listing names, and prompt the request you answered. The log records every request, allowed or refused, and never the value.