# rishijatia/fantasy-pl-mcp [Health: Active]

**Category:** 🏃 Sports  
**Repository:** https://github.com/rishijatia/fantasy-pl-mcp/  
**GitHub Stars:** 80  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/rishijatia-fantasy-pl-mcp

## Description
An MCP server for real-time Fantasy Premier League data and analysis tools.

## Tools
Capabilities this server exposes over MCP:

- **get_team** — Get any team's players, captain, and other details for a specific gameweek
        
        Args:
            team_id: FPL team ID (required)
            gameweek: Gameweek number (defaults to current gameweek)
            
        Returns:
            Detailed team information including player details, captain, and value
        
- **get_my_team** — Get your own FPL team for a specific gameweek
        
        Args:
            gameweek: Gameweek number (defaults to current gameweek)
            
        Returns:
            Detailed team information including player details, captain, and value
            
        Note:
            This uses your authenticated team ID from the FPL credentials.
            To get another team's details, use get_team and provide a team_id.
        
- **get_manager** — Get detailed information about an FPL manager

        Args:
            team_id: FPL team ID to look up

        Returns:
            Manager information including history, name, team details, and leagues
        
- **get_my_current_team** — Get your current team as shown on the transfers page, including
        selling prices, chips, and transfer state (requires authentication)

        Unlike get_my_team, this uses the authenticated my-team endpoint, so
        it reflects pending changes and per-player purchase/selling prices.

        Returns:
            Current squad with prices, available chips, and transfer status
        
- **check_fpl_authentication** — Check if FPL authentication is working correctly

        Returns:
            Authentication status and basic team information
        
- **update_fpl_credentials** — Store a new FPL refresh token when the current one has expired.

        Use this when authenticated FPL tools fail with an invalid/expired refresh
        token error. Ask the user to fetch a fresh token first: log in at
        https://fantasy.premierleague.com, open the DevTools Console (F12), run

            copy(JSON.parse(localStorage.getItem(Object.keys(localStorage).find(k=>k.startsWith('oidc.user:')))).refresh_token)

        (typing 'allow pasting' first if Chrome refuses), and paste the clipboard
        contents here. Copying the whole 'oidc.user:...' JSON value from DevTools ->
        Application -> Local storage works too.

        Args:
            refresh_token: The copied oidc.user JSON value (or just its
                refresh_token field)
            team_id: FPL team ID; omit to keep the currently stored one

        Returns:
            Whether the new token was stored and validated against the FPL API
        
- **get_manager_info** — Get detailed information about an FPL manager

        Args:
            team_id: FPL team ID (defaults to authenticated user)

        Returns:
            Manager info with leagues and performance stats
        
- **get_manager_transfer_history** — Get a manager's transfer history with player names and prices

        Args:
            team_id: FPL team ID to look up
            limit: Maximum number of transfers to return (most recent first)

        Returns:
            Transfer history grouped by gameweek
        
- **get_league_standings** — Get standings for a specified FPL league
        
        Args:
            league_id: ID of the league to fetch
            
        Returns:
            League information with standings and team details
        
- **get_league_analytics** — Get rich analytics for a Fantasy Premier League mini-league
        
        Returns visualization-optimized data for various types of league analysis.
        
        Args:
            league_id: ID of the league to analyze
            analysis_type: Type of analysis to perform:
                - "overview": General league overview (default)
                - "historical": Historical performance analysis
                - "team_composition": Team composition analysis
                - "decisions": Captain and transfer decision analysis
                - "fixtures": Fixture difficulty comparison
            start_gw: Starting gameweek (defaults to 1 or use "current-N" format)
            end_gw: Ending gameweek (defaults to current)
            
        Returns:
            Rich analytics data structured for visualization
        
- **get_player_information** — Get detailed information and statistics for a specific player

        Args:
            player_id: FPL player ID (if provided, takes precedence over player_name)
            player_name: Player name to search for (used if player_id not provided)
            start_gameweek: Starting gameweek for filtering player history
            end_gameweek: Ending gameweek for filtering player history
            include_history: Whether to include gameweek-by-gameweek history
            include_fixtures: Whether to include upcoming fixtures

        Returns:
            Comprehensive player information including stats and history
        
- **search_fpl_players** — Search for FPL players by name with optional filtering

        Args:
            query: Player name or partial name to search for
            position: Optional position filter (GKP, DEF, MID, FWD)
            team: Optional team name filter
            limit: Maximum number of results to return

        Returns:
            List of matching players with details
        
- **get_price_changes** — Get players whose price changed in the current gameweek (risers and fallers)

        Args:
            direction: Optional filter, "risers" or "fallers" (default: both)
            limit: Maximum number of players per direction

        Returns:
            Price risers and fallers with ownership and transfer momentum
        
- **get_gameweek_status** — Get precise information about current, previous, and next gameweeks

        Returns:
            Detailed information about gameweek timing, including exact status
        
- **get_blank_gameweeks** — Get information about upcoming blank gameweeks where teams don't have fixtures

        Args:
            num_gameweeks: Number of upcoming gameweeks to check (default: 5)

        Returns:
            Information about blank gameweeks and affected teams
        
- **get_double_gameweeks** — Get information about upcoming double gameweeks where teams play multiple times

        Args:
            num_gameweeks: Number of upcoming gameweeks to check (default: 5)

        Returns:
            Information about double gameweeks and affected teams
        
- **analyze_player_fixtures** — Analyze upcoming fixtures for a player and provide a difficulty rating

        Args:
            player_name: Player name to search for
            num_fixtures: Number of upcoming fixtures to analyze (default: 5)

        Returns:
            Analysis of player's upcoming fixtures with difficulty ratings
        
- **analyze_fixtures** — Analyze upcoming fixtures for players, teams, or positions

        Args:
            entity_type: Type of entity to analyze ("player", "team", or "position")
            entity_name: Name of the specific entity
            num_gameweeks: Number of gameweeks to look ahead
            include_blanks: Whether to include blank gameweek info
            include_doubles: Whether to include double gameweek info

        Returns:
            Fixture analysis with difficulty ratings and summary
        
- **analyze_players** — Filter and analyze FPL players based on multiple criteria

        Args:
            position: Player position (e.g., "midfielders", "defenders")
            team: Team name filter
            min_price: Minimum player price in millions
            max_price: Maximum player price in millions
            min_points: Minimum total points
            min_ownership: Minimum ownership percentage
            max_ownership: Maximum ownership percentage
            form_threshold: Minimum form rating
            include_gameweeks: Whether to include gameweek-by-gameweek data
            num_gameweeks: Number of recent gameweeks to include
            sort_by: Metric to sort results by (default: points; bootstrap
                names like total_points/goals_scored are accepted as aliases)
            sort_order: Sort direction ("asc" or "desc")
            limit: Maximum number of players to return

        Returns:
            Filtered player data with summary statistics
        
- **compare_players** — Compare multiple players across various metrics

        Args:
            player_names: List of player names to compare (2-5 players recommended)
            metrics: List of metrics to compare (bootstrap names like
                total_points/goals_scored are accepted as aliases)
            include_gameweeks: Whether to include gameweek-by-gameweek comparison
            num_gameweeks: Number of recent gameweeks to include in comparison
            include_fixture_analysis: Whether to include fixture analysis including blanks and doubles

        Returns:
            Detailed comparison of players across the specified metrics
        
- **get_gameweek_live_scores** — Get live player points and stats for a gameweek while matches are being played

        Args:
            gameweek_id: Gameweek to fetch (defaults to the current gameweek)
            player_ids: Optional list of FPL player IDs to restrict the result to
            limit: Maximum number of players to return when player_ids is not given

        Returns:
            Live scores sorted by points, plus bonus-processing status
        
- **get_dream_team** — Get the official dream team (highest-scoring XI) for a gameweek

        Args:
            gameweek_id: Gameweek to fetch (defaults to the current gameweek)

        Returns:
            The dream team with player names, teams, positions, and points
        
- **suggest_captain** — Suggest who to captain from a team's current squad, ranked with reasoning

        Combines FPL's own expected points (ep_next), form, points per game,
        and upcoming fixture difficulty into a transparent captain score.

        Args:
            team_id: FPL team ID (defaults to your authenticated team)
            gameweek_id: Gameweek whose squad to analyze (defaults to current)

        Returns:
            Squad ranked by captain score with per-component breakdown
        

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "fantasy-pl-mcp": {
    "command": "uvx",
    "args": ["fpl-mcp"]
  }
}
```

## Documentation

## What rishijatia/fantasy-pl-mcp MCP server does

The rishijatia/fantasy-pl-mcp MCP server exposes Fantasy Premier League data through the Model Context Protocol. It is intended for MCP-compatible desktop clients such as Claude Desktop, Cursor, and Windsurf, and can also be run directly from Python for development or testing.

The server covers player discovery, statistics, historical gameweek data, prices, ownership, form, fixtures, teams, managers, leagues, and gameweek timing. It also includes tools for live gameweek scores, official dream teams, blank and double gameweeks, player comparisons, multi-criteria player analysis, and captain recommendations.

Unauthenticated data tools are useful for general FPL research. Private team and manager features require FPL authentication, including access to an authenticated squad, current transfer-page state, manager history, transfer history, and some league information.

## How it works

The rishijatia/fantasy-pl-mcp MCP server runs as a Python package and communicates with the client over the MCP server configuration. It can be started with the `fpl-mcp` command or with `python -m fpl_mcp`. The repository also supports running the package from a Git checkout and testing it with MCP Inspector.

Tools accept structured inputs such as player names, player IDs, team IDs, league IDs, gameweek numbers, date ranges, limits, filters, and analysis modes. For example, player analysis can filter by position, club, price, points, ownership, and form, while fixture analysis can include blank and double gameweek information.

The package also declares read-only resources for player and team data, current and historical gameweeks, fixtures, and upcoming player fixtures. Prompt templates are provided for player analysis, transfer advice, team ratings, differential picks, and chip strategy.

## Setup and configuration

Install Python 3.10 or newer, then install the package from PyPI, GitHub, or a local clone. Start it with `fpl-mcp` or `python -m fpl_mcp`. For Claude Desktop, configure the Python module or the full path to the installed executable; using an explicit path helps when the desktop application cannot find a virtual-environment command.

Authenticated features use an FPL OIDC refresh token rather than an email address and password. The `fpl-mcp-config setup` command provides an interactive credential setup flow. The server exchanges the refresh token for short-lived access tokens when calling the FPL API. `check_fpl_authentication` reports whether authentication works, and `update_fpl_credentials` can replace an expired refresh token and optionally update the stored team ID.

## Tools and capabilities

The rishijatia/fantasy-pl-mcp MCP server includes tools for:

- Searching players and retrieving detailed statistics, history, fixtures, prices, and ownership.
- Filtering or comparing players across selected metrics and recent gameweeks.
- Reviewing current, previous, and next gameweek status, including blank and double gameweeks.
- Assessing upcoming fixtures for players, clubs, or positions with difficulty ratings.
- Reading live points during a gameweek and retrieving the official dream team.
- Inspecting authenticated teams, current transfer-page details, managers, transfers, and league standings.
- Producing league analytics for overview, historical, composition, decision, and fixture analysis.
- Ranking a squad for captaincy using expected points, form, points per game, and fixture difficulty.

## Limitations and notes

Mobile use is not supported according to the project documentation. Team, manager, transfer, and private league operations depend on valid FPL authentication, while public analysis features do not require the authenticated team. Some requests use IDs, such as team, player, and league identifiers, while others accept names. The available data reflects the Fantasy Premier League API and its current gameweek state, so live results and transfer-page information can change during a gameweek.

_Full upstream README: https://allmcps.com/mcp/rishijatia-fantasy-pl-mcp/readme_

