
AgentGuard
io.github.MerchantGuard由 GitHub 账号 MerchantGuard 发布v0.3.1更新于 Oct 27, 2026
Local spend caps, kill-switch blocking and Ed25519-signed receipts for AI agent tool calls.
概览
本地 MCP 服务器,为 AI 代理的模型调用提供花费上限、拦截阻断和 Ed25519 签名的哈希链收据。
- 可以做什么
- 在模型调用执行前进行放行或阻断判定,受每日与单次花费上限约束
- 校验签名收据,改动任一签名字节即校验失败
- 将租户的决策账本导出为可验证的哈希链,包含此前进程运行的记录
- 为自托管模型登记价格,并预览某模型或端点将被证明的内容
- 查看当前生效的上限、租户、决策数量与签名者指纹
- 适用场景
- 适用于代理直接调用模型的场景,尤其是自托管模型——此时提供方的花费看板、速率限制和审计日志都不复存在,而你需要本地预算限制和可验证的调用来源记录。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js 20.19 或更高版本。可选环境变量用于设置花费上限、租户、账本模式和主目录;可选的 AGENTGUARD_LICENSE_KEY 用于许可证校验与席位注册。首次运行会生成签名密钥对。
安装
在 SourceWeft 中
- 打开 控制台中的 AgentGuard,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@agentguard-run/mcp
AgentGuard® as an MCP server: local spend caps and Ed25519-signed provenance receipts for AI agent actions, usable from any Model Context Protocol host (Claude Desktop, Claude Code, Cursor, Cline, or your own agent runtime).
Zero data plane. Tools accept metadata only: model names, token counts, endpoint URLs. Prompts and completions never pass through this server, and their content stays on your machine. Receipts are content-free.
A configured license uses the license and seat service. Optional activation telemetry requires consent and can be disabled with AGENTGUARD_NO_BEACON=1. Neither path sends prompts, tool content or receipts.
Install
Optional environment variables:
A signing keypair is generated on first run and persisted to <AGENTGUARD_HOME>/mcp-signing.json (0600). Signed decisions are appended to <AGENTGUARD_HOME>/<tenant>/decisions.ndjson, including the public verification key. Exports include prior process runs and new decisions extend the existing chain. Tenant directory names use the spend store's filename normalization. Spend counters remain process-local, as in earlier versions.
All tools accept optional agent_id, task_id, and workflow_id identifier parameters. spend_decide passes these to the call context, signing them as actor.agentId, actor.taskId, and actor.workflowId; the configured tenant becomes actor.tenantId. Other tools accept these metadata fields without recording a spend decision. Prompts, arbitrary content, credentials, and filesystem paths are rejected as IDs. Existing calls without these parameters keep working.
Tools
spend_decide: gate a model call before it runs. Returns allow/block plus a signed, hash-chained receipt recording model identity, weights origin country (China-origin families such as GLM, DeepSeek, Qwen, and Kimi are flagged automatically), hosting jurisdiction, and retention posture. Unrecognized endpoints (vLLM, Ollama, TGI, your own cluster) route asself-hosted: zero retention, your jurisdiction.verify_receipt: independently verify any receipt. Change one signed byte and verification fails.export_receipts: export the tenant decision ledger as a verified hash chain, including earlier process runs. Memory mode exports only the current process.set_model_cost: register pricing for self-hosted models (AgentGuard fails closed on unknown costs).provenance_preview: see what would be attested for a model/endpoint without spending.spend_status: active caps, tenant, decision count, signer fingerprint.
Why
When agents move from hosted APIs to self-hosted models, the provider's spend dashboard, rate limits, and audit logs disappear with the provider. AgentGuard puts them back, locally, and adds something hosted providers never gave you: a cryptographic receipt an outsider can verify without trusting you or us.
More: https://agentguard.run/sovereign/ and https://agentguard.run/sovereign/guide/
Verify independently
Any receipt can be checked off-platform at https://agentguard.run/verify or with verify_receipt and the signer public key from spend_status.
Local release verification
Requires Node.js 20.19 or later. Run npm ci, npm test, and npm run scan:release
from this package or its public mirror. The lockfile uses the published spend
0.19.0 package; no private sibling checkout is required.
Release checklist: keep package.json, the server version in src/index.ts, and
both versions in server.json aligned; run the tests and release scan; publish
npm first, publish with mcp-publisher, then verify the registry's active entry.
See the registry release guide for exact commands and the
public mirror allowlist.
The official registry name is io.github.MerchantGuard/agentguard. Its package
entry runs @agentguard-run/mcp locally through npx and stdio.
AgentGuard® is a registered trademark of Dunecrest Ventures Inc. US patent filings pending. This package is governance software, not legal or compliance advice.
来源:README.md,提交 811f4fa
工具
0版本历史
1- v0.3.1最新Sep 21, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。