# vault-ask

Hands an agent a password or API key through a one-time link, so the value never lands in the conversation. Also works in reverse.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Erseni
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Erseni/secrets-component/tree/HEAD/cli
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/vault-ask

## What it does

The agent gets a link to an Erseni Vault page on stderr. You open it, check which command or file the value is bound to, type it in. What comes back to the agent is metadata only: the name, the length, where it went. Decryption happens locally, and the secret goes to exactly one destination — the environment of a child process via `--`, a `.env` file, or a single file with permissions 600.

The `send` subcommand runs the other way. A value is generated on your machine, encrypted with a fresh AES-256-GCM key, and offered to a person as a once-only link; the same value can also be written to `.env` or passed to a command, so both sides hold identical bytes. The key sits in the `#k=` fragment, which means the server keeps ciphertext. Existing values go out with `--from-env` or `--from-file`.

For Claude there is a `vault-ask-guard` PreToolUse hook. It blocks reads of the files `vault-ask` wrote and refuses to run `vault-ask` wrapped in `env`, `echo`, `printf` or a similar shell. The hook inspects command text without executing it, so it catches slips, not an agent deliberately hiding a path. An agent running as the same OS user with a shell can still read the memory of processes it spawned; real isolation takes privilege separation. Node.js 20 or newer is required, and `VAULT_ASK_API_KEY` from your Vault account skips proof of work and puts requests in the dashboard.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `VAULT_ASK_API_KEY`, `VAULT_ASK_SERVER` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env VAULT_ASK_API_KEY=<VAULT_ASK_API_KEY> --env VAULT_ASK_SERVER=<VAULT_ASK_SERVER> --transport stdio cli -- npx -y @erseni/vault-ask
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add cli --env VAULT_ASK_API_KEY=<VAULT_ASK_API_KEY> --env VAULT_ASK_SERVER=<VAULT_ASK_SERVER> -- npx -y @erseni/vault-ask
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "cli": {
            "command": "npx",
            "args": [
                "-y",
                "@erseni/vault-ask"
            ],
            "env": {
                "VAULT_ASK_API_KEY": "<VAULT_ASK_API_KEY>",
                "VAULT_ASK_SERVER": "<VAULT_ASK_SERVER>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "cli": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@erseni/vault-ask"
            ],
            "env": {
                "VAULT_ASK_API_KEY": "<VAULT_ASK_API_KEY>",
                "VAULT_ASK_SERVER": "<VAULT_ASK_SERVER>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e VAULT_ASK_API_KEY=<VAULT_ASK_API_KEY> -e VAULT_ASK_SERVER=<VAULT_ASK_SERVER> cli npx -y @erseni/vault-ask
```
Replace <…> with your own values

## When to use it
- give an agent a database password without pasting it into chat
- write several keys into `.env` with 600 permissions
- generate a token and send it to a teammate as a one-time link
- mask a secret inside command output as `***`
- stop an agent from reading the file a secret was written to

## Example prompts
- Fetch `DB_PASSWORD` and run `psql -h db.example.com -U app` with it
- Put `STRIPE_KEY` and `SENTRY_DSN` into `.env` using `vault-ask`
- Generate a 48-character token and send it as a link labelled “Router admin”

## Similar
- [credential-scanner](https://affpapa.org/en/nevibecode/skills/credential-scanner.md) — skill · 538 installs
- [hush](https://affpapa.org/en/nevibecode/mcp/omarei-omoto-hush.md) — MCP server · ★ 6
- [enigmagent-mcp](https://affpapa.org/en/nevibecode/mcp/enigmagent-mcp.md) — MCP server · ★ 6
- [janee](https://affpapa.org/en/nevibecode/mcp/janee.md) — MCP server · ★ 30
- [hashicorp-vault](https://affpapa.org/en/nevibecode/skills/hashicorp-vault.md) — skill · 413 installs
- [ghost-scan-secrets](https://affpapa.org/en/nevibecode/skills/ghost-scan-secrets.md) — skill · 4400 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
