FA

Fantasy PL MCP Server for FPL Data API

Access Fantasy Premier League data and tools via an MCP server for seamless interaction in Claude for Desktop and other MCP-compatible clients.

Quick Install
npx -y @rishijatia/fantasy-pl-mcp

Overview

The Fantasy PL MCP Server exposes Fantasy Premier League (FPL) data and utility functions over the Model Context Protocol (MCP). It turns the official FPL API and derived statistics into an MCP-compatible server you can connect to from MCP-aware clients (for example, Claude for Desktop, Cursor, Windsurf, or other desktop LLM integrations). This makes FPL data and actionable tools available to conversational agents without requiring direct API coding inside the assistant.

For developers, the server provides structured endpoints (fpl:// URIs) and an RPC-style tool surface for common fantasy tasks: player search, fixtures lookup, gameweek status, player comparisons, and more. You can run it locally, wire it into a desktop LLM, and use the tools directly from within a chat interface or during development with the MCP Inspector.

Features

  • Rich player metadata and per-gameweek statistics fetched from the FPL API
  • Team and fixture data for the current Premier League season
  • Gameweek utilities: current/previous/next gameweek status, blank/double-week detection
  • Player search by name or team and fuzzy matching support
  • Player-vs-player comparison with underlying metrics (xG, shots, form, etc.)
  • Tools to analyze upcoming fixtures and rate difficulty for decisions (captaincy, transfers)
  • MCP-compatible endpoints and helper tools for easy integration with desktop LLMs

Installation / Configuration

Requirements: Python 3.10+

Install from PyPI (recommended)

pip install fpl-mcp

Install with development extras

pip install "fpl-mcp[dev]"

Install from GitHub

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

Clone source and install locally

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

Run the server

Using the installed CLI:

fpl-mcp

Using the Python module:

python -m fpl_mcp

Configure Claude for Desktop (example)

Method A — run as a Python module (recommended):

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

Method B — run the installed executable (use full path to avoid PATH issues):

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

Developer / Inspector

# If you have the mcp CLI installed
mcp dev -m fpl_mcp

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

Available Resources & Tools

Common fpl:// resource URIs (readable via MCP clients):

URI patternDescription
fpl://static/playersAll players with stats and metadata
fpl://static/players/{name}Lookup player(s) by name
fpl://static/teamsAll Premier League teams
fpl://static/teams/{name}Team lookup by name
fpl://gameweeks/currentCurrent gameweek info
fpl://gameweeks/allAll gameweeks for the season
fpl://fixturesSeason fixtures
fpl://fixtures/gameweek/{id}Fixtures for a specific gameweek
fpl://fixtures/team/{team_name}Fixtures for a given team
fpl://players/{player_name}/fixturesUpcoming fixtures for a player
fpl://gameweeks/blankUpcoming blank gameweeks
fpl://gameweeks/doubleUpcoming double gameweeks

Available programmatic tools (MCP tool surface)

  • get_gameweek_status — returns current/previous/next gameweek and deadlines
  • analyze_player_fixtures — rates upcoming fixtures for a player (difficulty)
  • get_blank_gameweeks — lists blank gameweeks and affected teams
  • get_double_gameweeks — lists double gameweeks and affected teams
  • compare_players — side-by-side metrics and visual summary for two players
  • search_players — fuzzy search by name, position, or team

Use Cases

  1. Quick captain decision inside Claude:

    • Query: “Who should I captain between Mohamed Salah and Kevin De Bruyne this Gameweek?”
    • The server returns recent form, fixture difficulty, and a recommendation based on metrics.
  2. Differential discovery for transfers:

    • Query: “Show midfielders under 5% ownership with good upcoming fixtures.”
    • Returns a filtered list with ownership, recent points, and fixture ratings.
  3. Player comparison for transfer decisions:

    • Query: “Compare Erling Haaland and Darwin Núñez over the last 5 gameweeks on xG and shots”.
    • Returns a table of metrics per player and a short analysis to help choose.
  4. Programmatic workflow / automation:

    • Use the fpl:// endpoints from a script or an MCP-capable app to fetch player lists and integrate into larger analytics pipelines (e.g., generate weekly recommended transfers).
  5. Development & testing:

    • Run the server with the MCP Inspector to explore endpoints, test tools, and iterate on prompts that call the server.

Tips & Notes

  • Be explicit with player names (including club or position) to improve matching accuracy.
  • When embedding the CLI path in desktop app config, prefer a full path or the Python module invocation to avoid environment PATH issues.
  • Mobile MCP clients may not be supported — this server targets desktop MCP integrations.