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 分