
vaultguard
io.github.ashishrao-4由 GitHub 帳號 ashishrao-4 發布v0.1.2更新於 Oct 24, 2026
AI agents use your Obsidian secrets by name — values never reach their context.
概覽
讓 AI 助理在執行指令時使用 Obsidian 儲存庫中的密鑰,密鑰值以環境變數注入,不會進入對話內容。
- 可以做什麼
- Vaultguard 是本地 stdio MCP 伺服器,讀取以 markdown 形式存放在 Obsidian 儲存庫中的 AES-256-GCM 加密密鑰區塊。主要工具 run_with_secret 會把指定名稱的密鑰注入指令的環境變數,並把輸出中意外出現的密鑰值替換為 [REDACTED:NAME]。另有 get_secret 工具,但預設關閉,讓原始值不會到達助理。每次呼叫都會寫入稽核日誌,還可選設定主機與指令允許清單來限制可執行的內容。
- 適用情境
- 當你希望助理執行需要憑證的指令(例如資料庫連線字串),又不想把值貼進對話、留在紀錄、日誌或檢查點中時,適合使用。它面向已經在 Obsidian 中做筆記、並接受助理等同於本人操作的使用者。
- 執行需求
- 本地需 Node.js 18 或更新版本,透過 npx 或 npm 安裝 @ashishrao-4/vaultguard。需要 Obsidian 儲存庫路徑,以及用來解密密鑰區塊的通行短語,透過環境變數 VAULTGUARD_PASSPHRASE 提供。可選變數:VAULTGUARD_VAULT_PATH、VAULTGUARD_HOME、VAULTGUARD_ALLOW_GET_SECRET。不需雲端服務或帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 vaultguard,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[vaultguard]
🔐 vaultguard
Your Obsidian vault, guarded for your AI agents.
npx @ashishrao-4/vaultguard init · zero dependencies · pure Node · cross-platform
The problem
Your AI agents are powerful. They ship code, run commands, and one day they will ask: "give me the database URL."
You hand it over. Now that value lives in every transcript, log, checkpoint, and backup of your conversations. Rotate it a month later — a year later — and the old one is still out there.
The vault itself — Obsidian — is encrypted only if you make it so, and your agent reading your notes means your agent reading your secrets.
What vaultguard does
Secrets live in your Obsidian vault as AES-256-GCM ciphertext. Your agents get them by name over MCP — they run commands with the values injected into the environment and never see them, while every access is audited.
[vaultguard architecture]
The simple version: your agent asks by name, vaultguard decrypts on demand, the value stays out of the conversation.
- You own the data. No cloud, no SaaS, no server. The encrypted blocks are plain markdown.
- Readable in Obsidian. Encrypted blocks look like notes; reveal them with one click.
- Tell your agent to run things using secrets — values never surface in transcripts.
- Zero npm dependencies. Pure Node ≥ 18. Windows / macOS / Linux.
Quickstart
1 · Install
2 · Point it at your vault
It asks for a passphrase — the key that encrypts and decrypts every block in this vault. Then it:
- creates
Secrets.mdin your vault, - installs the Inline Secret Block plugin into the vault automatically,
- writes
~/.vaultguard/config.json— without the passphrase (you provide it viaVAULTGUARD_PASSPHRASE).
Restart Obsidian and enable the plugin: Settings → Community plugins → Inline Secret Block → Enable.
The passphrase is never written to disk by default. Prefer env vars:
VAULTGUARD_PASSPHRASE(orDOORMAN_PASSPHRASE). If you want it conveniently stored anyway — at the cost of weaker security — runvaultguard init --store-passphraseinstead (see Threat model).
3 · Add your first secret — the Obsidian way
In Obsidian, open Secrets.md and add a plaintext block:
Click Show — the plugin instantly replaces it with an encrypted secret-lock block. Your raw value is gone; what remains:
That's it. Same value, later, forever: click Show again.
No Obsidian? Use the CLI instead:
4 · Connect your agent
prints ready-made config for your harness:
opencode — in opencode.json (or globally via the app):
Claude Code:
Cursor: add the same server to your project's .cursor/mcp.json (or the MCP settings tab):
5 · Use it
run_with_secret— secrets injected into the command's environment only.- Output is scrubbed — any accidental echo of a secret is replaced with
[REDACTED:NAME]. get_secret— disabled by default so values never reach the agent; opt in withallowGetSecret: truein the config if a tool insists on the raw value.
Security model
Configuration
Edit ~/.vaultguard/config.json:
The only way the passphrase lands in this file is vaultguard init --store-passphrase,
which sets "storePassphraseOnDisk": true and includes "passphrase". Everything else reads
the passphrase from the VAULTGUARD_PASSPHRASE env var or the CLI prompt.
Passphrase hygiene: vaultguard never writes the passphrase to disk unless you opt in (
init --store-passphrase). SupplyVAULTGUARD_PASSPHRASEin each harness config (see step 4) and protect~/.vaultguardlike an SSH key. Changed passphrase?vaultguard rekeyre-encrypts every block, then update the env var wherever you set it.
CLI reference
Threat model — and when NOT to use it
vaultguard is a thin convenience layer, not a secrets manager. Its job is to keep secret values out of your AI-agent transcripts, logs, and checkpoints.
What it does NOT protect against:
- A compromised machine or harness. The passphrase (or an opted-in stored config) lives on your disk. Any process running as you — a backup tool, ransomware, a compromised plugin, your IDE — can read your files and decrypt the vault.
- A hostile agent. The entire idea is that the agent runs commands with secrets in the
environment. Treat that as "the agent is you." Start with command allowlists and review
vaultguard audit; don't grant access you wouldn't grant yourself. - Weak passphrases. AES-256-GCM + PBKDF2 is only as strong as the passphrase. Use a long random one (your password manager can generate and store it).
- Exfiltration through legitimate channels. A determined agent can copy ciphertext or raw values anywhere that's reachable. vaultguard is a barrier, not a boundary.
- Plugin supply chain.
vaultguard initdownloads the Inline Secret Block plugin from its GitHub releases. A malicious plugin that knows your passphrase can decrypt everything — pin/verify it if you care.
Use it when: you want "agents run things with secrets without me pasting values into the chat" and the residual risks above are acceptable to you.
Don't use it when: you need real secrets-management guarantees — rotation policy, hardware-backed keys, no procedure that makes plaintext reachable to a native plugin — when your threat model includes a hostile agent on a shared or CI machine, or when the vault itself needs encryption at rest (Obsidian's own vault encryption, or an encrypted volume, is the answer there).
FAQ
Is my vault git-safe? The encrypted blocks are plain markdown — safe to commit, sync, or put anywhere Obsidian works. Since the passphrase no longer lives in ~/.vaultguard/config.json by default, committing that file leaks your vault path and settings but not your key.
What if I forget the passphrase? The blocks are AES-256-GCM. It cannot be recovered — that's the point.
Which Obsidian plugin? Inline Secret Block — vaultguard init installs it for you.
Do I need a server? No. It's a local stdio MCP server (node src/server.mjs). Nothing listens on a port.
License
MIT © vaultguard contributors.
The bundle installs the Inline Secret Block plugin (also MIT), downloaded at init time from the plugin's official releases — it is not vendored into this package. This project uses Node.js built-ins only (crypto), so there are no dependency licenses to track.
Guard your vault. Let your agents work.
來源:README.md,提交 39e6bd9
工具
0版本歷史
1- v0.1.2最新Sep 18, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分