Skip to main content
Glama
FPL MCP

FPL MCP

by MoayadAbbara

FPL MCP

Управляйте своей командой Fantasy Premier League с помощью ИИ. Сервер MCP, который позволяет LLM-клиенту вроде Claude читать вашу команду FPL, анализировать игроков и матчи, предлагать трансферы, следить за соперниками в мини-лиге и реально совершать трансферы, назначать капитана и активировать чипы — всё через обычный чат на естественном языке.

⚠️ Неофициальный. Не связан с Премьер-лигой, не одобрен ею и не имеет к ней отношения. Использует публичный API FPL. Работает полностью на вашем компьютере — ваш сессионный токен никогда не покидает вашу машину, и ваш пароль не виден этому инструменту или модели.


Демо

Одно предложение — несколько действий: трансфер, смена капитана и изменение состава — всё выполняется на реальной команде:

«Продать Жуана Педро, купить Хавертца, сделать Холанда капитаном, и вывести Йейтса в стартовый состав вместо Ле Фе»

Демо FPL MCP — управление командой из чата


Related MCP server: FPL MCP Server

Чем это отличается

Большинство FPL-инструментов только читают данные и дают советы, которые вы потом применяете вручную. Этот:

  • Реально управляет вашей командой — трансферы, капитан, состав и чипы выполняются по-настоящему.

  • Входит в систему, не касаясь вашего пароля — открывается настоящий браузер, вы входите на официальной странице FPL, и захватывается только сессионный токен.

  • Следит за вашей мини-лигой — составы соперников публичны, поэтому он вычисляет владение игроками в вашей лиге и сообщает ваше преимущество и угрозы.

  • Предлагает трансферы с учётом позиций — три стратегии: максимальные очки, безопасные шаблонные варианты или дифференциалы для подъёма в рейтинге.

Инструменты

Категория

Инструменты

Авторизация

login_to_fpl

Ваша команда

get_my_team

Данные

get_gameweek_status, search_players, compare_players, get_player, get_fixtures, blank_double_gameweeks, get_league_standings, transfer_history, team_news

Анализ

suggest_transfers, analyze_mini_league

Управление

make_transfer, transfer_preview, set_captain, substitute, play_chip

Как работает вход (и почему это безопасно)

FPL перешёл на токеновую аутентификацию (PingOne OIDC). Вместо запроса вашего пароля login_to_fpl:

  1. Открывает настоящее окно браузера на официальном сайте FPL.

  2. Вы самостоятельно входите в систему.

  3. Сессионный токен считывается из сетевого трафика и сохраняется локально в token.txt.

Ваш пароль вводится только на странице FPL — он никогда не попадает в этот код или в модель. Никакой обход защиты от ботов не используется; вход выполняет человек. Полное техническое описание см. в docs/FINDINGS.md.

Требования

  • Python 3.12+

  • uv

  • Node.js (только если вы используете MCP Inspector для разработки)

Установка

git clone https://github.com/MoayadAbbara/FPL-MCP.git
cd FPL-MCP
uv sync --extra browser      # includes Playwright for browser login
uv run playwright install chromium

Подключение к Claude

Зарегистрируйте сервер в вашем MCP-клиенте. Для Claude Code:

claude mcp add fpl -- uv run --directory /path/to/FPL-MCP python src/server.py

Или добавьте его в конфигурацию MCP вашего клиента (.mcp.json / claude_desktop_config.json):

{
  "mcpServers": {
    "fpl": {
      "command": "uv",
      "args": ["run", "python", "src/server.py"],
      "cwd": "/path/to/FPL-MCP"
    }
  }
}

Перезапустите клиент и просто общайтесь с ним.

Использование

После подключения используйте обычный язык:

"Sign in to FPL"
"Show my team"
"Any injury news on Arsenal players?"
"Compare Haaland and Gyökeres"
"Suggest transfers — differential mode"
"Analyse my mini-league 123456"
"Transfer out Haaland, bring in João Pedro, and make Watkins captain"

Модель вызывает нужные инструменты и, если что-то меняет команду, сообщает вам, что она сделала.

Архитектура

Каждый уровень знает только о нижележащем:

src/
  tools/    MCP tool surface (thin glue: fetch -> domain -> format -> text)
  format/   raw data -> compact, model-friendly text
  domain/   pure FPL logic (scoring, suggestions, roster maths) — no HTTP, no MCP
  api/      FPL HTTP client
  auth/     token capture (browser) and storage
  server.py entry point

Сырой JSON FPL никогда не попадает в модель; он проходит через domain/, затем format/, так что до модели доходят только релевантные для принятия решений данные.

Разработка

uv run ruff format . && uv run ruff check --fix .   # format + lint
uv run python src/server.py                          # run the server (stdio)

Примечания

  • Инструменты, зависящие от сезона (suggest_transfers, analyze_mini_league), лучше всего работают после начала сезона; до первого дедлайна они возвращают понятное сообщение «пока недоступно».

  • Управление командой через автоматизацию может нарушать правила FPL. Используйте для своей собственной команды и соблюдайте их.

Лицензия

MIT

Available Tools

18 tools
analyze_mini_leagueA

Spy on a classic mini-league: your rank, your edge, and the threats, compared against the ~10 managers above and below you.

    Args:
        league_id: The mini-league ID.
        team_id: Optional; detected from your account if omitted.
    

Inputs: league_id (required), team_id. Returns: result

blank_double_gameweeksA

List upcoming blank and double gameweeks by club.

Inputs: no named parameters. Returns: result

compare_playersC

Compare two or more players side by side by name.

Inputs: players (required). Returns: result

get_fixturesC

Upcoming fixtures and difficulty for a club (e.g. 'Arsenal' or 'ARS').

Inputs: team (required), next_n. Returns: result

get_gameweek_statusA

Show the current, previous, and next gameweeks, plus the next deadline.

Inputs: no named parameters. Returns: result

get_league_standingsB

Show standings for a classic mini-league by its ID.

Inputs: league_id (required). Returns: result

get_my_teamA

Get an FPL team: starting XI, bench, captain, bank, value, and chips.

    Requires authentication (a Bearer token). Args:
        team_id: The FPL team ID. If omitted, it is detected automatically
            from the authenticated account.
    

Inputs: team_id. Returns: result

get_playerB

Detailed profile for one player: stats, status, and upcoming fixtures.

Inputs: name (required). Returns: result

login_to_fplA

Open a browser to sign in to Fantasy Premier League and save the token.

A real browser window opens on the FPL site. The user signs in there themselves; their password is never seen by this tool or the model. Once signed in, the session token is captured and stored for later calls.

Inputs: no named parameters. Returns: result

make_transferA

Transfer one player out and another in (by name).

    Args:
        sell: Name of a player currently in your squad to sell.
        buy: Name of the player to buy.
        team_id: Optional; detected from your account if omitted.
    

Inputs: buy (required), sell (required), team_id. Returns: result

play_chipB

Activate a chip, or cancel the active one.

    Args:
        chip: One of wildcard, free hit, bench boost, triple captain
            (aliases like wc/fh/bb/3xc/tc also work), or "cancel" to turn it off.
        team_id: Optional; detected from your account if omitted.
    

Inputs: chip (required), team_id. Returns: result

search_playersA

Find players by filters, best first.

    Args:
        position: GKP, DEF, MID, or FWD.
        team: Club short or full name (e.g. ARS or Arsenal).
        max_price: Maximum price in millions.
        min_price: Minimum price in millions.
        sort_by: points, form, price, ownership, goals, or assists.
        limit: How many players to return.
    

Inputs: team, limit, sort_by, position, +2 more. Returns: result

set_captainA

Set your captain, and optionally your vice-captain (by name).

    Args:
        player: Name of the squad player to make captain.
        vice: Optional name of the squad player to make vice-captain.
        team_id: Optional; detected from your account if omitted.
    

Inputs: player (required), vice, team_id. Returns: result

substituteA

Swap a bench player into the starting XI and move a starter to the bench.

    Args:
        bench_in: Name of the bench player to bring into the XI.
        starter_out: Name of the starting player to move to the bench.
        team_id: Optional; detected from your account if omitted.
    

Inputs: bench_in (required), starter_out (required), team_id. Returns: result

suggest_transfersB

Suggest transfers that improve your squad over the next 3 gameweeks.

    Args:
        mode: "normal" (best expected points), "template" (safe, well-owned
            picks), or "differential" (low-owned picks to climb your rank).
        team_id: Optional; detected from your account if omitted.
    

Inputs: mode, team_id. Returns: result

team_newsB

Injury and availability news: who is injured, doubtful, or suspended, their chance of playing, and the official note.

    Args:
        team: Optional club filter (e.g. 'Arsenal' or 'ARS').
        player: Optional player name; shows that player's status even if fit.
    

Inputs: team, player. Returns: result

transfer_historyA

Show a team's transfers this season. Auto-detects your team if logged in.

Inputs: team_id. Returns: result

transfer_previewA

Show what a transfer would do (funds, position) WITHOUT submitting it.

Inputs: buy (required), sell (required), team_id. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools target a distinct action and resource: search, compare, get profile, fixtures, transfers, chips, and squad moves are well separated. The main potential confusion is between get_league_standings and analyze_mini_league, which both deal with mini-league data, though their descriptions indicate different scopes.

    Naming Consistency3/5

    There is a clear majority pattern of imperative get_/set_/make_/play_ verbs, but several names are noun phrases instead, such as team_news, transfer_history, transfer_preview, and blank_double_gameweeks. The convention is consistent enough to be readable, but it is not uniformly verb_noun.

    Tool Count4/5

    18 tools is on the heavier end, but the FPL domain is broad and each tool serves a distinct part of the workflow: login, squad, players, fixtures, news, transfers, chips, and leagues. A few could arguably be folded together, but the count feels justified rather than bloated.

    Completeness5/5

    The tool surface covers the core FPL lifecycle: authentication, team viewing, player research, fixture difficulty, injuries, league standings, mini-league analysis, transfer history/suggestions/preview/execution, captain selection, substitutions, and chips. There are no obvious dead ends or missing domain-critical operations.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Fantasy Premier League data through natural language queries. Supports retrieving fixtures, league standings, player performance, and other FPL statistics via the official FPL API.
      16
      9 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects LLMs to the Fantasy Premier League API for intelligent team management, enabling natural language player research, competitor analysis, transfer decisions, and strategic planning using friendly names instead of IDs.
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to analyze Fantasy Premier League data, providing tools for player search, fixture analysis, manager comparisons, and strategy prompts for transfer planning and lineup selection.
      19
      35 PyPI
      1
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides tools and resources to interact with the Fantasy Premier League API, enabling player analysis, fixture insights, and team management through natural language.
      -