A Model Context Protocol (MCP) server for accessing Transfermarkt football data.
- 🔍 Search football clubs by name
- 📊 Get detailed club profiles
- 👥 Retrieve club player rosters
- 🏆 Search and get competition information
- ⚽ Search for individual players
- 📄 Pagination support for search results
- 🔧 Season-based filtering for players
- Clone the repository:
git clone https://github.com/emreclsr/transfermarkt-mcp.git
cd transfermarkt-mcp- Install dependencies:
pip install -r requirements.txtor
poetry install- Set up environment variables:
cp .env.example .env
# Edit .env with your API configurationCreate a .env file with:
TRANSFERMARKT_API_BASE_URL=https://transfermarkt-api.fly.dev
LOG_LEVEL=INFO
python -m src.transfermarkt_mcp.mainsearch_clubs(club_name, page_number=1)- Search for clubsget_club_profile(club_id)- Get club detailsget_club_players(club_id, season_id=None)- Get club players
search_competitions(competition_name, page_number=1)- Search for competitions by nameget_competition_clubs(competition_id)- Get all clubs participating in a specific competition
search_players(player_name, page_number=1)- Search for players by nameget_player_by_id(player_id)- Get detailed information about a specific player
pytest tests/black src/
flake8 src/{
"mcpServers": {
"transfermarkt": {
"command": "your-uv-location/uv",
"args": [
"run",
"--with",
"fastmcp",
"--with",
"requests",
"fastmcp",
"run",
"your-workdir/transfermarkt-mcp/src/transfermarkt_mcp/main.py"
],
"cwd": "your-workdir/transfermarkt-mcp/src",
"env": {
"BASE_URL": "https://transfermarkt-api.fly.dev",
"PYTHONPATH": "your-workdir/transfermarkt-mcp/src"
}
}
}
}MIT License