k402-mcp
Pay-per-call AI & Blockchain APIs for AI agents, settled in Kaspa (KAS). No account, API key, or credit card required — agents prepay with KAS and calls are metered against the balance.
Session & Payment Management (free)
catalog— Browse all available services and their live KAS/USD pricesopen_session— Create a payment session and get a personal Kaspa deposit addresssession_status— Check current balance, deposits, and spending
Text Processing
summarize— Summarize text or a public URL to a specified word count (~$0.001)extract— Extract structured JSON from text using schema-constrained decoding (~$0.0015)rewrite— Rewrite text for tone, format, or length (~$0.001)classify— Classify text into 2–32 labels, single or multi-label (~$0.0003)
Web & Embeddings
read_url— Fetch a public webpage as clean markdown, optionally with key-fact bullets (~$0.0012)embed_text— Generate 768-dim embeddings for up to 64 texts (~$0.0003)search_index— Store documents in a named collection for semantic search (~$0.0015)search_query— Semantically query an indexed collection, returning top-k matches (~$0.0003)
Kaspa Blockchain Data
kaspa_balance— Get balance of any Kaspa mainnet address (~$0.00015)kaspa_utxos— Retrieve the UTXO set for a Kaspa address (~$0.0003)kaspa_tx_status— Check mempool status of a transaction (~$0.00015)kaspa_fee_estimate— Get current feerate buckets for Kaspa mainnet (~$0.00015)kaspa_network— Get network stats: DAA score, block count, difficulty, sync state (~$0.00015)
GPU Language Model Generation
generate— Run prompts on GPU model tiers (~$0.0015–$0.004):chat— Fast 7B modelreason— 35B reasoning modelcode— Code-specialized modelkaspa-expert— RAG-grounded Kaspa knowledge model
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@k402-mcpCheck Kaspa network status and summarize https://kaspa.org"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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, GPU model tiers, covenants-as-a-service (compile/derive/inspect/build/check/broadcast Silverscript covenants), and RISC Zero attestation-as-a-service (upload a guest, preflight for a cycle-exact quote, prove, verify). 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.
Hosted endpoint — zero install
The same server runs hosted at the public gateway (streamable HTTP):
https://x402-compute.68cxgfyr0.workers.dev/mcpClaude Code:
claude mcp add --transport http k402 https://x402-compute.68cxgfyr0.workers.dev/mcpHosted sessions are per-connection: open_session binds the payment session to your MCP
connection and returns the key — save it, and re-attach with use_session(<key>) after a
reconnect. Nothing is shared between connections.
Related MCP server: AgentPay
Install (local stdio)
pip install k402-mcpClaude Code:
claude mcp add k402 -- k402-mcpClaude 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 / llama / reason / think / code / kaspa-expert),covenant_compile/covenant_address/covenant_utxos/covenant_build/covenant_check/covenant_broadcast,prove_guest_upload/prove_preflight/prove_submit/job_status/job_result/attest_verify,payment_options,pay_per_callsession_status— watch the balance draw down (free)
New here? Start with open_session — one funded deposit address, and every call meters
against it. That's the whole loop. The other schemes (per-call coins, or trustless payment
channels) are for when you want them; payment_options explains each.
Trustless payment channels (kaspa-channel)
Where the gateway offers it, channel_config/channel_status expose a covenant payment channel:
your KAS sits in a Kaspa L1 covenant (not the merchant's wallet), and you pay per call with signed
vouchers — the merchant can only ever claim what you signed, and you reclaim the rest. Opening and
funding a channel needs your Kaspa key, so that part runs in the k402
Python client (k402.channel); these MCP tools cover discovery and status.
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. Payments settle either custodial-prepaid (sessions) or trustlessly via
kaspa-channelcovenant payment channels (live on mainnet, covenant unaudited — channel sizes are capped). 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceMCP server for AgentPay — the payment gateway for autonomous AI agents. Fund a wallet once, give your agent the key, and it discovers, provisions, and pays for tool APIs on its own. One key, every tool.Last updated1121MIT
- Alicense-qualityCmaintenanceMCP server for AgentPay — the payment gateway for autonomous AI agents. Fund a wallet once, give your agent the key, and it discovers, provisions, and pays for tool APIs on its own. One key, every tool.Last updated1121MIT
- Alicense-qualityBmaintenanceAn MCP server for autonomous AI agents to discover, pay for, and rate paid APIs on Casper with policy-controlled approvals and on-chain reputation.Last updatedApache 2.0
- AlicenseBqualityDmaintenanceMCP server providing AI agents access to 38 pay-per-call APIs (LLM, image, code, audio, crypto, web, IPFS) via HTTP 402 micropayments in USDC/USDm.Last updated22295MIT
Related MCP Connectors
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kali123411/k402-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server