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

@three-ws/x402-mcp

v0.2.1

Published

Give any AI agent a self-custodial x402 wallet. Search the live bazaar, inspect an endpoint's price without paying, and pay_and_call any x402 service in USDC or $THREE from your own Solana key — real @x402 settlement, bounded by spend caps. No custodial w

Readme


A Model Context Protocol server that turns any AI assistant into an autonomous economic agent on the x402 network. Search the live bazaar for paid services, read an endpoint's price before committing money, and pay_and_call any x402 service in USDC — settled on Solana with your own key, never a custodial wallet.

This is the buyer side of the three.ws agent economy. The payment dance and Solana exact-scheme signing are handled by the real @x402/* libraries — nothing is mocked.

Install

npm install @three-ws/x402-mcp

Or run with npx:

SOLANA_SECRET_KEY=<base58> npx @three-ws/x402-mcp

Quick start

Claude Code, one line:

claude mcp add x402 --env SOLANA_SECRET_KEY=<base58> -- npx -y @three-ws/x402-mcp

Claude Desktop / Cursor (claude_desktop_config.json or mcp.json):

{
	"mcpServers": {
		"x402": {
			"command": "npx",
			"args": ["-y", "@three-ws/x402-mcp"],
			"env": {
				"SOLANA_SECRET_KEY": "<base58 secret of the wallet that holds USDC>",
				"SOLANA_RPC_URL": "https://your-rpc-provider",
				"MAX_PAY_USD": "1"
			}
		}
	}
}

SOLANA_SECRET_KEY is only needed to spend (pay_and_call, and x402_wallet defaulting to your wallet). find_services and inspect_endpoint work with no key.

Tools

| Tool | Type | What it does | | ------------------ | ------------- | -------------------------------------------------------------------------------------------------------- | | x402_wallet | read-only | A wallet's address + live SOL/USDC balance. Defaults to your signer wallet — confirm funds before paying. | | find_services | read-only | Search the live x402 bazaar (PayAI + Coinbase CDP) for paid HTTP/MCP services with prices. | | inspect_endpoint | read-only | Read any endpoint's 402 payment requirements (scheme, network, asset, price, pay-to) without paying. | | pay_and_call | execution | Pay an x402 endpoint in USDC from your Solana key and return its result. Bounded by MAX_PAY_USD. |

Safety

pay_and_call carries destructiveHint: true, so annotation-aware clients (Claude Code, Claude Desktop, Cursor) prompt before running it. Beyond the client hint, every payment is bounded server-side: it probes the 402 first and refuses if the price exceeds max_usd or MAX_PAY_USD (default $1) before any money moves, and with REQUIRE_CONFIRM on (default) the call refuses until re-issued with confirm: true. Only the Solana (solana:*) exact-scheme requirement is settled — with the key you control.

Input parameters

x402_walletaddress (optional base58; defaults to the signer wallet).

find_servicesquery (required), type (http | mcp, default http), network (CAIP-2 filter), max_price_usdc, limit (1–100).

inspect_endpointurl (required), method (GET | POST), body (object).

pay_and_callurl (required), method (GET | POST), body (object), max_usd (lowers the cap for this call), secret (per-call signer override), confirm (must be true when REQUIRE_CONFIRM is on).

Example

// inspect_endpoint — what does it cost? (no payment)
> { "url": "https://three.ws/api/x402/vanity?prefix=ab" }
{
  "ok": true, "paid": true,
  "accepts": [
    { "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFW…", "price": 50000 }
  ],
  "payable_with_this_wallet": true
}

// pay_and_call — confirm:true required by default
> { "url": "https://three.ws/api/x402/vanity?prefix=ab", "confirm": true }
{ "ok": true, "paid": true, "payer": "Gx5E…", "price_usd": 0.05, "settlement": { … }, "result": { … } }

Requirements

  • Node.js >= 20.
  • A Solana mainnet RPC endpoint (https; only http://localhost is allowed for dev). Public cluster works for reads; bring your own for payment traffic.
  • To pay: a Solana wallet holding USDC, as a base58 SOLANA_SECRET_KEY (or per-call secret).

Environment variables

| Variable | Required | Default | | ------------------- | ------------ | ------------------------------------- | | SOLANA_SECRET_KEY | to pay only | — | | SOLANA_RPC_URL | no | https://api.mainnet-beta.solana.com | | MAX_PAY_USD | no | 1 | | REQUIRE_CONFIRM | no | true | | THREE_WS_BASE | no | https://three.ws |

Links

  • Homepage: https://three.ws
  • MCP catalog: https://three.ws/docs/mcp
  • Changelog: https://three.ws/changelog
  • Issues: https://github.com/nirholas/three.ws/issues
  • License: Apache-2.0 — see LICENSE