x402 Trinity
io.github.devmster/x402-trinity
v0.2.4Updated Sep 27, 2026stdio · npm
Give an agent a wallet. Pays for x402 resources within hard limits. Base + USDC, gasless.
Install
Needs 1 secret. Replace 3 placeholders with your own values.
Run in your terminal. Replace 3 placeholders.
claude mcp add x402-trinity -e 'X402_PRIVATE_KEY=<your-x402-private-key>' -e 'X402_MAX_PER_REQUEST=<your-x402-max-per-request>' -e 'X402_TOTAL_BUDGET=<your-x402-total-budget>' -- npx -y [email protected]Configuration
6 settings, 1 required secret. Snippets use placeholders; keep real values out of shared config.
X402_PRIVATE_KEYEnv var· required· secretPrivate key of the wallet that pays. Use a dedicated wallet holding only what you would accept losing. The server refuses to start without it.X402_MAX_PER_REQUESTEnv var· requiredHard ceiling for a single payment, in atomic units (USDC has 6 decimals, so 50000 is $0.05). Required: a model decides when payments happen, so the cap cannot come from the model.X402_TOTAL_BUDGETEnv var· requiredLifetime ceiling across all payments, in atomic units. Required for the same reason as the per-request cap.X402_BUDGET_FILEEnv var· optionalPath to a file that makes the lifetime budget survive restarts. Without it the total resets every time the server starts.X402_ALLOW_HOSTSEnv var· optionalComma-separated hosts that may be paid. Anything else is refused however convincing the challenge looks.X402_NETWORKSEnv var· optionalNetworks to accept. Defaults to base.
Links
Listed in the official MCP Registry since Sep 27, 2026. Mirrored daily; last checked Nov 26, 2026.