Labsco
rishijatia logo

Fantasy Premier League

โ˜… 70

from rishijatia

Access Fantasy Premier League (FPL) data and tools, including player information, team details, and gameweek data.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Fantasy Premier League MCP Server

PyPI version Package Check PyPI - Python Version License: MIT Downloads

Trust Score <a href="https://glama.ai/mcp/servers/2zxsxuxuj9"> <img width="380" height="200" src="https://glama.ai/mcp/servers/2zxsxuxuj9/badge" />

A Model Context Protocol (MCP) server that provides access to Fantasy Premier League (FPL) data and tools. This server allows you to interact with FPL data in Claude for Desktop and other MCP-compatible clients.

Demo of the Fantasy Premier League MCP Server in action

Fantasy Premier League MCP Demo

Supported Platforms

  • Claude Desktop
  • Cursor
  • Windsurf
  • Other MCP Compatible Desktop LLMs

Mobile is currently not supported.

Features

  • Rich Player Data: Access comprehensive player statistics from the FPL API
  • Team Information: Get details about Premier League teams
  • Gameweek Data: View current and past gameweek information
  • Player Search: Find players by name or team
  • Player Comparison: Compare detailed statistics between any two players

Available Resources

  • fpl://static/players - All player data with comprehensive statistics
  • fpl://static/players/{name} - Player data by name search
  • fpl://static/teams - All Premier League teams
  • fpl://static/teams/{name} - Team data by name search
  • fpl://gameweeks/current - Current gameweek data
  • fpl://gameweeks/all - All gameweeks data
  • fpl://fixtures - All fixtures for the current season
  • fpl://fixtures/gameweek/{gameweek_id} - Fixtures for a specific gameweek
  • fpl://fixtures/team/{team_name} - Fixtures for a specific team
  • fpl://players/{player_name}/fixtures - Upcoming fixtures for a specific player
  • fpl://gameweeks/blank - Information about upcoming blank gameweeks
  • fpl://gameweeks/double - Information about upcoming double gameweeks

Available Tools

  • get_gameweek_status - Get precise information about current, previous, and next gameweeks
  • analyze_player_fixtures - Analyze upcoming fixtures for a player with difficulty ratings
  • get_blank_gameweeks - Get information about upcoming blank gameweeks
  • get_double_gameweeks - Get information about upcoming double gameweeks
  • analyze_players - Filter and analyze FPL players based on multiple criteria
  • analyze_fixtures - Analyze upcoming fixtures for players, teams, or positions
  • compare_players - Compare multiple players across various metrics
  • check_fpl_authentication - Check if FPL authentication is working correctly
  • get_my_team - View your authenticated team (requires authentication)
  • get_team - View any team with a specific ID (requires authentication)
  • get_manager_info - Get manager details (requires authentication)

Prompt Templates

  • player_analysis_prompt - Create a prompt for analyzing an FPL player in depth
  • transfer_advice_prompt - Get advice on player transfers based on budget and position
  • team_rating_prompt - Create a prompt for rating and analyzing an FPL team
  • differential_players_prompt - Create a prompt for finding differential players with low ownership
  • chip_strategy_prompt - Create a prompt for chip strategy advice

Development

Adding Features

To add new features:

  1. Add resource handlers in the appropriate file within fpl_mcp/fpl/resources/
  2. Add tool handlers in the appropriate file within fpl_mcp/fpl/tools/
  3. Update the __main__.py file to register new resources and tools
  4. Test using the MCP Inspector before deploying to Claude for Desktop

Authentication

To use features requiring authentication (like accessing your team or private leagues), you need to set up your FPL credentials:

# Run the credential setup tool
fpl-mcp-config setup

This interactive tool will:

  1. Prompt for your FPL email, password, and team ID
  2. Let you choose between storing in config.json or .env file
  3. Save credentials securely to ~/.fpl-mcp/

You can test your authentication with:

fpl-mcp-config test

Alternatively, you can manually configure authentication:

  1. Create ~/.fpl-mcp/.env file with:

    FPL_EMAIL=your_email@example.com
    FPL_PASSWORD=your_password
    FPL_TEAM_ID=your_team_id
  2. Or create ~/.fpl-mcp/config.json:

    {
      "email": "your_email@example.com",
      "password": "your_password",
      "team_id": "your_team_id"
    }
  3. Or set environment variables:

    export FPL_EMAIL=your_email@example.com
    export FPL_PASSWORD=your_password
    export FPL_TEAM_ID=your_team_id

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

For more details, please refer to the CONTRIBUTING.md file.

Acknowledgments

Citation

If you use this package in your research or project, please consider citing it:

@software{fpl_mcp,
  author = {Jatia, Rishi and Fantasy PL MCP Contributors},
  title = {Fantasy Premier League MCP Server},
  url = {https://github.com/rishijatia/fantasy-pl-mcp},
  version = {0.1.0},
  year = {2025},
}