Agentvault

io.github.bch1212由 GitHub 帳號 bch1212 發布v0.1.0更新於 Oct 24, 2026

Credential vault for AI agents — Fernet-encrypted keys, per-agent budgets, audit logs.

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

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理從 AgentVault 部署取得加密的 API 金鑰,並受各代理的權限、預算與稽核記錄約束。

可以做什麼
列出該代理有權查看的憑證,並取得帶 TTL 的解密值,同時依每次取得的成本計入代理預算。查看保險庫狀態,並為代理設定每日或每月支出上限。檢視成功與遭拒的憑證讀取稽核記錄。憑證以欄位層級 Fernet 加密儲存,代理金鑰以雜湊形式保存。
適用情境
當自主代理需要 Stripe、OpenAI 或 SendGrid 等服務的 API 金鑰,而你希望依代理限定範圍、設定支出上限並保留存取紀錄,而不是把金鑰寫死在提示詞或環境變數中時使用。適合已自行運行或自架 AgentVault 部署的團隊。
執行需求
以本機 stdio 程序執行,來自 npm 套件 agentvault-mcp。需要透過網路存取 AgentVault 部署,位址由 AGENTVAULT_API_URL 指定,並在 AGENTVAULT_AGENT_KEY 提供 avk_ 代理 API 金鑰。託管服務超出免費方案後需付費;自架需要資料庫與加密金鑰。
安裝前請注意
此伺服器會把解密後的憑證值交給助理,因此讀取的內容可能進入模型上下文或日誌。AGENTVAULT_AGENT_KEY 是存取保險庫的機密。取得操作可能計入預算支出,set_budget 會變更限額。託管部署是第三方服務,會儲存你的憑證與存取日誌。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

AgentVault

AI-native credential management for autonomous agents. Store API keys with column-level Fernet encryption, issue unique avk_ keys to registered agent identities, proxy decrypted values with TTL, enforce per-agent spending budgets, log every access, and expose everything as an MCP server.

Why

Autonomous agents need API keys to do anything useful — Stripe, OpenAI, SendGrid, your own internal services. Three bad options today:

  1. Hardcode in the agent prompt or config. Leaks in logs, can't rotate, no audit trail.
  2. Pass via env vars at spawn. No per-agent isolation, no budget controls, no revocation without redeploy.
  3. Roll your own vault. Real work — encryption at rest and in transit, audit logs, key rotation, budget tracking.

AgentVault is option 3 as a service. One avk_ key per agent. Permission patterns (["stripe_*", "openai_*"]). Daily/monthly spending caps. Full access log. MCP-native so agents can vault.get_credential("stripe_key") and get a TTL-bound decrypted value back.

Quickstart

Direct HTTP

python
import httpx
resp = httpx.post(    "https://agentvault-api-production.up.railway.app/api/v1/vault/get/stripe_key",    headers={"X-Agent-Key": "avk_..."},    params={"cost": 0.05},)stripe_key = resp.json()["value"]

MCP (Claude Desktop / Cursor / Cline)

json
{  "mcpServers": {    "agentvault": {      "command": "python",      "args": ["-m", "mcp_server"],      "env": {        "AGENTVAULT_API_URL": "https://agentvault-api-production.up.railway.app",        "AGENTVAULT_AGENT_KEY": "avk_..."      }    }  }}

Then in Claude: vault.get_credential("stripe_key") returns the decrypted value.

How it works

  • Column-level Fernet encryption — credentials are encrypted with VAULT_ENCRYPTION_KEY before they hit the database. Stronger than at-rest disk encryption alone.
  • avk_ agent keys — SHA-256 hashed at rest, never stored plaintext. Recognizable prefix like sk_live_ / whsec_.
  • Permission patterns — ["stripe_*", "openai_*"] scopes an agent without a full policy engine. fnmatch-based.
  • Budget enforcement — daily and monthly caps per agent. /vault/get?cost=0.05 records the spend; 429 once the cap is hit.
  • Audit log — every access (success or denied) goes into credential_access_logs with IP, user-agent, error reason.
  • MCP server — mcp_server/ exposes list_credentials, get_credential, vault_status, set_budget, view_audit_log as stdio MCP tools.

Pricing

Tier$/moAgentsCredentialsAuditRotationBudgetsTeam
Free$0310––––
Pro$4925100✓✓––
Business$149∞∞✓✓✓✓
Enterprise$499∞∞✓✓✓✓ + SSO + compliance

Self-host

bash
git clone https://github.com/bch1212/agentvaultcd agentvaultpip install -r requirements.txtcp .env.example .env  # then fill in VAULT_ENCRYPTION_KEY and DATABASE_URLpython -m api.main

Run tests:

bash
python -m pytest -v   # 34 tests

Deploy to Railway:

bash
bash deploy.sh

Architecture

api/├── main.py                 # FastAPI + lifespan├── database.py             # Async SQLAlchemy (auto-rewrites postgresql:// → postgresql+asyncpg://)├── services/│   ├── encryption.py       # Fernet encrypt/decrypt│   ├── auth.py             # avk_ key gen + SHA-256 hashing│   ├── budget.py           # Per-agent spend tracking│   ├── audit.py            # Access log│   └── alerts.py           # SendGrid alerts├── middleware/             # X-Agent-Key + Bearer auth└── routers/                # users, agents, credentials, vault, audit, budgets, billingmcp_server/                 # FastMCP stdio servertests/                      # 34 tests, SQLite in-memory

License

MIT.

來源:README.md,提交 044b1dc

工具

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

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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