Skip to main content
Glama
tiansern92-collab

worldcup-mcp

worldcup-mcp

A local MCP server (stdio) exposing live 2026 FIFA World Cup group standings and a Round-of-32 bracket, so a Cowork HTML artifact can call it on page load and render current data.

  • TypeScript (strict), Node ≥ 20, @modelcontextprotocol/sdk over stdio.

  • Provider abstraction (StandingsProvider) + 60s cache + stale last-good fallback.

  • Pure-logic layer (third-place ranking, best-third allocation, confidence) is fully unit-tested.

Status: the server is complete and its logic/handshake tests pass offline. The live data gate is unmet until you add a free API token — see DATA_SOURCE.md. Without a token the tools return an all-undecided bracket marked stale (no faked standings).


1. Install

cd worldcup-mcp
npm install
cp .env.example .env      # then edit .env (see below)

Related MCP server: mcp-claudinho

2. Environment

Var

Purpose

PROVIDER

football-data (default, recommended) or thesportsdb

FOOTBALL_DATA_TOKEN

free token from https://www.football-data.org/client/register

THESPORTSDB_KEY

3 (free, capped at ~5 rows) or a Premium key

Get the free football-data token (instant email), put it in .env:

PROVIDER=football-data
FOOTBALL_DATA_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx

3. Scripts

npm run dev        # run the server from source (tsx) over stdio
npm run build      # tsc -> dist/
npm start          # node dist/server.js
npm test           # vitest — pure-logic unit tests (no network)
npm run verify     # LIVE smoke test: one real fetch, prints 12 tables + 16 R32 slots, asserts
npm run handshake  # builds, launches server over stdio, lists+calls both tools, validates shapes

4. Tools & output contracts

get_group_standings

Returns an object keyed by group letter AL; each value is an array ordered rank 1→4 of { name, code, played, won, drawn, lost, goalsFor, goalsAgainst, goalDifference, points, rank, confidence }. confidenceconfirmed | likely | open (see classifier below). The object also carries stale and fetchedAt alongside the letter keys.

get_round_of_32

Returns { matches: [...16], stale, fetchedAt }. Each match: { match, posA, posB, slotA, slotB }, where a slot is either { posCode, decided:true, team:{name,code,confidence} } or { posCode, decided:false, eligibleGroups:[...] }.

Bracket positions are fixed (from the official draw); only the teams change. Position map is in src/logic/bracket.ts.

Resolution rules

  • Rank (1x/2x) slot: decided:true with the current holder of that exact rank once the group has begun, carrying its confidence; decided:false with eligibleGroups:[group] before any game.

  • Best-third slot: stays decided:false (with the 5-group pool) until the group stage is complete; then the top-8 thirds are ranked by points → goal difference → goals scored and allocated to slots honoring each slot's eligibleGroups.

get_knockout_results

Returns { rounds, stale, fetchedAt } where rounds is { r16:[…8], qf:[…4], sf:[…2], third:[…1], final:[…1] }. Each match: { match, posA, posB, slotA, slotB, status, score, winnerCode }:

  • slotA/slotB mirror the get_round_of_32 shape: { posCode, decided:true, team:{name,code,confidence} } once the feeding match is finished, else { posCode, decided:false, feeder } (a label like "R32 M12" / "R16 #89").

  • statusscheduled | live | finished; score is { a, b, duration?, penalties? } or null; winnerCode is set only when status === "finished".

  • Bracket wiring is ours (the official 2026 map: R32 ties M1..M16 feed forward as consecutive pairs → R16 → QF → SF → final); results are overlaid from the live source by matching teams. Match numbers use the official 89–104. See src/logic/knockout.ts.

  • Real winners propagate: a slot fills as soon as its feeding match is finished, otherwise it stays a placeholder. If the provider can't supply knockout data, every node is a placeholder + stale.

confidence classifier

confirmed = mathematically locked at the exact rank (every other team is clearly above or clearly below given remaining fixtures; reachable-point ties count as not-yet-separated, so it never over-claims). likely = currently in a qualifying slot (rank 1–2) but not locked. open = otherwise. Once every team in a group has played all 3 games, all four are confirmed.

5. Cowork / Claude Desktop integration

Register this server under the slug worldcup so the tools resolve to the names the artifact expects:

  • mcp__worldcup__get_group_standings

  • mcp__worldcup__get_round_of_32

  • mcp__worldcup__get_knockout_results

These are already the defaults in artifact/wc2026_bracket.html (TOOL_STANDINGS / TOOL_RO32 / TOOL_KO). If you register under a different key, update those constants. The artifact renders the live R32 + a projected bracket, and overlays real knockout results from get_knockout_results once matches are played (green "result" boxes with scores; muted boxes remain projections).

MCP config block (Claude Desktop claude_desktop_config.jsonmcpServers, or the Cowork MCP config). Use the built entry for stability:

{
  "mcpServers": {
    "worldcup": {
      "command": "node",
      "args": ["C:\\Users\\U\\OneDrive\\worldcup-mcp\\dist\\server.js"],
      "env": {
        "PROVIDER": "football-data",
        "FOOTBALL_DATA_TOKEN": "your-free-token"
      }
    }
  }
}

(Run npm run build first so dist/server.js exists. For a no-build dev setup, use "command": "npx", "args": ["tsx", "C:\\Users\\U\\OneDrive\\worldcup-mcp\\src\\server.ts"].)

Freshness for the artifact's "Live / stale" banner: football-data.org refreshes tables within ~1–5 minutes of a match finishing (it is not a per-second live feed). Expect "Live" right after a refresh and "stale" only if the provider call fails (then last-good is served).

6. Manual FIFA cross-check

To eyeball that live numbers are real and current, compare one group against the official source:

# Group A table straight from the provider (needs your token):
curl -s -H "X-Auth-Token: $FOOTBALL_DATA_TOKEN" \
  "https://api.football-data.org/v4/competitions/WC/standings" \
  | npx --yes node-jq '.standings[] | select(.group=="GROUP_A") | .table[] | {pos:.position, team:.team.name, pld:.playedGames, pts:.points, gd:.goalDifference}'

Then open the official FIFA standings page for the 2026 World Cup (https://www.fifa.com/fifaplus/en/tournaments/mens/worldcup/canadamexicousa2026) and confirm the played/points/GD for Group A match. npm run verify performs the structural half of this check automatically (groups, team counts, codes vs. the official draw).

7. Known limitations

  • Best-third allocation method. FIFA publishes a fixed lookup table keyed by which 8 of 12 groups produce a qualifying third (C(12,8)=495 rows). Rather than embed that table verbatim, this server solves the same constraint it encodes — a deterministic eligibility-honoring bipartite matching (see src/logic/thirdPlace.ts). Every group always lands in an eligible slot; for some of the 495 combinations the exact group→slot pairing may differ from FIFA's printed table while staying eligibility-correct. Swap in the literal table here if you need byte-for-byte parity with FIFA's published bracket.

  • Free data sources are credential-gated or capped — see DATA_SOURCE.md. Nothing is hardcoded; absent a credential the bracket is all-undecided + stale.

8. Layout

src/
  draw.ts            official group draw + name→code mapping (validation only)
  types.ts           shared types
  cache.ts           60s TTL + last-good stale fallback
  service.ts         provider selection, enrich(), the two tool entry points
  server.ts          MCP stdio server (registers the two tools)
  verify.ts          live smoke test
  env.ts             local .env loader
  providers/
    types.ts         StandingsProvider interface (the swap seam)
    footballData.ts  primary provider
    theSportsDb.ts   secondary provider (capped on free tier)
  logic/
    confidence.ts    confidence classifier
    thirdPlace.ts    third-place ranking + best-third allocation
    bracket.ts       fixed R32 position map + resolution
test/                vitest unit tests (confidence, thirdPlace, bracket)
scripts/handshake.ts MCP stdio handshake test

Available Tools

2 tools
get_group_standings2026 WC group standingsA

Live 2026 FIFA World Cup group standings, keyed by group letter A–L. Each value is an array ordered by rank with played/points/GD and a confidence flag (confirmed | likely | open). Includes stale/fetchedAt.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses that data is live, includes stale/fetchedAt timestamps and a confidence flag (confirmed/likely/open). However, it omits details on error handling, rate limits, or auth requirements. This is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first states the resource and keying, second describes the array structure and included metadata. Every sentence adds value, no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description fully explains the return structure: array ordered by rank with fields played, points, GD, confidence flag, and stale/fetchedAt. This is sufficient for a simple 0-param tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist (0 params, 100% schema coverage), so baseline is 4. The description adds no parameter info, which is appropriate since there are none.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'get' and resource 'group standings' with clear scope: 2026 FIFA World Cup groups A–L. It distinguishes from sibling tool 'get_round_of_32' by focusing on group-stage data, not knockout matches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives. It does not mention when not to use it or provide context that differentiates it from the sibling tool, leaving the agent to infer usage based solely on tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_round_of_322026 WC Round of 32 bracketA

The 16 Round-of-32 matches with fixed bracket positions. Each match has posA/posB labels and slotA/slotB that are either decided (with team) or undecided (with eligibleGroups). Includes stale/fetchedAt.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description bears full responsibility. It discloses the data structure (labels, slots decided or undecided, eligibleGroups, stale/fetchedAt) and implies read-only behavior. However, it does not mention authentication, rate limits, or potential empty results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, directly states the tool's purpose and key structural details, and avoids extraneous information. It is front-loaded with the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters, no output schema, and no annotations, the description reasonably covers the tool's output. It explains the round, bracket positions, and slot states. Minor gaps include lack of preconditions (e.g., tournament phase) and full clarification of pos vs slot semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, and schema coverage is 100%. The baseline score of 3 applies; the description adds no parameter-specific information but does not need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool returns the 16 Round-of-32 matches with fixed bracket positions, including details about posA/posB labels, slotA/slotB statuses, and timestamps. It is distinct from the sibling tool get_group_standings, which likely handles group stage data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide guidance on when to use this tool versus get_group_standings or any other alternatives. It lacks explicit context about prerequisites or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedget_group_standings
    • First observedget_round_of_32

TDQS

A3.9/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one for group standings and one for the round of 32 bracket. There is no overlap, so an agent can easily differentiate them.

Naming Consistency5/5

Both tools follow the consistent 'get_<noun>' naming pattern (get_group_standings, get_round_of_32), providing a predictable and uniform interface.

Tool Count3/5

With only 2 tools, the server feels under-scoped for a comprehensive World Cup data service. While the tools are relevant, additional tools for match details or team info would be expected.

Completeness2/5

The server covers only group standings and the round of 32 bracket, missing critical features like match results, team information, player stats, and later knockout stages. Significant gaps exist for a full World Cup data server.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server for FIFA World Cup 2026 data: matches, teams, venues, city guides, fan zones, visa info, injuries, odds, standings, bracket, and historical matchups. 18 tools, zero external API dependencies.
    18
    529
    34
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Claudinho gives any MCP client live 2026 World Cup scores, fixtures, group standings, read-only prediction-market signals (Polymarket, informational only), and ready-to-paste match cards. Key-free; the schedule is bundled offline — only live state hits ESPN. Independent fan project — not affiliated with FIFA or Anthropic.
    9
    28
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Free MCP server for the World Cup 2026 Tour public schedule API. It enables AI assistants to fetch the 2026 FIFA World Cup schedule, next match, match by ID, and dataset JSON-LD without an API key.
    5
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that answers football questions with interactive widgets, centered on the 2026 FIFA World Cup using SofaScore API data.
    1
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tiansern92-collab/worldcup-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server