get_league_id_by_nameLABSCO SUMMARY
Names go in, so you never have to look up a league ID.
The awkward part of API-Football is that everything is keyed by numeric ID. The lookup tools take a league, team or player name and hand the ID back, which is what makes an ordinary question answerable without a reference table open beside you.
What it is
A football data server over the API-Football service. It resolves leagues, teams and players from names into the IDs the API needs, then returns standings, fixtures, statistics and live match data.
What you get
- A league ID from a league name, and a list of every league, filterable by country
- League information, and standings across several leagues and seasons, with a team filter over them
- Fixtures for a league and season, a league schedule for named dates, and a team's fixtures including across a date range
- Player IDs from a name, a player profile, and player statistics by season and league
- Team information
- Live match data for a team, plus fixture events, fixture statistics, and statistics across several fixtures at once
Requirements
A RapidAPI account subscribed to API-Football, with the key set as an environment variable. Python.
Setup effort
Follow the published steps — git clone https://github.com/obinopaul/soccer-mcp-server.git
USE CASES
Checking where a team stands
Resolve the league from its name, read the table, and pull the team's own record alongside it.
Following a match as it happens
Get the live fixture for the team, then read the events and the in-game statistics as they come in.
Looking up how a player is doing
Turn the name into an ID, read the profile, then pull the season statistics for the competition you mean.
Planning around the fixture list
Read a team's upcoming matches, narrow to a date range, and check the whole league's schedule for the days that matter.
Comparing several matches at once
Pull the fixtures for the round and their statistics in one pass, rather than one match at a time.
Finding a competition you only know by name
List the leagues, filtered by country if it helps, and read the information for the one you meant.
19 tools
Listed in project docs. Your client may show a different list.
get_all_leagues_idget_standingsget_league_infoget_league_fixturesget_league_schedule_by_dateget_player_idget_player_profileget_player_statisticsget_player_statistics_2get_team_fixturesget_team_fixtures_by_date_rangeget_team_infoget_fixture_statisticsget_fixture_eventsget_multiple_fixtures_statsget_live_match_for_teamget_live_stats_for_teamget_live_match_timelineBEFORE YOU INSTALL
What to know first
Tools you get
19 tools named in the project's documentation.
Requires
- docker on PATH
- RAPID_API_KEY_FOOTBALL in your environment
Where it runs
Both documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
1. Clone this repository
git clone https://github.com/obinopaul/soccer-mcp-server.git
cd soccer-mcp-server2. Install dependencies
pip install -r requirements.txt3. Build the Docker image
docker build -t soccer_server .4. Run the Docker container (ensure your API key is passed as an environment variable)
docker run -d -p 5000:5000 -e RAPID_API_KEY_FOOTBALL=<YOUR_RAPID_API_KEY_FOOTBALL> --name soccer_server soccer_serverMCP Clients
Claude Desktop — Docker
{
"mcpServers": {
"soccer_server": {
"command": "docker",
"args": [
"exec",
"-i",
"soccer_server",
"python",
"soccer_server.py"
],
"env": {
"RAPID_API_KEY_FOOTBALL": "<YOUR_RAPID_API_KEY_FOOTBALL>"
}
}
}
}Claude Desktop — Python
{
"mcpServers": {
"soccer_server": {
"command": "<YOUR_PATH_TO_PYTHON>",
"args": [
"<YOUR_PATH_TO_SOCCER_SERVER>"
],
"env": {
"RAPID_API_KEY_FOOTBALL": "<YOUR_RAPID_API_KEY_FOOTBALL>"
}
}
}
}