npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

x402-zetrix-mcp

v0.1.0

Published

x402 MCP tool server for Zetrix — AI agent payment tools (fetch_with_payment, get_wallet_info, check_payment_capability)

Readme

x402-zetrix-mcp

MCP (Model Context Protocol) server that gives AI agents (Claude, and any MCP-compatible LLM) automatic x402 payment capabilities on the Zetrix network.

Three tools exposed:

  • fetch_with_payment — HTTP fetch with automatic 402 payment handling
  • get_wallet_info — return configured wallet address and network
  • check_payment_capability — query ZTX balance from Zetrix RPC

Quick start (Claude Code / Claude Desktop)

Option A — Published package (recommended):

{
  "mcpServers": {
    "x402-zetrix": {
      "command": "npx",
      "args": ["-y", "x402-zetrix-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "your-ed25519-private-key",
        "X402_ADDRESS":     "Z...",
        "X402_NETWORK":     "zetrix:testnet"
      }
    }
  }
}

Add to:

  • Claude Code: ~/.claude/settings.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Option B — Local build (development):

pnpm --filter x402-zetrix-mcp build
# produces packages/mcp/dist/server-bundle.js
{
  "mcpServers": {
    "x402-zetrix": {
      "command": "node",
      "args": ["/absolute/path/to/packages/mcp/dist/server-bundle.js"],
      "env": {
        "X402_PRIVATE_KEY": "your-ed25519-private-key",
        "X402_ADDRESS":     "Z...",
        "X402_NETWORK":     "zetrix:testnet"
      }
    }
  }
}

Environment variables

| Variable | Required | Default | Description | |---|---|---|---| | X402_PRIVATE_KEY | Yes | — | ED25519 wallet private key | | X402_ADDRESS | Yes | — | Zetrix wallet address (Z…) | | X402_NETWORK | Yes | — | zetrix:mainnet or zetrix:testnet | | X402_NODE_HOST | No | auto-derived | RPC node hostname | | X402_NODE_PORT | No | (empty) | RPC node port | | X402_MAX_AMOUNT_PER_REQUEST | No | (no limit) | Max payment per request in smallest unit | | X402_ZTP20_DECIMALS | No | 6 | Decimal places for ZTP20 token display |

Programmatic use

import { createMcpTools } from 'x402-zetrix-mcp'

const tools = createMcpTools({
  wallet: {
    privateKey: process.env.X402_PRIVATE_KEY!,
    address:    process.env.X402_ADDRESS!,
    network:    'zetrix:testnet',
  },
  node: { host: 'test-node.zetrix.com', port: '' },
})

const result = await tools.fetch_with_payment({ url: 'https://api.example.com/data' })
console.log(result.amountPaidHuman)  // e.g. "0.01 ZTX"

Example prompts

"Use fetch_with_payment to get data from https://api.example.com/data"

"Fetch the premium dataset. Pay automatically if required."

Verify wallet before paying

Ask Claude to check funds before spending:

"Check my wallet status before fetching the paid resource."

Claude calls get_wallet_info and check_payment_capability to confirm the wallet is funded, then proceeds with fetch_with_payment. The response includes amountPaidHuman (e.g. "0.01 ZTX") so Claude can report the exact cost.

Ecosystem

| Package | Purpose | |---|---| | x402-zetrix-client | Library: createX402Fetch for programmatic use in Node.js/browser apps | | x402-zetrix-server | Express middleware to gate routes behind ZTX payment |

Node.js requirement

Node.js ≥ 18.

License

MIT — MyEG Services Berhad