Documentation

What Agent Bazaar is, how the underlying protocols work, and how to use it as a buyer, seller, or self-hoster.

What is an AI agent marketplace?

A catalog of APIs, MCP tools, datasets and agent services that autonomous software — not only human developers — can search, evaluate and pay for programmatically. Humans browse marketplaces by scrolling and reading; agents need every listing to carry structured fields (price, schema, payment method, protocol) they can parse without a human explaining it. Agent Bazaar is built to serve both at once: the same underlying catalog powers the website you're reading and the /discovery API an agent calls directly.

What is x402?

x402 is an open protocol built on the long-dormant HTTP 402 Payment Required status code. A server that wants payment for a resource responds 402 with an accepts[] array — which blockchain network, which asset (usually USDC), which address, and how much. The caller settles that payment and retries the request with proof, receiving the resource in the same exchange. No accounts, no API keys, no subscription billing — pay-per-request APIs priced in fractions of a cent, settled in USDC API payments or other supported assets.

x402 vs API keys

An API key requires signup, a stored secret, and usually a monthly bill regardless of usage. x402 requires none of that: identity is the payment itself, pricing is exact per call, and there's no account to create, rotate, or leak.

What is MCP?

Model Context Protocol (MCP) standardizes how an AI model or agent discovers the tools a server exposes — their names, descriptions, and input/output schemas — at runtime, rather than being hard-coded ahead of time. Where x402 answers "how do I pay for this," MCP answers "what can this server do and how do I call it." The two compose: an MCP tool can itself be priced with x402. Agent Bazaar runs its own MCP server over this catalog at /mcp (search_resources, get_resource, get_pricing, and more), and Saylor Innovations separately runs a production MCP server over its own APIs at saylorinnovations.com/mcp.

How do agents discover APIs and other agents?

Through structured, deterministic endpoints rather than scraping a web page: GET /discovery/search, GET /discovery/resources, and GET /discovery/merchant return JSON built for parsing, not reading. Each result includes the resource's accepts[], schema, and usage-based quality signal. See /agents for a full quickstart with curl, JavaScript, Python and MCP examples.

How to monetize an API with x402

Add an x402 manifest to your API (a JSON document listing your endpoints and how you accept payment), then publish it here. Payment settles directly to your own wallet — Agent Bazaar never sits in the payment path, so there's no platform cut on the transaction itself. Discoverability is the value we add: more agents finding your endpoint means more calls, which means more revenue on infrastructure you already run.

Self-hosting

Agent Bazaar is open source (MIT) and runs entirely on Cloudflare Pages + D1. Clone the repository, run npm install && npm run db:init && npm run dev, and see the README for deploying your own instance, including how to mirror the Coinbase Bazaar catalog into it.

Architecture

Cloudflare Pages Functions (Workers runtime) in front of a D1 (SQLite) database, with an FTS5 index for keyword search. The catalog — not the website — is the marketplace: the same rows serve the HTML pages, the JSON discovery API, and each resource's machine-readable twin at /resources/{slug}.json.