x402 Trinity

io.github.devmster/x402-trinity

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

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "x402-trinity": {
      "command": "npx",
      "args": [
        "-y",
        "x402-trinity@0.2.4"
      ],
      "env": {
        "X402_PRIVATE_KEY": "<your X402_PRIVATE_KEY>",
        "X402_MAX_PER_REQUEST": "<your X402_MAX_PER_REQUEST>",
        "X402_TOTAL_BUDGET": "<your X402_TOTAL_BUDGET>"
      }
    }
  }
}
Environment variables
  • X402_PRIVATE_KEYrequiredsecretPrivate 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_REQUESTrequiredHard 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_BUDGETrequiredLifetime ceiling across all payments, in atomic units. Required for the same reason as the per-request cap.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
0.2.4
Registry
active
Published
9/27/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that x402 Trinity is listed here — it’s also the link we check for a free listing.

x402 Trinity — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-devmster-x402-trinity?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="x402 Trinity — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![x402 Trinity — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-devmster-x402-trinity?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.