Kaspa x402 agent payer β pay x402 v2 services on Kaspa (KAS) per call, no account or API key
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An agent-centric payer for x402 services settled on Kaspa L1. One package, three surfaces over the same proven payment core:
import { openWallet, payExact } from "kx402" to pay x402 offers from your own code.kx402 offer|pay|balance|addr for humans and scripts.kx402-mcp into an agent (Claude, etc.) so it can pay Kaspa x402 services as a tool.It speaks the x402 v2 exact / standard-native flow against the @kaspa-x402 binding β conforming to the standard wire format, not extending it. It's the demand side of the KaspaΒ·402 marketplace.
β οΈ Alpha, and
payspends real funds. Use testnet-10 first. Keep funding keys in0600files, never in git.
The internet's payment plumbing assumes a person is buying: you sign up, get an API key, put a card on file, click "approve." An AI agent can't do any of that β and you don't want to hand it your credit card. So agents can reason and act, but the moment a task needs a paid tool (data, compute, a model, an API), a human has to set up the billing first.
kx402 closes that gap. It gives an agent a wallet it can actually operate, and lets it pay per use on its own:
Think of it as a prepaid card with strict rules baked in: the agent can buy the specific things it needs, in tiny amounts, whenever it needs them, but it physically can't overspend or pay a stranger.
Kaspa signing needs the official rusty-kaspa v2.0.0 nodejs WASM SDK β npm's kaspa-wasm is a different/stale ABI and fails with "memory access out of bounds". npm run fetch-sdk grabs the right one; then point KASPA_X402_KASPA_WASM_MODULE at the printed kaspa.js path.
Copy .env.example to .env and fill it in (or pass any of these as flags / env vars):
| Variable | Meaning |
|---|---|
KASPA_X402_KASPA_WASM_MODULE | Path to the v2.0.0 nodejs WASM SDK kaspa.js |
KASPA_X402_FUNDING_WALLET | wallet-key:/path/to/wallet.key or a raw 64-hex key |
KASPA_X402_NETWORK | kaspa:mainnet or kaspa:testnet-10 (default) |
KASPA_X402_RPC_URL | Optional; a public PNN node is resolved automatically if unset |
Input rides in the query on an exact GET β use --text / --prompt / --model / --input as the resource expects. Safety flags: --max <sompi> caps the spend; --dry builds the signed tx without broadcasting.
Every payment is bounded by a fundingPolicy derived from the offer itself β it will only pay the offer's payTo, at its profile, up to your max.
Run kx402 mcp (or the kx402-mcp bin) β a stdio server exposing kaspa_x402_address, kaspa_x402_balance, kaspa_x402_offer, and kaspa_x402_pay (which spends real funds, bounded by max_sompi). Example client config:
On mainnet, kx402 uses non-hosted settlement: it broadcasts the signed tx itself, waits for acceptance on the same REST indexer the gateway verifies against, then presents the PAYMENT-SIGNATURE β so the gateway settles by observing the accepted tx and never needs to broadcast. All within the standard x402 v2 lifecycle.
@kaspa-x402 β the Kaspa x402 binding this builds on.MIT
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/kx402)<a href="https://allmcps.com/mcp/kx402"><img src="https://allmcps.com/api/badge/kx402?style=directory" alt="Kx402 on AllMCPs" /></a>