Agent Mandate Verification

io.github.API-Disk-Integrations由 GitHub 账号 API-Disk-Integrations 发布v0.1.1更新于 Oct 25, 2026

Verify a proposed action against a signed Agent Mandate without executing or mutating accounts.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

一个本地 MCP 服务器,用已签名的 Agent Mandate 信封校验拟执行的代理操作并返回判定结果,本身不执行任何操作。

可以做什么
校验操作是否符合已签名授权:只有一个工具 verify_action,可用单个操作或 1–500 个操作的批次,对照调用方提供的 {mandate, signature} 信封进行校验,并按操作返回回执,包含 allow、deny、requires_approval 等判定、违规代码和摘要。
适用场景
当助手或代理声称拥有某项已签名授权,而你想在采信之前独立核实时使用,尤其适用于需要由你以外的人也能验证该判定的场景。若审批关口完全由你掌控,README 建议在自有服务内做策略检查更简单也更便宜。
运行要求
需要 Node.js 20 或更高版本,以及通过 AGENT_MANDATE_API_KEY 提供的 Agent Mandate API 密钥;该包通过 npx 以 stdio 在本地运行,没有远程端点。需要能访问固定的校验端点,免费额度为每月 500 次已校验操作。
安装前请注意
API 密钥是敏感信息,从 AGENT_MANDATE_API_KEY 读取。每次校验都会消耗计量额度,付费方案起价每月 299 美元。该服务器对授权、账户和账单状态只读,但不负责强制执行结果:应用必须依据判定采取行动,且 allow 或 requires_approval 都不会执行该操作。请固定使用 0.1.1 版本,因为 0.1.0 存在输入模式缺陷。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agent Mandate Verification,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Verify a signed agent mandate through MCP

Check a signed authorization envelope before trusting an agent's claimed authority.

Agent Mandate's MCP tool accepts the complete { mandate, signature } envelope returned by POST /v1/mandates. Raw claims are not a signed envelope.

The walkthrough: create an envelope, verify an action through MCP, then change one signed field and verify again. You see the real verification result for each request, including the one that gets refused.

Requirements: Node.js 20 or newer, and an Agent Mandate API key.

Getting a key: the free tier includes 500 verified actions per month and needs no card. Issuing mandates is free and never consumes the allowance; one unit is one action verified. Paid plans start at $299/month for 10,000 verified actions. This walkthrough consumes at most two of your free units.

Running this in production? When a signed mandate is and is not worth it, with the published pricing. Short version: if the approval gate is one you control, a policy check inside your own service is simpler and cheaper. The signature earns its price when somebody other than you has to be able to verify the decision.

Just exploring? POST /v1/demo/verify takes raw claims, needs no key at all, and is shown at the end. It does not replace the signed-envelope walkthrough, because it does not check a signature.


Run the walkthrough

bash
git clone https://github.com/API-Disk-Integrations/agent-mandate-mcp.gitcd agent-mandate-mcpgit checkout v0.1.1npm ciAGENT_MANDATE_API_KEY=your_key node examples/verify-mandate.mjs

The example runner comes from this repository, but it installs @api-disk-integrations/[email protected] from npm into a throwaway prefix and runs that, so it exercises the published artifact rather than your working tree. Omit AGENT_MANDATE_API_KEY and it prompts without echoing.

What it prints

=== 1. Create a mandate ===POST /v1/mandates -> 200envelope keys: mandate, signature, requestIdsignature: v1:b63eacaa7… (67 chars)
=== 3. Verify the action against the signed envelope ===action: payments.transfer 30000 USD, approval required above 25000decision: requires_approval  violation: Actions above 25000 minor units need a human approval token.  digest: c90fd0bc104dce63…
=== 4. Tamper with one signed field, keep the signature ===raising approvalRequiredAboveMinor 25000 -> 999999, which would turn this into an allowrejected: Agent Mandate error 400/invalid_request.The tampered mandate did not buy an allow. The signature is doing its job.

That is a real run against production, not illustrative output. The grant allows up to 100,000 minor units but requires approval above 25,000, and the action asks for 30,000, so requires_approval is the correct answer. A deny or requires_approval is a correct result, not a failure.

Verification reports a result; your application remains responsible for enforcing it.

Install the server

bash
npx --yes @api-disk-integrations/[email protected]

A generic stdio client configuration:

json
{  "mcpServers": {    "agent-mandate": {      "command": "npx",      "args": ["--yes", "@api-disk-integrations/[email protected]"],      "env": {        "AGENT_MANDATE_API_KEY": "${AGENT_MANDATE_API_KEY}"      }    }  }}

${AGENT_MANDATE_API_KEY} denotes the host's secret reference; use your client's documented secret facility if its syntax differs. The package uses stdio and reads exactly that environment variable. It has no remote /mcp endpoint.

Pin the version. 0.1.0 is still on the registry and has a first-use defect: its input schema accepted any object for mandate, so a call built from the keyless demo's shape returned HTTP 400.

If you would rather verify a checksummed artifact, every release also attaches a tarball and its SHA-256:

bash
curl -fsSLO https://github.com/API-Disk-Integrations/agent-mandate-mcp/releases/download/v0.1.1/api-disk-integrations-agent-mandate-mcp-0.1.1.tgzshasum -a 256 api-disk-integrations-agent-mandate-mcp-0.1.1.tgz   # compare with the release pagenpm install -g ./api-disk-integrations-agent-mandate-mcp-0.1.1.tgz

The two shapes, which is the thing that trips people up

EndpointKeyTakes
POST /v1/demo/verifynone{mandate: {…claims…}, action: {…}} — raw claims
POST /v1/verifyyes{mandate: {mandate: {…claims…}, signature: "…"}, action: {…}} — the envelope

The envelope is the entire response body of POST /v1/mandates: {mandate, signature, requestId}. Pass it through unchanged.

"mandate.mandate" must be the claims object means bare claims were passed where the envelope belongs. Run POST /v1/mandates first and pass its whole response.

The two calls by hand

Step 1 — create a mandate. Issuing is free and does not consume your allowance.

sh
curl -X POST https://agentmandate-api.com/v1/mandates \  -H "authorization: Bearer $AGENT_MANDATE_API_KEY" \  -H 'content-type: application/json' \  -d '{    "principal": "user_8814",    "agent": "agent_procurement_v3",    "expiresAt": "2026-12-31T23:59:59Z",    "currency": "USD",    "totalSpendCapMinor": 500000,    "grants": [{      "action": "payments.transfer",      "resources": ["vendor.acme"],      "maxAmountMinor": 100000,      "approvalRequiredAboveMinor": 25000    }]  }'

Answers 200 with {"mandate": {…}, "signature": "…", "requestId": "…"}. That whole body is the envelope.

Step 2 — verify an action against it. Call verify_action with the envelope as mandate:

json
{  "mandate": { "mandate": { "…": "…" }, "signature": "…" },  "action": {    "agent": "agent_procurement_v3",    "action": "payments.transfer",    "resource": "vendor.acme",    "amountMinor": 30000,    "currency": "USD"  }}

With no key at all

sh
curl -X POST https://agentmandate-api.com/v1/demo/verify \  -H 'content-type: application/json' \  -d '{"mandate":{"principal":"user_8814","agent":"a1","expiresAt":"2026-12-31T23:59:59Z","currency":"USD","totalSpendCapMinor":500000,"grants":[{"action":"payments.transfer","resources":["vendor.acme"],"maxAmountMinor":100000,"approvalRequiredAboveMinor":25000}]},"action":{"agent":"a1","action":"payments.transfer","resource":"vendor.acme","amountMinor":30000,"currency":"USD"}}'

This route takes bare claims, not the envelope, and does not check a signature.

What this server does not do

It does not issue or revoke mandates, execute an action, change an account, or call billing. It makes at most one API request per tool call and never retries automatically.

  • npm: @api-disk-integrations/agent-mandate-mcp
  • Official MCP Registry: io.github.API-Disk-Integrations/agent-mandate
  • source: API-Disk-Integrations/agent-mandate-mcp

Tool contract

There is exactly one tool, verify_action. Supply either one action or an actions array, never both. A batch contains 1–500 actions. Monetary amounts are non-negative integer minor units and require currency.

Example input:

json
{  "mandate": {    "mandate": {"id": "mnd_example"},    "signature": "caller-supplied-signature"  },  "action": {    "agent": "procurement-agent",    "action": "payments.transfer",    "resource": "vendor.acme",    "amountMinor": 2500,    "currency": "USD",    "at": "2026-09-05T20:00:00Z"  }}

Representative successful structured output:

json
{  "count": 1,  "receipts": [    {      "decision": "deny",      "mandateId": "mnd_example",      "violations": [{"code": "action_not_granted", "detail": "No matching grant"}]    }  ]}

Treat all three decisions literally. In particular, neither allow nor requires_approval executes the proposed action.

Errors, limits, and safety

  • If AGENT_MANDATE_API_KEY is absent, the tool returns an MCP error before making a request.
  • A provider error is reduced to its numeric HTTP status and an allowlisted code. Provider-controlled message and request-ID text is never returned to the model.
  • One tool call produces at most one HTTPS request to the fixed https://agentmandate-api.com/v1/verify endpoint. There is no automatic retry; Fetch uses explicit redirect: error, and redirect responses are rejected without a follow-up request.
  • The serialized UTF-8 request and decoded response body each have a hard 1 MiB (1,048,576-byte) limit. The request is measured before Fetch. The response is counted while streaming before JSON parsing, regardless of a missing, misleading, or chunked Content-Length representation.
  • The request timeout defaults to 30 seconds. A batch is also limited to 500 actions. Provider account rate and monthly usage limits still apply; consult the current product pricing and documentation before production use.
  • The server is read-only with respect to mandate, account, and billing state, but an API verification consumes the caller's metered allowance.
  • Node.js 20 or newer is required. This release is tested for MCP protocol revision 2026-07-28 and retains the SDK's listed 2025 compatibility revisions.

Links

The source link is not evidence that the npm package or Registry listing is available. Those two releases require their own public readback. A clone, install, download, tool call, or listing is not evidence of customer activation or revenue.

来源:README.md,提交 69ce46b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分