semvec/pypi-packages huggingface dataset:
transfermarkt-mcp 0.1.0
MCP server for Transfermarkt football data access
License: MIT
Requires Python: >=3.8

# Transfermarkt MCP Server

A Model Context Protocol (MCP) server that provides access to Transfermarkt football data. This server allows AI assistants to retrieve information about players, clubs, and competitions from Transfermarkt.

## Features

- **Player Data**: Search and retrieve detailed player information
- **Club Information**: Access club details, squad lists, and statistics
- **Competition Data**: Get information about leagues and tournaments
- **Real-time Data**: Fresh data from Transfermarkt's platform

## Installation

### From PyPI (Recommended)

```bash
pip install transfermarkt-mcp
```

### From Source

```bash
git clone https://github.com/yourusername/transfermarkt-mcp.git
cd transfermarkt-mcp
pip install -e .
```

## Usage

### As an MCP Server

Add this to your MCP client configuration:

```json
{
  "mcpServers": {
    "transfermarkt": {
      "command": "transfermarkt-mcp",
      "args": []
    }
  }
}
```

### Direct Usage

```python
from transfermarkt_mcp.server import create_mcp_server

# Create and run the server
mcp = create_mcp_server()
mcp.run()
```

## Available Tools

### Player Tools
- `search_players`: Search for players by name
- `get_player_details`: Get detailed player information
- `get_player_stats`: Retrieve player statistics

### Club Tools
- `search_clubs`: Search for clubs by name
- `get_club_details`: Get club information
- `get_club_squad`: Retrieve club squad list

### Competition Tools
- `search_competitions`: Search for competitions
- `get_competition_details`: Get competition information
- `get_competition_standings`: Retrieve league tables

## Configuration

Create a `.env` file in your project root:

```env
# Optional: Add any API keys or configuration
TRANSFERMARKT_BASE_URL=https://www.transfermarkt.com
```

## Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/yourusername/transfermarkt-mcp.git
cd transfermarkt-mcp

# Install development dependencies
pip install -e .[dev]

# Run tests
pytest

# Format code
black src/

# Type checking
mypy src/
```

### Running Tests

```bash
pytest tests/ -v
```

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Disclaimer

This project is not affiliated with Transfermarkt. All data is publicly available information accessed through web scraping in compliance with robots.txt and terms of service.

## Support

- Create an issue on [GitHub](https://github.com/yourusername/transfermarkt-mcp/issues)
- Check the [documentation](https://github.com/yourusername/transfermarkt-mcp/wiki)

## Changelog

### v0.1.0
- Initial release
- Basic player, club, and competition tools
- MCP server implementation