World Cup Stats MCP
Provides tools for querying FIFA World Cup statistics stored in a DuckDB database, including player stats, team summaries, and custom SQL queries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
World Cup Stats MCP ⚽
An automated Python ETL pipeline that extracts FIFA World Cup player and team statistics from fbref.com into a local DuckDB warehouse, exposes it through a Model Context Protocol (MCP) server, and ships a custom Claude-powered CLI assistant so you can ask questions about the data in plain English.
Covers the 2010, 2014, 2018, and 2022 World Cups — ~2,490 players with full scoring, shooting, discipline, goalkeeping, and playing-time stats.
Architecture
fbref.com ──(soccerdata: rate-limited, cached, resumable scrape)──▶ ETL pipeline (Python)
│ clean / flatten / load
▼
DuckDB warehouse
(players, team_tournament, …)
│
┌─────────────────┴──────────────────┐
▼ ▼
MCP server (FastMCP) Custom Claude-API CLI client
7 read-only tools over the data "Compare Ronaldo & Messi across all 4 WCs"Related MCP server: World Cup History MCP
Features
Resilient scraper —
soccerdataover fbref with built-in rate-limiting, on-disk caching, and per-table fetching so a run is fully resumable.Analytics warehouse — staging tables modelled into clean marts: a wide
playerstable (one row per player per World Cup) andteam_tournamentaggregates.MCP server — exposes the warehouse as 7 read-only tools (FastMCP);
run_sqlrejects anything that isn't aSELECT.Conversational assistant — a custom MCP client that wires the tools into Claude's tool-use loop for natural-language Q&A.
Tech stack
Python 3.13 · soccerdata · DuckDB · MCP / FastMCP · Anthropic Claude API (Sonnet 4.6) · prompt caching
Project layout
etl/ extract (soccerdata) → load (DuckDB) → pipeline (CLI) → model (marts)
mcp_server/ FastMCP server exposing the warehouse as MCP tools
assistant/ custom Claude-API CLI that connects to the MCP server
config.py paths, seasons, league, stat types
data/ DuckDB warehouse + scrape cache (gitignored)Setup
python3.13 -m venv .venv
source .venv/bin/activate
pip install --prefer-binary -r requirements.txt # --prefer-binary avoids a cryptography source build
cp .env.example .env # add your ANTHROPIC_API_KEY (for the assistant only)The scraper drives a headless Chrome via
soccerdata, so Google Chrome must be installed.
Usage
Build the warehouse (scrape → load → model):
python -m etl.pipeline # all configured World Cups
python -m etl.model # build the players / team_tournament martsExplore the data directly (no API key needed):
python -c "import duckdb,config; print(duckdb.connect(str(config.DUCKDB_PATH),read_only=True).sql('SELECT player,team,goals FROM players WHERE season=2018 ORDER BY goals DESC LIMIT 10'))"Run the MCP server (stdio transport):
python -m mcp_server.serverChat with the assistant (requires ANTHROPIC_API_KEY):
python -m assistant.cliThen ask things like:
"Who were the top 5 scorers in 2014?"
"Compare Cristiano Ronaldo and Messi across all four World Cups."
"Which goalkeeper kept the most clean sheets?"
MCP tools
list_tables · list_seasons · top_scorers · player_stats · compare_players · team_summary · run_sql (read-only)
Data notes
Source: fbref.com (Sports Reference), used for personal, non-commercial, educational purposes via soccerdata's rate-limiting and caching.
The World Cup competition on fbref exposes
standard,keeper,shooting,playing_time, andmiscplayer tables (no passing/defense/possession — those are league-only).There is no expected-goals (xG) for the World Cup, and shot counts are unavailable for the 2010 and 2014 tournaments.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Teamfight Tactics data & AI coaching for Claude and ChatGPT — 19 tools, built-in Riot key.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
SEO research, Search Console, GA4 and PPC tools for Claude and ChatGPT.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP 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.18227 npm34MIT
- AlicenseAqualityBmaintenanceEvery FIFA World Cup since 1930 wrapped as 15 MCP tools — squads, brackets, stadiums, matches, awards, trivia. Powered by the Zafronix WC API.159 npm3MIT
- FlicenseAqualityDmaintenanceEnables conversational AI to fetch live World Cup matches, standings, results, and generate journalist-style match summaries using MCP tools and prompts.4-
- AlicenseAqualityCmaintenanceEnables Claude to access live Premier League data—teams, matches, standings, rosters, player details, and schedule-strength analytics—through natural language.12MIT