worldcup-2026-mcp
README.md
# β½ FIFA World Cup 2026 β MCP Server & Dashboard
An MCP server built with **FastMCP** to query FIFA World Cup 2026 data directly from any AI compatible with the MCP protocol (Claude, Cursor, etc.), plus a **Streamlit dashboard** for standalone use.
Data is sourced from [openfootball/worldcup.json](https://github.com/openfootball/worldcup.json) β open source, no API key required.
## π Available Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| `recent_matches` | Scores from the most recent matches | `count` (default: 5) |
| `upcoming_matches` | Upcoming scheduled matches | `count` (default: 5) |
| `group_standings` | Standings for a specific group | `group` (AβL) |
| `search_team` | Full info for a team: group, stats, and all matches | `team_name` (in English) |
| `all_groups` | Summary of all 12 groups | β |
| `cup_statistics` | Goals, averages, top scorers, and highlights | β |
## π¦ Installation
```bash
git clone https://github.com/Eduardo-Lucas/worldcup-2026-mcp
cd worldcup-mcp
pip install fastmcp httpx streamlit
```
## π₯οΈ Streamlit Dashboard
A visual dashboard with English/Portuguese language switching (πΊπΈ / π§π·):
```bash
streamlit run src/app.py
```
Open [http://localhost:8501](http://localhost:8501) in your browser.
**Pages:**
- π Recent Matches β scores and goal scorers
- π
Upcoming Matches β schedule with venues
- π Standings β all 12 groups with W/D/L/GF/GA/GD
- π Team Search β full team history and upcoming fixtures
- π Statistics β top scorers, biggest win, goals per game
## βοΈ MCP Server β Claude Code
```bash
claude mcp add worldcup-2026 python -- -m src.server
```
## βοΈ MCP Server β Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
"mcpServers": {
"worldcup-2026": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/absolute/path/to/worldcup-mcp"
}
}
}
```
Restart Claude Desktop. The tools will be available automatically.
## π¬ Usage Examples
Once connected, ask Claude:
- *"What were yesterday's World Cup results?"*
- *"How is Brazil doing in the standings?"*
- *"Show me Group C table"*
- *"Who are the top scorers so far?"*
- *"What are Brazil's upcoming matches?"*
## π§ͺ Tests
```bash
pip install pytest pytest-asyncio
pytest tests/ -v
```
## ποΈ Project Structure
```
worldcup-mcp/
βββ src/
β βββ server.py # MCP server (FastMCP tools)
β βββ app.py # Streamlit dashboard
βββ tests/
β βββ test_server.py # Tool unit tests
βββ pyproject.toml
βββ claude_desktop_config.json
βββ README.md
```
## π How It Works
- **`@mcp.tool()`** β exposes Python functions as AI tools
- **Docstrings** β become the tool description the AI reads
- **Type hints** β define the parameter schema
- **`mcp.run()`** β starts the server over stdio
- **Standings** β calculated dynamically from match results (no separate endpoint needed)
- **Placeholder resolver** β knockout stage codes like `W73`, `1G`, `3A/B/C/D/F` are automatically resolved to real team names as results come in
---
Built with [FastMCP](https://github.com/jlowin/fastmcp) Β· Data: [openfootball/worldcup.json](https://github.com/openfootball/worldcup.json)
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues