Fantasy Premier League MCP Server

Fantasy Premier League MCP Server

Enables rich access to Fantasy Premier League data via the Model Context Protocol.

65
Stars
19
Forks
65
Watchers
2
Issues
Fantasy Premier League MCP Server is a Model Context Protocol (MCP) server that provides streamlined access to Fantasy Premier League (FPL) data, including player statistics, team information, and gameweek details. It allows users to interact with and compare FPL player data, search teams and players, and integrate seamlessly with Claude Desktop and other MCP-compatible clients. Designed for both quick CLI usage and deep AI integration, it ensures comprehensive coverage for FPL enthusiasts and AI-powered desktop tools.

Key Features

Comprehensive access to FPL player statistics
Team information retrieval for Premier League teams
Gameweek data for current and past events
Player search by name or team
Detailed player comparison
CLI and Python module support
Integration with Claude Desktop and MCP clients
Easy installation via PyPI or GitHub
Automated configuration for LLM desktop tools
Rich demo and user instructions

Use Cases

Comparing fantasy football player performance over time
Searching for players by team or position in the Premier League
Retrieving up-to-date gameweek and league information
Integrating FPL data tools with Claude Desktop
Building AI-powered desktop assistants for fantasy football
Providing analytics to fantasy football community platforms
Developing custom FPL selection and strategy tools
Automating team management based on real-time statistics
Powering live chatbots for fantasy football advice
Enabling data-driven decision making for fantasy football managers

README

Fantasy Premier League MCP Server

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

Trust Score

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

Requirements

  • Python 3.10 or higher
  • Claude Desktop (for AI integration)

Installation

Option 1: Install from PyPI (Recommended)

bash
pip install fpl-mcp

Option 1b: Install with Development Dependencies

bash
pip install "fpl-mcp[dev]"

Option 2: Install from GitHub

bash
pip install git+https://github.com/rishijatia/fantasy-pl-mcp.git

Option 3: Clone and Install Locally

bash
git clone https://github.com/rishijatia/fantasy-pl-mcp.git
cd fantasy-pl-mcp
pip install -e .

Running the Server

After installation, you have several options to run the server:

1. Using the CLI command

bash
fpl-mcp

2. Using the Python module

bash
python -m fpl_mcp

3. Using with Claude Desktop

Configure Claude Desktop to use the installed package by editing your claude_desktop_config.json file:

Method 1: Using the Python module directly (most reliable)

json
{
  "mcpServers": {
    "fantasy-pl": {
      "command": "python",
      "args": ["-m", "fpl_mcp"]
    }
  }
}

Method 2: Using the installed command with full path (if installed with pip)

json
{
  "mcpServers": {
    "fantasy-pl": {
      "command": "/full/path/to/your/venv/bin/fpl-mcp"
    }
  }
}

Replace /full/path/to/your/venv/bin/fpl-mcp with the actual path to the executable. You can find this by running which fpl-mcp in your terminal after activating your virtual environment.

Note: Using just "command": "fpl-mcp" may result in a spawn fpl-mcp ENOENT error since Claude Desktop might not have access to your virtual environment's PATH. Using the full path or the Python module approach helps avoid this issue.

Usage

In Claude for Desktop

  1. Start Claude for Desktop
  2. You should see FPL tools available via the hammer icon
  3. Example queries:
    • "Compare Mohamed Salah and Erling Haaland over the last 5 gameweeks"
    • "Find all Arsenal midfielders"
    • "What's the current gameweek status?"
    • "Show me the top 5 forwards by points"

Fantasy-PL MCP Usage Instructions

Basic Commands:

  • Compare players: "Compare [Player1] and [Player2]"
  • Find players: "Find players from [Team]" or "Search for [Player Name]"
  • Fixture difficulty: "Show upcoming fixtures for [Team]"
  • Captain advice: "Who should I captain between [Player1] and [Player2]?"

Advanced Features:

  • Statistical analysis: "Compare underlying stats for [Player1] and [Player2]"
  • Form check: "Show me players in form right now"
  • Differential picks: "Suggest differentials under 10% ownership"
  • Team optimization: "Rate my team and suggest transfers"

Tips:

  • Be specific with player names for accurate results
  • Include positions when searching (FWD, MID, DEF, GK)
  • For best captain advice, ask about form, fixtures, and underlying stats
  • Request comparison of specific metrics (xG, shots in box, etc.

MCP Inspector for Development

For development and testing:

bash
# If you have mcp[cli] installed
mcp dev -m fpl_mcp

# Or use npx
npx @modelcontextprotocol/inspector python -m fpl_mcp

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:

bash
# 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:

bash
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:

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

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

Limitations

  • The FPL API is not officially documented and may change without notice
  • Only read operations are currently supported

Troubleshooting

Common Issues

1. "spawn fpl-mcp ENOENT" error in Claude Desktop

This occurs because Claude Desktop cannot find the fpl-mcp executable in its PATH.

Solution: Use one of these approaches:

  • Use the full path to the executable in your config file

    json
    {
      "mcpServers": {
        "fantasy-pl": {
          "command": "/full/path/to/your/venv/bin/fpl-mcp"
        }
      }
    }
    
  • Use Python to run the module directly (preferred method)

    json
    {
      "mcpServers": {
        "fantasy-pl": {
          "command": "python",
          "args": ["-m", "fpl_mcp"]
        }
      }
    }
    

2. Server disconnects immediately

If the server starts but immediately disconnects:

  • Check logs at ~/Library/Logs/Claude/mcp*.log (macOS) or %APPDATA%\Claude\logs\mcp*.log (Windows)
  • Ensure all dependencies are installed
  • Try running the server manually with python -m fpl_mcp to see any errors

3. Server not showing in Claude Desktop

If the hammer icon doesn't appear:

  • Restart Claude Desktop completely
  • Verify your claude_desktop_config.json has correct JSON syntax
  • Ensure the path to Python or the executable is absolute, not relative

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:

bibtex
@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},
}

Star History

Star History Chart

Repository Owner

rishijatia
rishijatia

User

Repository Details

Language Python
Default Branch main
Size 255 KB
Contributors 2
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
97.94%
Shell
1.57%
Batchfile
0.49%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Dappier MCP Server

    Dappier MCP Server

    Real-time web search and premium data access for AI agents via Model Context Protocol.

    Dappier MCP Server enables fast, real-time web search and access to premium data sources, including news, financial markets, sports, and weather, for AI agents using the Model Context Protocol (MCP). It integrates seamlessly with tools like Claude Desktop and Cursor, allowing users to enhance their AI workflows with up-to-date, trusted information. Simple installation and configuration are provided for multiple platforms, leveraging API keys for secure access. The solution supports deployment via Smithery and direct installation with 'uv', facilitating rapid setup for developers.

    • 35
    • MCP
    • DappierAI/dappier-mcp
  • Balldontlie MCP Server

    Balldontlie MCP Server

    Sports data access via Model Context Protocol for LLMs

    Balldontlie MCP Server provides an MCP-compliant interface to the Balldontlie API, offering NBA, NFL, and MLB data to downstream AI models and applications. It supports retrieving information about teams, players, and games, and includes features like schedule generation for various leagues. The server is easily installable via Claude Desktop, Smithery, or LibreChat, and integrates with LLMs to allow natural-language sports queries.

    • 18
    • MCP
    • mikechao/balldontlie-mcp
  • IP Find MCP Server

    IP Find MCP Server

    A Model Context Protocol server for IP location lookups by AI assistants.

    IP Find MCP Server acts as a Model Context Protocol (MCP) server, allowing AI assistants to access geolocation data from the IP Find API. It connects the IP Find API with AI tools, enabling the retrieval of IP address location information in standardized contexts. Designed for integration with MCP clients such as the Claude Desktop App, it simplifies configuration and secure API key management. The server is certified by MCPHub.

    • 2
    • MCP
    • ipfind/ipfind-mcp-server
  • MLB API MCP Server

    MLB API MCP Server

    A Model Context Protocol server for seamless MLB data access through AI applications.

    MLB API MCP Server provides comprehensive access to MLB statistics and baseball data via a FastMCP-based interface. It exposes a range of MLB functionalities—including live game data, player statistics, team information, and advanced metrics—as MCP tools accessible by AI workflows. Compatible with MCP-enabled AI clients, it enables structured, schema-validated querying and integrations for baseball data.

    • 33
    • MCP
    • guillochon/mlb-api-mcp
  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • AFL MCP Server

    AFL MCP Server

    MCP-compatible server for comprehensive AFL data and analytics

    AFL MCP Server is a Model Context Protocol-compatible backend that serves detailed Australian Football League data via the Squiggle API. It offers standardized access to live scores, historical match results, team information, rankings, tips, projections, and advanced analytics. Designed for integration with MCP clients such as Claude for Desktop, it exposes a suite of tools for retrieving game, standings, and team data. The server streamlines AFL data retrieval through automated protocols, facilitating robust AI-powered workflows.

    • 14
    • MCP
    • willvelida/mcp-afl-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results