The Soccer MCP Server implements the Model Context Protocol for accessing football (soccer) statistics and live match data through the API-Football service. It serves as a bridge between your applications and comprehensive football data, offering everything from league standings to real-time match events.
You'll need:
Clone the repository:
git clone https://github.com/obinopaul/soccer-mcp-server.git
cd soccer-mcp-server
Install dependencies:
pip install -r requirements.txt
Build the Docker image:
docker build -t soccer_server .
Run the Docker container with your API key:
docker run -d -p 5000:5000 -e RAPID_API_KEY_FOOTBALL=your_api_key_here --name soccer_server soccer_server
Clone the repository:
git clone https://github.com/obinopaul/soccer-mcp-server.git
cd soccer-mcp-server
Install dependencies:
pip install -r requirements.txt
Set the API key environment variable:
export RAPID_API_KEY_FOOTBALL=your_api_key_here
Run the server using one of these commands:
python soccer_server.py
# or
mcp run soccer-server.py
To use the server with Claude Desktop, add one of these configurations to your claude_desktop_config.json
file:
{
"mcpServers": {
"soccer_server": {
"command": "docker",
"args": [
"exec",
"-i",
"soccer_server",
"python",
"soccer_server.py"
],
"env": {
"RAPID_API_KEY_FOOTBALL": "your_api_key_here"
}
}
}
}
{
"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 configuration, restart Claude Desktop to load the soccer server.
Get league ID by name:
get_league_id_by_name(league_name="Premier League")
Get all leagues with IDs:
get_all_leagues_id(country=["England", "Spain"])
Get league standings:
get_standings(league_id=[39, 140], season=[2022, 2023])
Get league information:
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")
Find player IDs:
get_player_id(player_name="Messi")
Get player profile:
get_player_profile(player_name="Messi")
Get player statistics by league name:
get_player_statistics(player_id=154, seasons=[2022, 2023], league_name="La Liga")
Get player statistics by league ID:
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 information:
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 statistics:
get_multiple_fixtures_stats(fixture_ids=[867946, 867947, 867948])
Check if a team is playing live:
get_live_match_for_team(team_name="Chelsea")
Get live match statistics:
get_live_stats_for_team(team_name="Liverpool")
Get live match timeline:
get_live_match_timeline(team_name="Manchester City")
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.