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.
Prerequisites
Section titled “Prerequisites”- The
keypastecommand: the desktop app puts it on yourPATHfrom Settings › keypaste in a terminal, or install the CLI alone. - An AI tool such as Claude Code, Codex or Cursor.
1. Make a vault
Section titled “1. Make a vault”keypaste init ~/vault.kdbxkeypaste use ~/vault.kdbxNew master password:Confirm master password:Created /home/you/vault.kdbxkeypaste: 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.
2. Add a test value
Section titled “2. Add a test value”keypaste env set demo STRIPE_KEYMaster password:Value for STRIPE_KEY:Set STRIPE_KEY on env/demo/.env, created and tagged env:demoPaste a fake value, such as sk_test_EXAMPLE_ONLY_not_a_real_key_0000: an AI tool can keep what it receives.
3. Connect your AI tool
Section titled “3. Connect your AI tool”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 itNo master password goes into a tool’s configuration. In the desktop app, Agents › + does the same (Connect an AI tool).
4. Hold the vault unlocked
Section titled “4. Hold the vault unlocked”Unlock the vault in the desktop app, or leave this running in a terminal of its own:
keypaste approveMaster password:keypaste: watching /home/you/vault.kdbxkeypaste: listening on keypaste-vault-9f3a1c02b7d54e60 for unlock 5d0c8e1a…, 45 seconds to answer.5. Ask, and answer
Section titled “5. Ask, and 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.
6. Read the log
Section titled “6. Read the log”keypaste log --since 5m2 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 promptexposure is the agent listing names, and prompt the request you answered. The log records every request, allowed or refused, and never the value.