BLUEHUBDEV

REST API reference

Call any registered API as a standard HTTP POST. x402 USDC settlement on the first call.

Base URL

Base URL

https://blueagent.dev/api

Endpoints

METHODPATHDESCRIPTION
POST/api/mcp

MCP JSON-RPC 2.0 — initialize, tools/list, tools/call

GET/api/mcp

Discovery JSON (or SSE stream if Accept: text/event-stream)

POST/api/x402/[id]

Call any registered API by id. First call returns 402, retry with X-Payment header

GET/api/usage

Public lifetime call counts per API (cached 60s)

POST/api/register-api

Submit a new API to the marketplace (coming soon)

GET/api/catalog

Public catalog JSON for AI scrapers (coming soon)

Calling a tool — direct REST

Skip MCP if you want plain HTTP. Each registered API is reachable at /api/x402/[id]:

curl

curl -X POST https://blueagent.dev/api/x402/honeypot-check \
  -H 'Content-Type: application/json' \
  -d '{ "token": "0x..." }'

# → 402 Payment Required + payment instructions
# Sign EIP-3009, retry with X-Payment header
# See: /docs/x402

Calling a tool — via MCP

JSON-RPC

POST /api/mcp
{
  "jsonrpc": "2.0",
  "id":      1,
  "method":  "tools/call",
  "params": {
    "name":      "honeypot_check",
    "arguments": { "token": "0x..." }
  }
}

MCP names use underscores (honeypot_check), REST paths use hyphens (honeypot-check).

Status codes

  • 200 — success, JSON response body
  • 400 — invalid request body
  • 402 — payment required, see accepts array
  • 404 — tool id not registered
  • 429 — rate limit (100 req/min/IP)
  • 503 — upstream tool service unavailable

CORS

All endpoints set Access-Control-Allow-Origin: *. Browser-side calls work without proxying.

Examples by language

See per-API code samples — open any API on the marketplace and pick the language tab.