MCP server for the k402 agent-payable API catalog on Kaspa — text tools, chain data, and GPU inference, paid per call in KAS with no account or API key
Project description
k402-mcp — pay-per-call APIs for AI agents, settled in Kaspa
An MCP server that gives any agent (Claude Code, Claude Desktop, agent SDKs) a catalog of agent-payable APIs: text tools (summarize, schema-guaranteed extraction, classify, rewrite), web reading, embeddings + semantic search, live Kaspa mainnet chain data, and GPU model tiers. No account, no card, no API key — the agent opens a session, gets a personal KAS deposit address, and every call meters against the prepaid balance. Prices are USD-pegged, fractions of a cent per call, settled on Kaspa L1 (sub-second, ~zero fees).
The payment loop is agent-native: an unfunded call returns instructions ("send KAS to this address, this call costs X"), so an agent can discover the service, learn how to pay, and use it autonomously — the x402 idea, on Kaspa.
Install
pip install k402-mcp
Claude Code:
claude mcp add k402 -- k402-mcp
Claude Desktop / generic MCP config:
{ "mcpServers": { "k402": { "command": "k402-mcp" } } }
Env (all optional): K402_GATEWAY (defaults to the public gateway), K402_SESSION (pin a funded
session key), K402_STATE (where the auto-opened session persists, default ~/.k402/session.json).
Use
catalog— see every service and its live KAS/USD price (free)open_session— get a session + personal Kaspa mainnet deposit address (free); fund it from any wallet (min 0.25 KAS — confirmed in seconds)- Call anything:
summarize,extract,classify,rewrite,read_url,embed_text,search_index/search_query,kaspa_balance,kaspa_utxos,kaspa_tx_status,kaspa_fee_estimate,kaspa_network,generate(tiers: chat / reason / code / kaspa-expert) session_status— watch the balance draw down (free)
Example, in Claude Code after claude mcp add:
"Use the k402 tools to check the current Kaspa network status and summarize https://kaspa.org"
The first call returns how-to-pay instructions; fund the deposit address it gives you and retry.
Notes & honest caveats
- Prototype. The payment rail is custodial-prepaid today (a trustless covenant-based settlement layer — the k402 protocol on Kaspa L1 — is in the works). Keep balances small: a few KAS covers thousands of calls.
- Paid tools return
payment_required+ instructions instead of failing opaquely. - The gateway rate-limits per IP; prices float with KAS/USD, so
catalogshows current numbers. - Need KAS? Any exchange or wallet works — deposits are plain mainnet transfers.
mcp-name: io.github.Kali123411/k402
MIT © Kaspa Lab
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file k402_mcp-0.1.1.tar.gz.
File metadata
- Download URL: k402_mcp-0.1.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f465297f78a3b7f44728c2f9c2cbf8ffb5deec33feff00da0ee4e91c94b3a4fd
|
|
| MD5 |
0114c11cf9e726a10c21218e43b8b5f5
|
|
| BLAKE2b-256 |
45fa2ffaccab1a28a1ddd86487ac36f4a82b7cd32e135ac87cb7a8a5dcefb100
|
File details
Details for the file k402_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: k402_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa45c5f10eb66d087394eba12658a2311d2358237527b829c5a31c8b8fd04dd9
|
|
| MD5 |
f651a5ee647315af669a919834fb73cd
|
|
| BLAKE2b-256 |
5cb6dbd8398c3663810002e57d00ada0db09400cedd86d809ef0166d573049ef
|