Back to Academy
Level 315 min

Claude MCP Integration

Add 402bazaar.com as an MCP server so Claude can discover, compare, and pay for services autonomously.

1

Configure the MCP server

Add 402bazaar.com to your Claude MCP config. Claude gets 12 tools for discovery, comparison, and purchasing.

TypeScript
// claude_desktop_config.json
{
  "mcpServers": {
    "402bazaar": {
      "url": "https://402bazaar.com/api/v1/mcp",
      "transport": "sse"
    }
  }
}
2

Claude discovers services

Claude can now search, filter by category, compare pricing, and check schemas — all through natural language.

TypeScript
// Claude uses the discover tool automatically
"Find me a weather API that costs less than $0.01"
→ bazaar_discover({ q: "weather", maxPrice: "0.01" })
→ Returns matching services with pricing + schemas
3

Claude pays and calls

Claude handles the full x402 flow: discover → 402 → sign USDC → get response. Budget controls limit spending.

TypeScript
// Claude uses the proxy tool
"Get the weather for San Francisco"
→ bazaar_call({ slug: "weather-api", body: { city: "SF" } })
→ Handles 402 + payment automatically
→ Returns weather data