Your agent needs a database password or an API key. Instead of typing it into the chat, you enter it in your browser, and it goes straight to the one command you approved. The agent gets the result, never the value.
Whatever you type into an agent session stays in the conversation, in the session log on your disk and with the model provider. We measured it on our own machines: 68 of 70 deployment secrets were sitting in plain text in session logs. Rotating does not help while the next value takes the same route.
Node.js 20 or newer, no further dependencies:
npm install -g @erseni/vault-ask Or straight from the public source code, without npm:
git clone https://gitlab.erseni.net/open-source/secrets-component.git npm install -g ./secrets-component/cli The default: the value only exists as an environment variable of this one child process. Nothing is written to disk.
vault-ask DB_PASSWORD -- psql -h db.example.com -U app For values that need to stay: written into a .env file with permissions 600.
vault-ask STRIPE_KEY SENTRY_DSN --env-file .env For keys and certificates: one value into one file, permissions 600.
vault-ask TLS_KEY --file certs/server.key There is deliberately no way to print the value. Several names in one call give you one page with several fields.
Ask your agent for a new password and you get a one-time link instead of the password in the chat. vault-ask send generates the value on the agent's machine, encrypts it there and writes the same value into the .env file or the command that needs it, so your system and your link match.
vault-ask send DB_PASSWORD --env-file .env The link shows the value once and is used up afterwards. Sending counts against the same daily limit as requests.
All of this catches accidents and makes a manipulated agent visible. It does not make an agent that runs under your own operating system user with a shell harmless: such an agent can read the memory of processes it started. Complete protection only comes from separating privileges, with the secret held by a service under a different user and the agent only holding a handle. We describe this in our threat model instead of promising more than the code does.
vault-ask-mcp offers the same building blocks as MCP tools: request_secret writes a value into a file, run_with_secret runs a command with it, send_secret sends you a generated value as a one-time link. The server tells the agent at the start of every session when to use which tool, so "generate a password for my database" leads to a link without any setup on your side.
claude mcp add vault-ask -- vault-ask-mcp export VAULT_ASK_API_KEY=vak_...