api-football-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@api-football-mcp-serverShow me the top scorers in the Premier League this season"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
API-Football MCP Server
A Model Context Protocol (MCP) server that provides access to football/soccer data through the API-Football service. This creates a standardised way for language models to interact with this API, and users a way to query in natural language.

Architecture
graph TD
LLM["`**LLM with MCP Client**
Claude/GPT-4/etc.`"]
subgraph Server ["`**MCP Server**
Football Data Gateway`"]
direction TB
MCP["`**MCP Protocol Handler**
Request Router & Response Manager`"]
subgraph Functions ["`**Available Functions**`"]
direction LR
API1["`**get_leagues**
Fetch league data`"]
API2["`**get_teams**
Fetch team data`"]
API3["`**get_players**
Fetch player data`"]
API4["`**get_fixtures**
Fetch match data`"]
end
MCP --> Functions
end
ExtAPI["`**API-Football**
External Sports Data API`"]
%% Main connections
LLM <===> MCP
%% Function connections to external API
API1 <--> ExtAPI
API2 <--> ExtAPI
API3 <--> ExtAPI
API4 <--> ExtAPI
%% Styling with improved colors
classDef llm fill:#4CAF50,stroke:#2E7D32,stroke-width:3px,color:#fff
classDef mcp fill:#2196F3,stroke:#1565C0,stroke-width:2px,color:#fff
classDef functions fill:#FF9800,stroke:#F57C00,stroke-width:2px,color:#fff
classDef external fill:#9C27B0,stroke:#6A1B9A,stroke-width:3px,color:#fff
classDef server fill:#E3F2FD,stroke:#1976D2,stroke-width:2px,color:#1976D2
class LLM llm
class MCP mcp
class API1,API2,API3,API4 functions
class ExtAPI external
class Server serverRelated MCP server: FPL MCP Server
1. Clone and Setup
Clone the repository:
git clone https://github.com/danknight/api-football-mcp-server.git
cd api-football-mcp-serverInstall dependencies:
pip install -r requirements.txt2. Get Your API Key and Set Environment
Create a .env file with your credentials:
API_FOOTBALL_KEY=your_api_key_hereSign up on API-Football to get an API key.
3. Configure MCP Client
Register this server in your MCP client (e.g. Cursor, Claude for Desktop).
{
"mcpServers": {
"api-football": {
"command": "python",
"args": ["absolute/path/to/server.py"],
"env": {
"API_FOOTBALL_KEY": "YOUR_API_KEY"
}
}
}
}
Or run directly from the command line and explore with Inspector:
python server.pyTools
The following tools are exposed to MCP clients:
League Information
Tool Name | Description | Parameters |
| Get available leagues |
|
| Get detailed league information |
|
| Get available countries | None |
| Get league standings |
|
Team Information
Tool Name | Description | Parameters |
| Get teams in a league |
|
| Get statistics for a team |
|
| Get team ID by team name |
|
| Get transfer information for a team |
|
Player Information
Tool Name | Description | Parameters |
| Get players in a team |
|
| Get statistics for a player |
|
Match/Fixture Information
Tool Name | Description | Parameters |
| Get fixtures/matches |
|
| Get statistics for a fixture |
|
| Get predictions for a fixture |
|
| Get head-to-head statistics between teams |
|
Player Statistics
Tool Name | Description | Parameters |
| Get top scorers in a league |
|
| Get top assisters in a league |
|
Other Information
Tool Name | Description | Parameters |
| Get venue information |
|
| Get injury information |
|
Usage Examples
Get leagues in a specific country
get_leagues(country="England")Get teams in a specific league
get_teams(league_id=39, season=2023) # Premier League 2023Get team statistics
get_team_stats(team_id=42, league_id=39, season=2023) # Arsenal statsGet fixtures for a team
get_fixtures(team_id=42, next=5) # Next 5 Arsenal matchesGet top scorers in a league
get_top_scorers(league_id=39, season=2023) # Premier League top scorersDevelopment
Running Tests
Currently, no tests are implemented. To add tests:
Create a
tests/directoryAdd test files following the naming convention
test_*.pyRun tests with
python -m pytest
Adding New Tools
To add a new tool:
Add a new function in
main.pydecorated with@mcp.tool()Implement the API call using
make_api_request()Update this README with the new tool information
Test the tool with the MCP Inspector
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dankniight/api-football-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server