Koskamo

x402 Trinity MCP

A zero-dependency HTTP 402 fetch replacement that allows autonomous AI agents to pay for resources using gasless USDC on Base. It functions as a buyer, seller, and MCP server, enabling agents to handle payments with hard spending limits without a hosted wallet service.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

x402 Trinity MCP logo, by devmsterCommunity listingLocal stdioSource reviewed; not executedPublished by devmster
You need:npm install x402-trinity
Vendor documentation

What you can do with it

  • Allow an AI agent to pay for paid APIs or datasets using USDC
  • Serve as an MCP server to manage payment challenges for agents
  • Charge for resources by implementing the seller guard logic
  • Install globally to patch fetch and handle 402 responses automatically

Source and maintenance

Community listingRegistry 0.2.4
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

x402-trinity 0.2.4

npm
x402-trinity package definition
{
  "version": "0.2.4",
  "transport": "stdio",
  "identifier": "x402-trinity",
  "registryType": "npm",
  "environmentVariables": [
    {
      "name": "X402_PRIVATE_KEY",
      "format": "string",
      "isRequired": true,
      "description": "Private key of the wallet that pays. Use a dedicated wallet holding only what you would accept losing. The server refuses to start without it."
    },
    {
      "name": "X402_MAX_PER_REQUEST",
      "format": "string",
      "isRequired": true,
      "description": "Hard 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.",
      "placeholder": "50000"
    },
    {
      "name": "X402_TOTAL_BUDGET",
      "format": "string",
      "isRequired": true,
      "description": "Lifetime ceiling across all payments, in atomic units. Required for the same reason as the per-request cap.",
      "placeholder": "1000000"
    },
    {
      "name": "X402_BUDGET_FILE",
      "format": "filepath",
      "description": "Path to a file that makes the lifetime budget survive restarts. Without it the total resets every time the server starts.",
      "placeholder": "./.x402-budget.json"
    },
    {
      "name": "X402_ALLOW_HOSTS",
      "format": "string",
      "description": "Comma-separated hosts that may be paid. Anything else is refused however convincing the challenge looks.",
      "placeholder": "api.example.com"
    },
    {
      "name": "X402_NETWORKS",
      "format": "string",
      "description": "Networks to accept. Defaults to base.",
      "placeholder": "base"
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "x402-trinity-mcp": {
      "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>",
        "X402_BUDGET_FILE": "<YOUR_X402_BUDGET_FILE>",
        "X402_ALLOW_HOSTS": "<YOUR_X402_ALLOW_HOSTS>",
        "X402_NETWORKS": "<YOUR_X402_NETWORKS>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "x402-trinity-mcp": {
      "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>",
        "X402_BUDGET_FILE": "<YOUR_X402_BUDGET_FILE>",
        "X402_ALLOW_HOSTS": "<YOUR_X402_ALLOW_HOSTS>",
        "X402_NETWORKS": "<YOUR_X402_NETWORKS>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "x402-trinity-mcp": {
      "type": "stdio",
      "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>",
        "X402_BUDGET_FILE": "<YOUR_X402_BUDGET_FILE>",
        "X402_ALLOW_HOSTS": "<YOUR_X402_ALLOW_HOSTS>",
        "X402_NETWORKS": "<YOUR_X402_NETWORKS>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "x402-trinity-mcp": {
      "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>",
        "X402_BUDGET_FILE": "<YOUR_X402_BUDGET_FILE>",
        "X402_ALLOW_HOSTS": "<YOUR_X402_ALLOW_HOSTS>",
        "X402_NETWORKS": "<YOUR_X402_NETWORKS>"
      }
    }
  }
}

Let your agent find its tools

Find servers like x402 Trinity MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.