fantasy-pl-mcp
Fantasy Premier League MCP Server: Integrate FPL data into AI models like Claude for enhanced player analysis and team optimization.

fantasy-pl-mcp Solution Overview
Fantasy Premier League MCP Server is a powerful tool designed to bring the world of Fantasy Premier League data directly into your AI models. As an MCP server, it provides seamless access to rich player statistics, team information, and gameweek data within platforms like Claude for Desktop.
This solution empowers developers to build AI-driven applications that can analyze player performance, predict outcomes, and even offer personalized team management advice. By integrating FPL data via the MCP, you can create engaging and informative experiences for FPL enthusiasts. The server supports player search and comparison, allowing for detailed statistical analysis.
Installation is straightforward using pip, and integration with Claude Desktop is simple, requiring only a minor configuration update. Unlock the potential of AI-enhanced FPL analysis with this valuable MCP server, and gain a competitive edge in your fantasy league. It leverages standard input/output for communication, ensuring compatibility and ease of use.
fantasy-pl-mcp Key Capabilities
Rich Fantasy Premier League Data
The fantasy-pl-mcp
server provides comprehensive access to Fantasy Premier League (FPL) data, including player statistics, team information, and gameweek details. This is achieved by fetching data from the unofficial FPL API and structuring it for easy consumption by AI models. The server exposes this data through various resources, such as fpl://static/players
, fpl://static/teams
, and fpl://gameweeks/current
, allowing AI models to query and retrieve specific information. For example, an AI model can use the fpl://static/players
resource to get a list of all players and their statistics, then filter this data to find the top-scoring midfielders. This rich data access empowers AI models to provide users with detailed insights and recommendations related to FPL.
Technically, the server uses Python and libraries like requests
to interact with the FPL API. The data is then formatted and served through the MCP protocol, making it accessible to MCP-compatible clients.
Player and Fixture Analysis Tools
fantasy-pl-mcp
offers a suite of tools designed to analyze player performance and upcoming fixtures. These tools, such as analyze_player_fixtures
, analyze_players
, and compare_players
, enable AI models to provide users with data-driven insights for making informed decisions about their FPL teams. For instance, the analyze_player_fixtures
tool can assess the difficulty of a player's upcoming matches, helping users identify potential transfer targets or captain choices. The compare_players
tool allows users to compare the statistics of two players, such as goals scored, assists, and expected goals (xG), to determine which player is likely to perform better in the future.
These tools are implemented as Python functions that leverage the FPL data accessed through the server's resources. They perform calculations and comparisons based on user-specified criteria, returning results that can be easily interpreted by AI models.
Personalized FPL Team Management
The server supports personalized FPL team management through tools like get_my_team
, get_team
, and get_manager_info
. These tools require authentication with the FPL API, allowing users to securely access their team data and make informed decisions about transfers and team selection. For example, a user can use the get_my_team
tool to retrieve their current team lineup and then use the transfer_advice_prompt
to get AI-powered recommendations on potential transfers based on their budget and team needs. The get_manager_info
tool can provide insights into other managers' teams and strategies, helping users gain a competitive edge.
Authentication is handled through a configuration setup that stores the user's FPL email, password, and team ID securely. The server uses these credentials to authenticate with the FPL API and retrieve the user's data.
MCP Inspector Integration
For development and testing, fantasy-pl-mcp
seamlessly integrates with the MCP Inspector. This allows developers to easily test and debug their MCP implementations by directly interacting with the fantasy-pl-mcp
server. Using commands like mcp dev -m fpl_mcp
or npx @modelcontextprotocol/inspector python -m fpl_mcp
, developers can inspect available resources, test tool functionalities, and ensure proper data flow between the server and client applications. This integration significantly streamlines the development process, making it easier to build and maintain MCP-compatible applications that leverage FPL data.
Prompt Template Utilization
The fantasy-pl-mcp
includes a set of prompt templates designed to facilitate interaction with AI models. Templates like player_analysis_prompt
, transfer_advice_prompt
, and team_rating_prompt
provide pre-defined structures for querying the FPL data and tools, enabling users to quickly generate insightful prompts for AI models. For example, the transfer_advice_prompt
can be used to ask an AI model for recommendations on player transfers based on specific criteria, such as budget, position, and upcoming fixtures. These templates simplify the process of interacting with the FPL data and tools, making it easier for users to leverage the power of AI for FPL decision-making.