What You’re Building
An AI agent that can:- Discover merchants from the decentralized on-chain registry
- Read their service manifests and pricing
- Check their reputation and trust scores
- Pay for services with USDC on Solana
- Return the purchased data to you
Option A: MCP Client (Zero Code)
Connect Claude Desktop to the MCP server and let it handle everything.Create & Fund a Wallet
Open Claude and ask: “Create a new wallet for me”Claude will create an agent wallet and display the public key. Fund it with:
- Devnet SOL (for gas) — use faucet.solana.com or
solana airdrop 2 <PUBLIC_KEY> --url devnet - Devnet USDC — transfer from your existing wallet
What Claude Does Autonomously
| Step | MCP Tool | What happens |
|---|---|---|
| 1 | discover_registry | Scans Solana for registered merchants |
| 2 | read_manifest | Reads merchant’s services + pricing |
| 3 | check_reputation | Checks trust score (success rate, total transactions) |
| 4 | probe_x402 | Confirms on-chain payment requirements |
| 5 | Policy check | Wallet policy engine approves the spend |
| 6 | pay_x402_invoice | Sends USDC → Solana tx confirmed |
| 7 | Data received | Returns the purchased data to you |
Option B: SDK Integration (Programmatic)
If you want to build a buyer agent programmatically:Available MCP Tools
Discovery (free, read-only)
| Tool | Input | Description |
|---|---|---|
discover_registry | (none) | Scan the on-chain registry for all registered merchants |
read_manifest | manifest_url | Read a merchant’s services, pricing, and capabilities |
check_reputation | reputation_url | Check merchant trust score and success rate |
Payment
| Tool | Input | Description |
|---|---|---|
probe_x402 | url | Check the price of an x402 endpoint without paying |
pay_x402_invoice | url, wallet_id | Pay for an endpoint and receive the data |
Wallet
| Tool | Input | Description |
|---|---|---|
create_wallet | label | Create a new agent wallet |
get_balance | wallet_id | Check wallet balance (SOL + SPL tokens) |
send_sol | wallet_id, to, amount | Transfer SOL |
send_token | wallet_id, mint, to, amount | Transfer SPL tokens |
How the On-Chain Registry Works
The registry is fully decentralized — it lives on the Solana blockchain, not in any database.- Registration: Merchants send an SPL Memo transaction containing their manifest URL — cost: ~$0.001, permanent.
- Discovery: Buyers call
getSignaturesForAddresson the registry wallet, parse valid memos, and verify each manifest is live. - No gatekeeper: Anyone can register. No approval process. No single point of failure.
- Survivability: If every server goes offline, any buyer can reconstruct the full registry from a fresh RPC call.