Agentβ™₯︎Age
Catalog

x402 Trinity

Official

by devmster Β· TypeScript

Give an agent a wallet. Pays for x402 resources within hard limits. Base + USDC, gasless.

io.github.devmster/x402-trinity (MCP Server)

The io.github.devmster/x402-trinity server provides an agent-side mechanism to pay for x402 resources automatically, using a wallet that enforces hard spending limits. It is described as a drop-in fetch replacement that uses a Base + USDC model and supports gasless payments.

πŸ› οΈ Key Features

  • x402 Payment Required handling for paid resources (402 responses)
  • Reads x402 challenges and validates them against configured hard limits
  • Signs and retries locally
  • Base + USDC wallet model
  • Gasless operation
  • Zero runtime dependencies (7 KB gzipped)

πŸš€ Use Cases

  • AI agents calling paid HTTP resources that return 402 Payment Required
  • Machine-to-machine requests where spending must stay within limits
  • Integrations using a fetch-style workflow without changing agent code

⚑ Developer Benefits

  • Drop-in fetch replacement
  • No hosted wallet service
  • Buyer and seller implementations in TypeScript; buyer in Python
  • Compatibility with MCP, via topics including β€œmcp” and β€œmcp-server”

⚠️ Limitations

  • Intended for x402 resource payment flows; does not address non-x402 paid resource types
  • Behavior described as locally handled; hosted wallet service is not used

Topics

ai-agentscloudflare-workersconstant-timecryptographyedge-computingeip-3009gasless-usdchttp-402machine-to-machinemcpmcp-servermeta-transactionspython-stdlibroboticsx402zero-dependency