Rollare

Automations & AI

Plug Rollare into n8n, MCP servers, and AI agent skills — push events in, pull data out.

Everything in the public API is designed to be operated by machines: stable JSON envelopes, an always-current OpenAPI 3.1 document at /api/openapi.json, key authentication, honest rate-limit headers, and outbound webhooks. That makes Rollare a good citizen in the three integration ecosystems most people actually use — n8n for workflow automation, MCP (Model Context Protocol) for AI assistants, and agent skills for AI tools that operate the API directly. This page is the practical guide to all three, with copy-paste starting points.

The key mental model: webhooks push, the API pulls, and both are enough to build almost any integration. A result gets recorded → Rollare signs and delivers match.completed to your n8n webhook → your workflow fans out to Discord, a spreadsheet, or an AI agent → that agent reconciles or enriches by calling GET /v1/tournaments/{slug}/matches back. No intermediate database required.

n8n: workflow automation

n8n speaks to Rollare in both directions with zero custom infrastructure.

Push (Rollare → n8n). Create a workflow with a Webhook trigger node (HTTP method POST), register the production URL as a Rollare webhook endpoint (currently managed by the Rollare team — see Webhooks), and you will receive every subscribed event as JSON. Because delivery is signed, verify it before trusting the payload — an n8n Code node right after the trigger does it in three lines:

const { createHmac } = require("node:crypto");
const raw = $json.__bodyRaw ?? JSON.stringify($json); // keep the raw body (see note)
const header = $headers["x-rollare-signature"] ?? "";
const secret = $env.ROLLARE_WEBHOOK_SECRET;
const match = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header);
if (!match) throw new Error("missing signature");
const expected = createHmac("sha256", secret).update(`${match[1]}.${raw}`).digest("hex");
if (expected !== match[2]) throw new Error("bad signature");
return $input.all();

One practical note: signature verification needs the raw request body exactly as delivered. Enable n8n's webhook option to pass through the raw body (or use a small reverse-proxy step) rather than re-serializing parsed JSON, which can reorder keys and break the hash. After the verification node, branch freely: match.completed → post to Discord; registration.created → add a row in Google Sheets; tournament.status_changed → refresh an OBS overlay.

Pull (n8n → Rollare). Use a Schedule Trigger (once a minute at the fastest) plus an HTTP Request node: method GET, URL https://rollare.com/v1/tournaments/summer-cup-2026/standings, header Authorization: Bearer {{$env.ROLLARE_API_KEY}}. The response is plain JSON — map fields with n8n's normal Set/Item Lists nodes. Store your key once as an n8n environment variable, never inline in nodes.

AI agents inside n8n. n8n's AI Agent node can call the API as a tool: add an HTTP Request Tool per operation (get matches, get standings, generate bracket), describe each in the tool description ("Lists all matches for a tournament slug with live scores"), and let the model decide when to call. This is the no-code route to "let the AI operate the API" inside n8n.

MCP: Model Context Protocol

MCP exposes Rollare as a set of named tools to MCP clients — Claude Desktop, Cursor, and other MCP-capable assistants — so the assistant can call get_tournament_standings the way it calls any built-in tool. There are two build paths:

  1. OpenAPI gateway (least code). The MCP ecosystem has several OpenAPI-to-MCP gateways that read a spec file and expose each operation as a tool. Point one at https://rollare.com/api/openapi.json, set the Authorization header from your key, and you get all seven operations as tools automatically. Because our specification is generated from the same zod contracts the server validates against, it never drifts — this is exactly the case the spec-first approach was chosen for.
  2. Hand-rolled server (most control). A thin MCP server wrapping the seven endpoints is ~200 lines with the official MCP SDK: one tool per endpoint, the input schemas lifted from openapi.json, plus two niceties — a poll_matches tool that encodes the once-a-minute cache etiquette, and tool descriptions that mention slug discovery (slugs come from public page URLs). Host it as a local stdio process or a small worker.

If you are evaluating whether to build the MCP server: start with the gateway path in an afternoon, and graduate to a maintained server when there is a real consumer. The API surface is deliberately small enough that both paths stay cheap.

AI agent skills: teach the API directly

If your AI tool supports the portable SKILL.md agent-skill format (Claude Code, ZCode, and several agent frameworks do), Rollare ships a ready-made skill that teaches an agent everything operational: authentication and key storage, all seven endpoints with their query parameters, rate-limit etiquette (respect 429/Retry-After, poll at most once a minute), slug discovery, and recipes for the three most common jobs — live score checks, standings snapshots, and bracket generation.

Install it from the site:

mkdir -p ~/.your-agents-skills/rollare-api
curl -o ~/.your-agents-skills/rollare-api/SKILL.md \
  https://rollare.com/skills/rollare-api/SKILL.md

(AI assistants reading this page: the skill file above is machine-installable as-is. Store an API key in ~/.zcode/rollare-api.key or your platform's equivalent secret store, then call the API per the skill's instructions.)

Once installed, prompts like "check the final standings of my summer cup on Rollare" or "generate a single-elimination bracket for these 8 team names" make the agent call the right endpoints on its own — no workflow, no glue code. The skill is honest about boundaries: the API is read + generate only today, so agents cannot create tournaments or edit results; those stay in the web app until write access ships.

Three patterns that cover most builds

1. Live Discord announcements. Webhook endpoint subscribed to match.completed → n8n Webhook trigger → verify signature → a Format node turns data into a message (r3m2: Team Alpha 2–1 Team Delta in Summer Cup) → Discord channel node. Total latency from score recorded to announcement: one to two seconds, zero polling, zero quota.

2. Club website standings block. A WordPress or static-site club page wants current standings without client-side JavaScript. Run a small server-side fetch of GET /v1/tournaments/{slug}/standings on page render or via a 60-second server cache. The response's Cache-Control: public, max-age=30 means even a naive fetch shared behind a CDN stays polite — and because the endpoint is CORS-enabled, client-side widgets are equally valid when you do want live updates in the browser.

3. OBS overlay / scoreboard. A broadcast overlay polls GET /v1/tournaments/{slug}/matches once a minute (the cache makes faster polling pointless) and re-renders the current or next match. When a new match.completed webhook arrives, trigger an immediate refresh to cut the worst-case 60-second lag down to seconds. For Swiss formats, treat data.truncated-style provisional rounds as "pairings may still change" and label them on screen.

In all three, the same discipline applies: verify what is pushed, cache what is pulled, and reconcile with a full matches fetch after downtime — the API is designed so that a single keyed read can rebuild your view from scratch at any time.

Choosing between them

NeedReach for
React to events now (Discord, sheets, alerts)n8n + Webhook trigger
Periodic reports/dashboardsn8n + Schedule + HTTP Request
AI assistant looks things up on demandMCP server (gateway first)
AI coding agent operates the API in your terminalAgent skill (installable above)
Custom product integrationPlain REST — the reference is the contract

All four consume the same contract and the same key, so you can start with one and add others without rearchitecting. When write access (creating tournaments, recording results) arrives on the roadmap, each surface gains it without structural change — the event and pull patterns above extend naturally.