solmachina-x402
v1.4.0Solana & Base DeFi intelligence for AI agents over x402: decisions, risk, signed receipts.
MCP server for SolMachina — verifiable Solana & Base DeFi intelligence, paid per call over the x402 protocol (exact USDC). No account, no API key. It gives any MCP-capable agent (Claude Code / Claude Desktop, Cursor, OpenCode, …) native tools to discover the catalog, sample an endpoint for free, learn exactly how to pay, buy any of the 16 products, and verify the signed receipt of each paid answer — offline. By default it targets https://api.solmachina.com. Point it elsewhere with X402_BASE_URL.
Summary extracted from the README.
solmachina-x402-mcp
MCP server for SolMachina — verifiable Solana & Base DeFi intelligence, paid per call over the x402 protocol (exact USDC). No account, no API key.
It gives any MCP-capable agent (Claude Code / Claude Desktop, Cursor, OpenCode, …) native tools to discover the catalog, sample an endpoint for free, learn exactly how to pay, buy any of the 16 products, and verify the signed receipt of each paid answer — offline.
Don't trust the API. Verify the answer. Every paid response ships an Ed25519-signed receipt (SIR) binding the exact bytes you received to SolMachina's public identity;
solmachina_verify_receiptchecks it with no network and no trust required, and the buying tools verify it automatically. Every value also names the RPC method it came from; the server reportsunknownrather than guessing, and never returns a "safe"/"scam" verdict. Not financial advice.
Install
Claude Code:
claude mcp add solmachina -s user -- npx -y solmachina-x402-mcp@latest
Or run directly:
npx -y solmachina-x402-mcp@latest
By default it targets https://api.solmachina.com. Point it elsewhere with X402_BASE_URL.
Tools
Free (no wallet):
solmachina_catalog— the x402 catalog (endpoints, USDC prices, networks, payTo) from/.well-known/x402.solmachina_sample— a FREE preview of any endpoint: its response shape/example, inputs and price, so you can decide before paying.solmachina_status— version, uptime, WAL entry count and the SHA-256 chain head (verifiable trust).solmachina_how_to_pay— the exact 402 → sign exact-USDC → retry flow, so an agent can pay with its own wallet.solmachina_verify_receipt— verify a paid answer's Ed25519 receipt (SIR) offline: proof of what you paid for, no trust required.
Paid (one buying tool per product, $ = USDC per call): solmachina_tipfloor ($0.001), solmachina_epoch ($0.001), solmachina_kamino_markets ($0.001), solmachina_priority_fee ($0.002), solmachina_dex_quote ($0.003), solmachina_nft_collection ($0.003), solmachina_sgp_checkpoint ($0.005), solmachina_trending_tokens ($0.005), solmachina_new_pairs ($0.005), solmachina_token_holders ($0.005), solmachina_tx_inspect ($0.01), solmachina_wallet_scan ($0.02), solmachina_token_risk ($0.028), solmachina_token_intel ($0.05), solmachina_batch_token_risk ($0.10), solmachina_pretrade ($0.10, flagship).
Buying tools return { status, data, receipt } where receipt.verified === true proves the answer is authentic (auto-checked).
Wallet model (important)
- The free tools need nothing.
- The buying tools settle a real exact-USDC x402 payment on behalf of the agent. They are disabled by default: without a configured wallet they return an open-gate explainer telling you to pay with your own wallet via
solmachina_how_to_pay. - To enable in-wrapper buying, set
X402_CLIENT_KEY_FILEto a JSON file holding a funded, agent-owned Solana keypair ({"secretKey":"<base58>"}or a raw base58 string). This wrapper never custodies funds and never holds SolMachina's income/gas keys — only the separate client key you give it.
Environment
| Var | Default | Meaning |
|---|---|---|
X402_BASE_URL |
https://api.solmachina.com |
Store base URL. |
X402_CLIENT_KEY_FILE |
(empty) | Path to the agent's funded Solana keypair. Empty ⇒ buying disabled (open gate). |
MCP_RATE_MAX |
30 |
Self-imposed tool-calls/min cap (never amplifies load onto the store). |
Verify everything
Nothing here asks you to trust it. Check solmachina_status for the live SHA-256 chain head, read the public ledger window at https://api.solmachina.com/ledger, and the honest x402 conformance matrix at https://api.solmachina.com/trust/x402.
License
MIT.