Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

5.2 KB
Raw Blame

three.ws x402 Bazaar — MCP server

Discover paid agent services across the live x402 facilitator network — search, browse, and price any service from inside Claude, Cursor, or any MCP client. Registered with the MCP Registry as io.github.nirholas/threews-x402-bazaar.

  • Endpoint: https://three.ws/api/mcp-bazaar
  • Transport: Streamable HTTP (MCP 2025-06-18)
  • Auth: OAuth 2.1 (same three.ws authorization server as /api/mcp) or x402
  • Data: live /discovery/resources from the configured x402 facilitators, never synthetic listings. search_services scores against an in-process copy of the merged catalog that is refreshed at most every 60 seconds (BAZAAR_CATALOG_TTL_MS); browse_services, get_service and bazaar_service_details query the facilitators on every call

Tools

Tool What it does
search_services(query, type?, network?, max_price_usdc?, limit?) Ranked search over the merged facilitator catalog.
browse_services(type?, network?, max_price_usdc?, limit?) List services without a query — "what can I pay for?".
get_service(resource_url, tool_name?) Full payment requirements (price, asset, network, recipient), input/output schema, and a ready pay link.
bazaar_service_details(resource_url, tool_name?) Live price only: cheapest across networks plus a per-network breakdown. Built for price tracking on a schedule.
read_resource(uri?, format?) Reads a three:// resource (see below) for clients that show tools but not resources: three://x402/services (the x402 service catalog), three://marketplace (paid agent skills and services) and three://me. Omit uri to list every resource you can read; format: "markdown" renders it for reading.
getting_started(section?) Free, no auth or payment. An overview of the server, its tools, and how to connect. Call this first.

type is http (paid HTTP APIs) or mcp (paid MCP tools). network is a CAIP-2 id, e.g. eip155:8453 (Base) or solana:*. max_price_usdc filters to services at or below a dollar ceiling.

Tracking a service's price over time

bazaar_service_details is the one to poll. It returns the same structuredContent shape whether or not the service is still listed, so a tracker can diff two samples field by field without special-casing a disappearance:

{
  "service_key": "https://api.example.com/weather",
  "available": true,
  "networks": ["eip155:8453"],
  "min_price_atomic": 1000,
  "min_price_label": "0.001 USDC",
  "prices": [
    {
      "network": "eip155:8453",
      "amount_atomic": 1000,
      "price": "0.001 USDC",
      "asset": "0xUSDCassetAddressOnThisNetwork",
      "pay_to": "0xServiceRecipientAddress",
      "scheme": "exact"
    }
  ]
}

A service that has dropped off every facilitator is not an error: it comes back with the same keys, available: false, an empty prices, and null for both price fields. min_price_label is null (never absent) in both branches, so a missing label and a missing sample stay distinguishable.

Use get_service instead when you also need the input/output schema and a pay link. bazaar_service_details deliberately omits both to stay cheap to poll.

Resources and prompts

The server also publishes the shared three.ws MCP resources and guided prompts (full reference: Resources and Guided prompts). On this server that is:

  • Resources: three://me (your credential, scopes and daily quota), three://x402/services (the live x402 service catalog) and three://marketplace (paid agent skills and agent services). The last two are public.
  • Prompts: get-started, hire-agent(task), explore-marketplace and explore-x402(capability).

resources/list and prompts/list on the endpoint are the authoritative lists.

Use on claude.ai

Add the connector with URL https://three.ws/api/mcp-bazaar and complete OAuth. Then:

"Find me a cheap weather API I can pay for, on Base."

Claude calls search_services, then get_service for the top hit, and shows the price, the network, and a one-click pay link.

Paying

The bazaar is a discovery surface. get_service returns the exact x402 payment requirements plus a pay_link to the three.ws hosted payer (/pay), which settles the payment with your three.ws agent wallet and returns the service response.

Autonomous in-MCP pay_and_call (the server pays and calls on your behalf) is a deliberate, wallet-gated extension — it spends real funds, so it ships only behind explicit per-user wallet authorization rather than being enabled for any connected client by default.

Configuration

Facilitators come from the platform default set (defaultFacilitators() in api/_lib/x402/bazaar-client.js); no extra env is required to read the bazaar. Discovery is rate-limited to 60 calls/min per principal to bound facilitator egress.

Publishing to the MCP Registry

Manifest: server-bazaar.json.

mcp-publisher login github
mcp-publisher publish --file server-bazaar.json

Local development

npm run dev
npx @modelcontextprotocol/inspector http://localhost:3000/api/mcp-bazaar