A Python server implementing Model Context Protocol (MCP) for football (soccer) statistics and live match data using the API-Football service.
This server provides a comprehensive set of tools for accessing football data through the API-Football API. It serves as a bridge between applications and football data services, offering both live match information and historical statistics for leagues, teams, and players worldwide.
This server requires an API key from RapidAPI for the API-Football service:
RAPID_API_KEY_FOOTBALL=your_api_key_here
get_league_id_by_name
get_league_id_by_name(league_name="Premier League")
get_all_leagues_id
get_all_leagues_id(country=["England", "Spain"])
get_standings
get_standings(league_id=[39, 140], season=[2022, 2023])
get_league_info
get_league_info(league_name="Champions League")
get_league_fixtures
get_league_fixtures(league_id=39, season=2023)
get_league_schedule_by_date
get_league_schedule_by_date(league_name="Premier League", date=["2024-03-08", "2024-03-09"], season="2023")
get_player_id
get_player_id(player_name="Messi")
get_player_profile
get_player_profile(player_name="Messi")
get_player_statistics
get_player_statistics(player_id=154, seasons=[2022, 2023], league_name="La Liga")
get_player_statistics_2
get_player_statistics_2(player_id=154, seasons=[2022, 2023], league_id=140)
get_team_fixtures
get_team_fixtures(team_name="Manchester United", type="past", limit=3)
get_team_fixtures_by_date_range
get_team_fixtures_by_date_range(team_name="Liverpool", from_date="2023-09-01", to_date="2023-09-30", season="2023")
get_team_info
get_team_info(team_name="Real Madrid")
get_fixture_statistics
get_fixture_statistics(fixture_id=867946)
get_fixture_events
get_fixture_events(fixture_id=867946)
get_multiple_fixtures_stats
get_multiple_fixtures_stats(fixture_ids=[867946, 867947, 867948])
get_live_match_for_team
get_live_match_for_team(team_name="Chelsea")
get_live_stats_for_team
get_live_stats_for_team(team_name="Liverpool")
get_live_match_timeline
get_live_match_timeline(team_name="Manchester City")
The server is implemented using the Fast MCP framework and can be run as a standalone service.
# Start the server
python soccer_server.py
# or
mcp run soccer-server.py
git clone https://github.com/obinopaul/soccer-mcp-server.git
cd soccer-mcp-server
pip install -r requirements.txt
docker build -t soccer_server .
docker run -d -p 5000:5000 -e RAPID_API_KEY_FOOTBALL=your_api_key_here --name soccer_server soccer_server
claude_desktop_config.json
:{
"mcpServers": {
"soccer_server": {
"command": "docker",
"args": [
"exec",
"-i",
"soccer_server",
"python",
"soccer_server.py"
],
"env": {
"RAPID_API_KEY_FOOTBALL": "your_api_key_here"
}
}
}
}
git clone https://github.com/obinopaul/soccer-mcp-server.git
cd soccer-mcp-server
pip install -r requirements.txt
export RAPID_API_KEY_FOOTBALL=your_api_key_here
claude_desktop_config.json
, adjusting the Python path as needed:{
"mcpServers": {
"soccer_server": {
"command": "/path/to/your/python",
"args": [
"/path/to/soccer_server.py"
],
"env": {
"RAPID_API_KEY_FOOTBALL": "your_api_key_here"
}
}
}
}
After adding your chosen configuration, restart Claude Desktop to load the soccer server. You'll then be able to use all the football data tools in your conversations with Claude.
The server is built on:
This MCP server is available under the MIT License.
Seamless access to top MCP servers powering the future of AI integration.