API & MCP

Everything a person can do on CDN Behaviour Explorer, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://cdnbehaviorexplorer.usefulweb.site/api/v1/calculate – run CDN Behaviour Explorer
  • GET https://cdnbehaviorexplorer.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

CDN Behaviour Explorer

Sends two consecutive requests to a public URL (or reads two pasted header sets) and compares them: CDN detection from vendor headers (Cloudflare, CloudFront, Fastly, Akamai, Vercel, Netlify, Bunny, Azure, Google), edge cache status HIT/MISS/EXPIRED, Age progression, edge location, shared-cache TTL, Vary and compression. Only this server's vantage point is used; there is no multi-region comparison.

Inputs of CDN Behaviour Explorer
FieldTypeDefaultDescription
modeselect (live, paste)"live"Mode
urlurl—URL (live mode)
headersFirsttextarea—Response headers of request 1 (paste mode)
headersSecondtextarea—Response headers of request 2 (paste mode)

Example request

Cloudflare MISS then HIT (pasted)

curl -X POST https://cdnbehaviorexplorer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"paste","headersFirst":"HTTP/2 200\ndate: Mon, 12 Oct 2026 10:00:00 GMT\ncontent-type: text/html; charset=utf-8\ncontent-encoding: br\ncache-control: public, max-age=60, s-maxage=3600\netag: W/\"abc123\"\nvary: Accept-Encoding\ncf-cache-status: MISS\nage: 0\ncf-ray: 8d2f1a2b3c4d5e6f-FRA\nserver: cloudflare\nalt-svc: h3=\":443\"; ma=86400","headersSecond":"HTTP/2 200\ndate: Mon, 12 Oct 2026 10:00:05 GMT\ncontent-type: text/html; charset=utf-8\ncontent-encoding: br\ncache-control: public, max-age=60, s-maxage=3600\netag: W/\"abc123\"\nvary: Accept-Encoding\ncf-cache-status: HIT\nage: 5\ncf-ray: 8d2f1a2c4e5f6a7b-FRA\nserver: cloudflare\nalt-svc: h3=\":443\"; ma=86400"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

  • Streamable HTTP endpoint: https://cdnbehaviorexplorer.usefulweb.site/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: cdn_behavior_explorer
  • Local stdio connector: node src/mcp-stdio.ts --tool=cdn-behavior-explorer
{
  "mcpServers": {
    "cdn-behavior-explorer": { "type": "http", "url": "https://cdnbehaviorexplorer.usefulweb.site/mcp" }
  }
}