Skip to main content

Fantasy Football Manager

ESPN fantasy football draft and lineup tools for Codex and other Model Context Protocol (MCP) clients. Connect your league, sync its roster, and calculate a legal weekly lineup from current projections. The same package provides a draft assistant with continuous Monte Carlo simulations and a server coordinator for multiple teams.

The manager MCP server provides 17 tools for analysis, policy, and league state. The ESPN MCP companion provides 13 tools for browser observation and controlled draft or lineup submissions. ESPN requests use your signed-in browser session. This independent project does not supply an ESPN account or bypass sign-in. Use browser sign-in without manually copying cookies between profiles.

Start with a weekly lineup

Authenticated sign-in, roster sync, and advisory lineup analysis are verified workflows. Start in advisory mode to inspect the recommendation before enabling live actions.

  1. Install and connect both MCP servers.
  2. Read the saved action modes with get_manager_config.
  3. Keep set_lineup in advisory mode for the first check.
  4. Call espn_connect with your league ID, team ID, season, phase="season", and scoring week.
  5. Sign in to ESPN in the dedicated Chrome window when required.
  6. Call espn_sync to import the observed roster, projections, and player locks.
  7. Call recommend_lineup on the manager to calculate the weekly lineup.
  8. Read espn_get_status to check the context, observation age, and pending actions.

The result includes the legal lineup and estimated projection change when the required inputs are complete. Missing projections or lock evidence can prevent a recommendation or submission. Selected-team lock evidence does not establish league-wide power rankings.

flowchart LR
    Client[Codex or MCP client] --> Companion[ESPN MCP companion]
    Companion --> Chrome[Dedicated signed-in Chrome]
    Chrome --> ESPN[ESPN league]
    Companion --> State[Per-league SQLite state]
    Client --> Manager[Manager MCP analysis and policy]
    State --> Manager
    Manager --> Result[Lineup or draft recommendation]

Read the ESPN workflow and tool reference for configuration and submission steps. Check the versioned compatibility matrix for supported layouts, regression fixtures, and live evidence.

Choose how actions run

Mode Behavior
Advisory Calculate recommendations without submitting a live action.
Review Prepare an exact proposal. Submit it after explicit confirmation.
Automatic Submit qualifying draft picks or lineup swaps within the saved policy. No per-action confirmation is required.
Disabled Block the selected action.

Use update_manager_config to replace the full config with its current revision. Read that config before changing one action mode. Strategy preferences do not grant execution permission. For lineup changes with approval, use review mode and confirm each exact proposal.

For season automation, call espn_start_automation after connecting to the explicit week and setting the authorized set_lineup mode. Each intermediate lineup swap must meet the configured improvement limit. Some optimized lineups require intermediate swaps that the limit blocks. A confirmed swap does not mean the full optimized lineup was applied.

Each live submission receives a durable claim before the browser click. The service verifies the resulting ESPN state. An uncertain result blocks another click until reconciliation. Use espn_stop_automation to pause new actions for that league's data directory. It does not undo an action already submitted.

Draft with continuous simulations

Connect with phase="draft", then call espn_sync to verify complete history and the current pick. Set the requested draft strategy, action mode, and limits before calling espn_start_automation. Automatic submissions require the correct team on the clock and verified disabled ESPN Autopick.

The draft engine accounts for snake order, roster caps, starter completion, and five strategy preferences. It recalculates after input changes and combines completed simulation batches for unchanged inputs. Its estimates use a two-pick horizon, projected player values, and simulated opponent choices. Availability estimates are conditional. They do not guarantee that a player survives to the next pick. More trials do not correct stale inputs or projection errors. The model does not report championship odds.

The live draft trial completed a 16-player roster in a 10-team PPR snake draft. It recorded 13 manager-confirmed picks and 3 ESPN Autopicks. Startup failures and an autocomplete timeout caused platform fallback selections. The run required compatibility patches and manual recovery. It was not an unattended draft from start to finish. Its runtime used installed v0.2.1 dependencies with changing working-tree patches. Do not attribute that live result to an unchanged released wheel.

Keep team management running

espn_start_automation runs inside the MCP process. Use espn_start_standalone_worker for a local worker that continues after Codex closes while that computer remains available.

For operation without the client PC, install the season coordinator on a server. The server retains its own signed-in Chrome profile and visits configured teams serially. Each team keeps a separate SQLite database, policy, explicit week, and pending claims. One shared profile lease prevents simultaneous browser control. The optional PostgreSQL archive preserves labeled evidence. Private backups preserve the operational databases and configuration.

The development server passed two-team observation and analysis checks with zero live server lineup swaps. No qualifying swap was needed. This does not verify live server lineup submission or an unattended season. Read server acceptance for restart, archive, and recovery evidence. Three additional draft trials and a five-team season trial are planned.

Install from source

Version 0.3.0 adds server season scheduling, durable evidence, and a PostgreSQL archive. Use this checkout for source installation. Check distribution status for versioned package availability. Use Python 3.11 or later, uv, and installed Google Chrome.

uv sync --locked --dev
uv tool install --force .
fantasy-football-manager --help
fantasy-football-espn --help

Register both commands with Codex, or use the Codex plugin instructions:

codex mcp add fantasy-football-manager -- fantasy-football-manager
codex mcp add fantasy-football-espn -- fantasy-football-espn

Both commands must be on the MCP host's PATH. Restart the MCP connection after installation. The plugin already registers both commands. Avoid duplicate direct registrations when using it. The plugin contains workflow instructions and command registrations; it does not install the Python package.

Use the same FFM_DATA_DIR or --data-dir for both MCP servers that manage one league. Use FFM_BROWSER_DATA_DIR to select a shared browser profile root across separate league databases. The package includes Playwright and uses installed Chrome. An optional cdp_url can connect to an explicit loopback browser debugging endpoint. Keep profiles, credentials, databases, logs, and real league exports outside Git. Read the privacy notes.

The v0.3.0 release page identifies the versioned wheel, plugin ZIP, and checksums. The distribution acceptance record tracks verified GitHub, PyPI, and MCP Registry publication separately. Follow the release instructions for publisher setup. Earlier published assets remain unchanged.

Scope and validation

Area Implemented scope Limit
Draft assistant Snake drafts, roster legality, strategy preferences, continuous Monte Carlo estimates No auction support. Two-pick planning horizon.
Weekly analysis Lineups, available-player comparisons, projected power rankings Requires current projections, ownership, eligibility, and sufficient lock evidence.
ESPN live actions Draft picks and one lineup swap per verified proposal Browser compatibility and current authorization are required.
Server team manager Serial team visits, graceful stop, health, durable evidence, PostgreSQL archive, backups Explicit weeks. Shared browser control is serial.
Planned season actions Live waivers, free-agent additions, drops, trades, and automatic week rollover These execution adapters are not implemented.

The final local validation passed 608 tests on Windows, including 15 isolated Chrome cases. The two skips were PostgreSQL configuration and Windows symlink permissions. Separate Linux checks passed 23 archive tests with PostgreSQL and 28 discovery collector tests. These test counts are distinct from live account acceptance. See validation status, server acceptance, and the compatibility matrix.

For a synthetic demonstration, run uv run fantasy-football-manager --demo. The CLI demo calculates an in-memory report. The manager's demo execution tools modify synthetic state only. Use a separate state directory for demonstrations.

For development checks, run:

uv run pytest -q
uv run python scripts/validate_release.py

Browser and PostgreSQL cases require their explicit test settings. Use the complete test commands. Release packaging waits for the requested commit's Windows, Ubuntu, Chrome, and PostgreSQL gates. See architecture, policy, and release instructions. The discovery measurement plan separates publication checks from observed discovery results.

License: MIT. Copyright 2026 krmisystems.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fantasy_football_manager-0.3.0.tar.gz (300.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fantasy_football_manager-0.3.0-py3-none-any.whl (103.5 kB view details)

Uploaded Python 3

File details

Details for the file fantasy_football_manager-0.3.0.tar.gz.

File metadata

  • Download URL: fantasy_football_manager-0.3.0.tar.gz
  • Upload date:
  • Size: 300.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fantasy_football_manager-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b40169b72a4480fd39914842d2a93b22d048908e13d607d4de86dd16a0f862b2
MD5 c60066654a5ebceacce6bcd36a63986c
BLAKE2b-256 f0006a00eee1a96d3741b0424692533aabb865d5063da0651add363cbf477b9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fantasy_football_manager-0.3.0.tar.gz:

Publisher: release.yml on krmisystems/fantasy-football-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fantasy_football_manager-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fantasy_football_manager-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 829544b1687df28fdc59a4843fb72ec5b6dea6ea7d12a794d856f8206e059fe4
MD5 a6808d62de8b42c9f45295f827a7535d
BLAKE2b-256 4976231601a2e5906eb13552a8f20ceb8a23ace15e0f951214437c355da5a8d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fantasy_football_manager-0.3.0-py3-none-any.whl:

Publisher: release.yml on krmisystems/fantasy-football-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page