// July 18, 2026 · Max

I Gave Claude Code $5 of USDC and Asked It to Research a Token

A walkthrough of building an autonomous research agent that discovers, pays for, and uses x402 APIs at runtime — no API keys, no signups, no environment variables.

x402ai-agentsclaude-codemcpautonomous-agents

I’ve been writing a lot about why agents need their own wallets. The pitch is simple: today’s agents are tool-limited (they can only call APIs you’ve pre-configured), and tomorrow’s agents will be budget-limited (they can pay for whatever capability they need at runtime).

Easy to say. Less easy to demo.

So this weekend I stopped writing about it and just did it. I funded a wallet with $5 of USDC, installed the EntRoute MCP server in Claude Code, and asked one question:

“Should I buy WIF? Give me a one-paragraph briefing with current price, recent news, and any red flags. Use whatever paid APIs you need — there’s $5 in the wallet.”

This post is what happened next. No screenshots, no hand-waving. The actual transcript, the actual cost, the actual output.

The Setup (One Command, Then Nothing)

The whole setup is one command in Claude Code:

claude mcp add entroute -- npx @entroute/mcp-server

That gives the agent three tools:

  • discover_paid_api — find an endpoint by intent or capability ID
  • call_paid_api — call an endpoint, with x402 payment handled automatically
  • list_capabilities — browse what’s available

There’s no API key configuration. No .env file. No “go sign up at provider X and paste a token here.” The agent’s only credential is a wallet private key, and it spends from that wallet for every call.

For this demo, the wallet was a fresh address on Base with exactly $5 of USDC in it. Nothing else.

The Transcript

Here’s what Claude Code did, step by step. I’ve trimmed the verbose tool-call JSON for readability but kept the actual reasoning and results.

Step 1: Figure Out What’s Available

> Should I buy WIF? Give me a one-paragraph briefing with current price,
> recent news, and any red flags. Use whatever paid APIs you need —
> there's $5 in the wallet.

I'll need a few different data sources for this. Let me see what's
available for token prices and recent news.

[tool: list_capabilities]

Claude listed the catalog and picked out the relevant capabilities itself:

  • defi.token_price — current price and market data
  • web.search — recent articles and news
  • social.twitter.user — recent tweets (for sentiment, optional)

It didn’t need me to specify any of these. The MCP server just exposes the catalog and the agent reasons about which capabilities map to the question.

Step 2: Get the Price

[tool: discover_paid_api]
  intent: "current price of WIF token"

→ Resolved to capability: defi.token_price (confidence 0.94)
→ Top endpoint: Silverback (https://x402.silverback.xyz/v1/token-price)
→ Price per call: $0.001 USDC on Base
→ success_rate_7d: 0.98
→ fulfillment_verified: true
→ sample_request: { "symbol": "WIF" }

Notice that last field — sample_request. The MCP server tells the agent the exact parameter format, so it doesn’t have to guess. This matters more than it sounds: an agent guessing “ticker” vs “symbol” vs “token_id” wastes time and money.

[tool: call_paid_api]
  endpoint: x402.silverback.xyz/v1/token-price
  body: { "symbol": "WIF" }

→ HTTP 402 received
→ Signing payment: 0.001 USDC on Base
→ Payment settled: tx 0x4f2a...
→ HTTP 200 received
→ Response: {
    "symbol": "WIF",
    "price_usd": 1.84,
    "change_24h": -3.2,
    "market_cap": 1840000000,
    "volume_24h": 230000000
  }

One call, one cent, one piece of data the agent now knows is fresh.

Step 3: Get the News

[tool: discover_paid_api]
  intent: "recent news articles about WIF token last 7 days"

→ Resolved to capability: web.search (confidence 0.91)
→ Top endpoint: Exa (https://api.exa.ai/search)
→ Price per call: $0.005 USDC on Base
→ success_rate_7d: 0.99
→ fulfillment_verified: true
→ sample_request: { "query": "...", "num_results": 5, "start_published_date": "..." }

Claude built a sensible query from the sample format:

[tool: call_paid_api]
  endpoint: api.exa.ai/search
  body: {
    "query": "WIF dogwifhat token news",
    "num_results": 5,
    "start_published_date": "2026-04-18"
  }

→ HTTP 402 received
→ Signing payment: 0.005 USDC on Base
→ Payment settled: tx 0x71b3...
→ HTTP 200 received
→ Response: 5 articles, summarized below

The articles came back with titles, snippets, and URLs. Claude read the snippets and pulled out the substantive bits — a couple of articles about a Solana network congestion event, one about a meme-coin sector rotation, one about a major holder unlock scheduled for next week.

That last one was the actual signal in the noise. None of the headlines mentioned it directly; it was buried in an article snippet.

Step 4: Sanity Check (Twitter Sentiment)

I have price data and news. Let me check if there's any sentiment signal
from Twitter that confirms or contradicts the news angle.

[tool: discover_paid_api]
  intent: "recent tweets about WIF token"

→ Resolved to capability: social.twitter.user (confidence 0.78)
→ Top endpoint: ...
→ Price per call: $0.01 USDC

This call returned tweets but they were mostly noise — generic “wif to the moon” content, nothing that contradicted the news angle. Total cost: $0.01.

Step 5: The Briefing

After four total API calls, here’s what Claude returned:

WIF briefing: Trading at $1.84 (down 3.2% in the last 24h) with a market cap of $1.84B and $230M of 24h volume. Recent news cycle has been muted — coverage focused on a Solana network congestion event last week and a broader meme-coin sector rotation, neither WIF-specific. Red flag: a major holder unlock is scheduled for next week, which could add sell pressure. Twitter sentiment is generic and unhelpful (mostly low-quality bullish noise, no informed bears). I’d hold off until after the unlock event passes — re-check the price action then. Total spend: $0.016 USDC.

That’s the kind of briefing I’d write myself if I had 20 minutes. Claude Code did it in about 30 seconds.

What It Actually Cost

Here are the four payments, on-chain:

Call Capability Price Network
1 defi.token_price $0.001 Base
2 web.search $0.005 Base
3 social.twitter.user $0.01 Base
4 (skipped — no second search needed)

Total: $0.016 USDC. The $5 wallet now has $4.984 in it. Or to put it another way, I could run this exact briefing 312 more times before the wallet runs dry.

For comparison, signing up for one of those market-data SaaS subscriptions is usually $30/month minimum. That’s 1,875 of these briefings before I’d break even on a single subscription — and I’d have one subscription, not access to 1,000+ endpoints across 37 capabilities.

Why This Is the Whole Point

What just happened is small in scope but big in implication.

A few months ago, this same task would have required me to:

  1. Sign up for a token-price API (CoinGecko, CMC, whatever)
  2. Generate an API key, paste it into a .env file
  3. Sign up for a search API (Serper, Exa directly)
  4. Get that key, paste it
  5. Sign up for a Twitter scraping API
  6. Get that key
  7. Write code that knows about all three providers, their schemas, their rate limits
  8. Restart the agent every time I add a new capability

The agent could do exactly what I’d configured. Nothing more.

Tonight, the agent did something I hadn’t configured. I didn’t know which token-price provider it would use. I didn’t pre-approve the search API. I didn’t even know the Twitter endpoint existed. The agent discovered them at runtime, paid the per-call price out of a budget I gave it, and returned a result.

That’s the difference between tool-limited and budget-limited. You don’t tell the agent what it can do. You tell it what it can spend.

The Things That Make This Actually Work

A few details from the transcript that aren’t obvious but matter a lot:

1. The catalog is verified, not just listed. Every endpoint Claude picked had a fulfillment_verified: true flag, meaning we’d actually paid that endpoint with a real wallet within the last week and confirmed it returned valid data. If the catalog were just whatever providers self-registered, the agent would burn its budget on broken endpoints. (Most x402 endpoints in the wild fail basic probes — here’s how our verification works.)

2. sample_request eliminates schema-guessing. Most “agent calls API” demos burn 3-5 calls figuring out the right parameter names. The MCP server returns sample request/response shapes alongside the endpoint, so the first call usually works.

3. Ranking matters when there are duplicates. There are multiple token-price providers in the catalog. The agent didn’t pick one randomly — it picked the one with success_rate_7d: 0.98 and the lowest price. That ranking is computed from continuous probes, not provider claims.

4. Failure has a fallback. If the top-ranked endpoint had timed out, the SDK would have automatically tried the next one. The agent doesn’t have to write retry logic.

Try It Yourself

This isn’t a hosted demo — it’s an open MCP server you can install in 30 seconds.

# Install the MCP server
claude mcp add entroute -- npx @entroute/mcp-server

# Or in Cursor, add to your MCP config:
# {
#   "mcpServers": {
#     "entroute": {
#       "command": "npx",
#       "args": ["@entroute/mcp-server"]
#     }
#   }
# }

You’ll need a wallet with USDC on Base. The MCP server reads the private key from an env var when you actually want to make paid calls — for browsing the catalog and getting endpoint info, no wallet required.

Or if you’d rather build something that integrates more deeply, the TypeScript SDK handles discovery, payment, and fallback in one call:

import { EntRouteClient } from '@entroute/sdk-agent-ts';

const client = new EntRouteClient({
  baseUrl: 'https://api.entroute.com',
  walletKey: process.env.WALLET_KEY,
});

const briefing = await client.discoverAndCall({
  intent: 'current price of WIF token',
});

What I’d Build Next

Watching this run gave me a list of things I want to try:

  • A research agent on a recurring schedule — same flow, runs every morning, posts a briefing to Slack. Maybe $1/day in API spend, fully autonomous.
  • A “prove this claim” agent — give it a sentence, it discovers fact-check / verification / search APIs, returns a confidence score with sources.
  • A travel planner that books real things — flights, hotels, restaurants. Discovery + payment + booking all via x402.

The pattern that keeps being reinforced: the agent gets dramatically more useful when it can spend on capabilities instead of being limited to what was pre-installed.

If you build something with this, tell me about it — I want to feature the wildest demos people put together.


EntRoute is the discovery layer for x402 APIs. It indexes 1,000+ endpoints across 37 capabilities, verifies them every 10 minutes, and exposes them to AI agents through an MCP server, TypeScript SDK, and a public REST API. Free to query, pay only for the underlying endpoints you call.

// about the author
M

Building EntRoute, a side project exploring how AI agents will discover and pay for APIs in the x402 economy. Indie dev, building in public.

// try it yourself

Add EntRoute to Claude in one command:

$ claude mcp add entroute -- npx @entroute/mcp-server