Building an MCP Server to Retrieve World Cup Matches
In today’s article, we’ll build our own MCP server to query matches of the 2026 World Cup!
If you follow our newsletter, you already know what the Model Context Protocol (MCP) is and have even seen how to build a very basic server from scratch.
You’ve also followed how LangChain works with MCP, how to use MCP to access Brazilian government data, and how to access NASA data using MCP and natural language.
Today, we will build an MCP Server in Python using the FastMCP framework to query 2026 World Cup games directly from our AI.
The goal is not to create a complete system, but rather to build a simple, educational project that allows us to understand how MCP works in practice.
In the end, you’ll have a functional MCP server and, more importantly, you’ll understand the key concepts to create your own MCPs connected to APIs, databases, or any other source of information.
☕ Grab your coffee and let’s get hands-on!
Follow our page on LinkedIn for more content like this! ❤
See also:
A practical guide to start building skills with AI (leave a ⭐)
The next big AI threat might not be in the model. But in the environment.
Surviving the AI Era: what every company needs to know about security in LLMs
Let’s Recap: What is an MCP?
The Model Context Protocol (MCP) is an open protocol that connects language models (LLMs) to tools, APIs, and external data sources in a standardized way.
Instead of teaching every application to talk to every AI model, MCP defines a common language.
An interesting analogy is to think of it as a “USB port” for LLMs.
Just as any USB device can connect to different computers, an MCP server can be used by different clients, such as Claude Desktop, Cursor, VS Code, and other compatible apps.
Before MCP, it was necessary to build a different integration for every application. With MCP, you just publish a tool following the protocol, and any compatible client can discover and use it automatically.
Architecture of Our Project
The flow is quite simple:
User
↓
MCP Client (ChatGPT, Claude Desktop, Cursor...)
↓
MCP Server
↓
Data source (API, database, files, etc.)
In our example, we will create an MCP server to query World Cup matches using a JSON file containing this information.
User ➔ "What are today's matches?"
↓
World Cup MCP ➔ reads worldcup.json
↓
List of matches ➔ sent to LLM
↓
LLM responds naturally to the user
Our application will have a simple and modular structure:
Local Database (
data/worldcup.json): Contains the information for the rounds, dates, teams, and scores of the World Cup.Data Provider (
providers/worldcup.py): A Python class that loads the JSON and filters the matches for the day.MCP Server (
server.py): Uses the FastMCP library to create the server and expose our function as a tool for the AI.MCP Client (e.g., Claude Desktop): The chat interface that detects the tool and executes it automatically when we ask about the games.
🚀 Hands-on
To keep the example simple, we will use a JSON dataset instead of an external API.
This brings some advantages:
No API Key needed;
No request limits;
Works offline;
The focus remains entirely on the MCP itself.
Here is our project structure (create the worldcup-mcp folder in your workspace):
worldcup-mcp/
│
├── server.py
├── pyproject.toml
├── README.md
├── data/
│ └── worldcup.json
└── providers/
└── worldcup.py
Creating the Data Source (data/worldcup.json)
Let’s start by getting our data source.



