← docs

Agent Bazaar

Billing, metering, and auth for MCP servers. The marketplace where agent tools get discovered, called, and paid for.

What is the Bazaar?

The Bazaar is an agent-native service marketplace. MCP tool providers list their tools, set pricing, and get paid. Agent developers discover tools, make calls, and get billed. Every invocation is metered with sub-cent precision.

The platform fee is 18%. Providers receive 82% of every paid call. Free tools have no fees. Providers set their own pricing per tool.

How It Works

  1. Provider registers — POST to /api/bazaar/register-provider with MCP server URL
  2. Provider lists tools — POST to /api/bazaar/tools with tool definitions and pricing
  3. Consumer registers — POST to /api/bazaar/register-consumer, gets API key
  4. Consumer discovers tools — GET /api/bazaar/catalog to browse available tools
  5. Consumer calls tool — POST to /api/bazaar/proxy with tool_id + input
  6. Bazaar meters the call — Duration, tokens, cost recorded automatically
  7. Provider gets paid — Earnings accumulate, payout via Stripe Connect

For Providers

1. Register your MCP server

curl -X POST https://noui.bot/api/bazaar/register-provider \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Weather Tools",
    "email": "dev@example.com",
    "endpoint_url": "https://my-server.com/mcp",
    "description": "Real-time weather data for agents"
  }'

# Returns: { "api_key": "bz_abc123...", "provider_id": "..." }
# ⚠ Save the API key — it won't be shown again.

2. Add your tools

curl -X POST https://noui.bot/api/bazaar/tools \
  -H "Authorization: Bearer bz_YOUR_PROVIDER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tools": [{
      "tool_name": "get_weather",
      "description": "Get current weather for a location",
      "category": "weather",
      "price_cents_override": 1
    }, {
      "tool_name": "get_forecast",
      "description": "7-day weather forecast",
      "category": "weather",
      "price_cents_override": 2
    }]
  }'

3. Check your earnings

curl -X POST https://noui.bot/api/bazaar/billing/provider-summary \
  -H "Authorization: Bearer bz_YOUR_PROVIDER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"period": "30d"}'

4. Connect Stripe for payouts

curl -X POST https://noui.bot/api/bazaar/connect \
  -H "Authorization: Bearer bz_YOUR_PROVIDER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_url": "https://your-site.com/success"}'

# Returns an onboarding URL — complete Stripe Express setup there.

Or use the self-service UI: noui.bot/providers/register

For Developers (Agent Builders)

1. Get an API key

curl -X POST https://noui.bot/api/bazaar/register-consumer \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My AI Agent",
    "email": "dev@example.com"
  }'

# Returns: { "api_key": "bz_def456...", "balance": "$0.00" }

2. Discover tools

# No auth required for catalog
curl https://noui.bot/api/bazaar/catalog | jq '.tools[] | {name: .tool_name, price: .pricing.price}'

3. Call a tool

curl -X POST https://noui.bot/api/bazaar/proxy \
  -H "Authorization: Bearer bz_YOUR_CONSUMER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool_name": "wallet.balance",
    "input": {"wallet_address": "0x123...", "chain": "base"}
  }'

# Response includes:
# - result: the tool's output
# - meta: { cost_cents, latency_ms, provider, remaining_balance_cents }
# - Headers: X-Bazaar-Cost, X-Bazaar-Provider, X-Bazaar-Latency

4. Check usage

curl https://noui.bot/api/bazaar/usage/summary \
  -H "Authorization: Bearer bz_YOUR_CONSUMER_KEY"

# Returns: total calls, total spend, top tools, calls by day

5. Load balance

curl -X POST https://noui.bot/api/bazaar/balance/load \
  -H "Authorization: Bearer bz_YOUR_CONSUMER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount_cents": 1000}'

# Returns Stripe Checkout URL or dry-run balance addition

Or use the self-service UI: noui.bot/developers/register

Pricing Model

FeatureDetails
Platform fee18% on paid calls
Free toolsNo fees
Free tier per tool100 calls (default, configurable by provider)
PrecisionSub-cent (microcents = 1/10000 of a cent)
Provider setsPer-call price, per-token price, free tier size
Minimum payout$10.00
Payout methodStripe Connect (Express)

API Reference

GET
/api/bazaar/catalog

List all tools with pricing and stats

None
GET
/api/v1/bazaar/stats

Public dashboard metrics

None
GET
/api/v1/bazaar/pricing

Tool pricing details

None
POST
/api/bazaar/register-provider

Register MCP server

None
POST
/api/bazaar/register-consumer

Get consumer API key

None
POST
/api/bazaar/tools

Register/update tools

Provider
POST
/api/bazaar/proxy

Call a tool (metered + billed)

Consumer
POST
/api/v1/bazaar/meter

Record invocation (MCP middleware)

Any
GET
/api/v1/bazaar/balance

Check balance

Consumer
GET
/api/v1/bazaar/usage

Usage history

Any
GET
/api/v1/bazaar/usage/summary

Aggregated usage stats

Any
POST
/api/bazaar/billing/provider-summary

Earnings summary

Provider
POST
/api/bazaar/balance/load

Add funds

Consumer
POST
/api/bazaar/payouts

Trigger payout

Provider
POST
/api/bazaar/connect

Stripe Connect onboarding

Provider

Authentication

All authenticated endpoints use Bearer tokens:

Authorization: Bearer bz_your_api_key_here

API keys are generated at registration. They are hashed server-side (SHA-256) and cannot be recovered. If lost, register a new account.