You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wait for the authoritative 402, buy a short-lived AGPD-1 decision, and locally verify its Ed25519/JCS proof, issuer, freshness, thresholds, and exact payment tuple before signing
persist the policy and ceiling across session recovery/restart, and refuse silent payment-mode changes
isolate policy-approved retry signatures per async call so concurrent tool calls cannot consume each other's authorization
Safety properties
existing --x402 behavior is unchanged unless the policy flag is supplied
protected payments fail closed on network, decision, signature, issuer, freshness, threshold, field, resource-origin, or amount-ceiling mismatch
the policy-decision purchase is separately pinned to exact/Base mainnet/USDC/the Agent Guild treasury/a $0.01 maximum; redirects are refused
guarded mode disables speculative pricing-metadata signing and does not use the bridge's process-wide payment cache
non-HTTP mcp:// payment resources remain an explicit fail-closed compatibility boundary because AGPD-1 currently requires an HTTP(S) resource
The policy decision is itself a paid x402 call, so the wallet needs Base USDC for the decision and protected tool call.
Thanks for the detailed writeup. I'm going to close this, and I want to be clear about why.
The PR wires agent-guild-5d5r.onrender.com and the treasury address 0xaa4e…a8e5 into mcpc's payment path, and both belong to the author of the PR. That isn't disclosed here, and the README/SKILL.md changes actively steer users and agents toward the flag. A change that routes $0.01 per tool call to the submitter needs to say so up front — and even disclosed, we're not going to hardcode a paid third-party dependency into the payment path.
On the security argument: the credential's Ed25519 proof is verified against a key fetched from /.well-known/agent-guild-did.json on the same host, over the same TLS connection, with no pinning. Whoever controls that server controls both the credential and the key that validates it, so the verification adds nothing on top of TLS. And a service that has never seen the MCP server can't meaningfully judge whether a payment to it is legitimate — max_risk: 32.99 / min_confidence: 0.5 are undocumented thresholds against an opaque model.
Separately, it isn't mergeable as it stands: it rewrites getOrSignPayment from a pre-#368 base and returns the cached signature before checking whether the server actually charges for the tool, which reintroduces the bug #368 fixed (a live payment authorization attached to free tool calls). It also carries a duplicate of the already-merged --skill alias from #367, has no CHANGELOG entry, and conflicts with main.
The genuinely useful part is local and needs no service: the per-payment ceiling. I've implemented that in #372 — --x402-max-amount <usd>, enforced in signPayment() so all three payment paths are covered, persisted across restarts. Thanks for the nudge on it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--x402-policy agent-guild --x402-max-amount <atomic>Safety properties
--x402behavior is unchanged unless the policy flag is suppliedmcp://payment resources remain an explicit fail-closed compatibility boundary because AGPD-1 currently requires an HTTP(S) resourceThe policy decision is itself a paid x402 call, so the wallet needs Base USDC for the decision and protected tool call.
Validation
git diff --checkNo live payments were made while implementing or testing this change.