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 fifth draft trial completed with 13 manager-confirmed picks, two direct host-browser picks, and one unattributed selection. An opponent selection without a season projection blocked history normalization. The operator stopped the worker and completed the final two turns. The host capture contains all 160 selections and matches the 132 picks previously stored by the server. Installed v0.3.1 execution methods remained unchanged. This run required operator recovery and does not verify unattended completion. Version 0.3.2 separates verified opponent identity from projected value. Its regression evidence is separate from this live run.

The earlier fourth draft trial verified all 160 league selections and 16 manager-confirmed picks. It recorded zero ESPN Autopicks and zero host-browser DRAFT clicks. Installed v0.3.1 execution methods were unchanged. A private launcher handled collection and lifecycle.

One browser-control error occurred before the first authorization. A later check recovered before submission. The run required no package patches, restart, or manual recovery. A live Ravens D/ST selection succeeded. The record does not establish which autocomplete branch ran.

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.

The third draft trial also finished with 13 manager-confirmed picks and three platform fallbacks. It exposed team-name whitespace and D/ST selector failures. Version 0.3.1 fixes both cases in isolated Chrome tests. The browser handoff missed the final two turns. This trial also required operator recovery.

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.

After the fourth draft, the server verified fresh Week 1 observations and selected-team locks for four exact team contexts. The verified handoff recorded zero new lineup authorizations and zero unresolved authorized claims. These observations do not verify live server lineup submission or an unattended season. Read server acceptance for restart, archive, and recovery evidence. All three additional draft trials are complete, with their failures and execution sources recorded separately. The fifth roster's season handoff and the five-team season evaluation remain planned.

Install from PyPI

Version 0.3.2 preserves verified opponent draft history when a season projection is missing. Version 0.3.1 fixed draft team-name whitespace and D/ST selectors. Version 0.3.0 introduced server season scheduling, durable evidence, and a PostgreSQL archive. Check the PyPI project and distribution status for available releases. The manager has an active MCP Registry record. Use Python 3.11 or later, uv, and installed Google Chrome.

uv tool install fantasy-football-manager
fantasy-football-manager --help
fantasy-football-espn --help

Install from source

For development, run these commands from the repository checkout:

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

Connect the commands

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.

Use the v0.3.2 release page for 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 v0.3.2 source passed 628 tests across the base and separate Chrome runs, including 17 isolated Chrome cases. Two remaining skips required PostgreSQL configuration and Windows symlink permissions. Historical v0.3.1 Linux checks passed 23 archive tests with PostgreSQL and 28 discovery collector tests. Those results do not verify the v0.3.2 source. These test counts are distinct from live account acceptance. Live draft execution of an installed v0.3.2 wheel remains Not Tested. 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.2.tar.gz (322.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.2-py3-none-any.whl (105.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fantasy_football_manager-0.3.2.tar.gz
  • Upload date:
  • Size: 322.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.2.tar.gz
Algorithm Hash digest
SHA256 b54c3084abd69151a6e004c890852d5b01b0706f6837b1d33f3246b0d09120a5
MD5 a27ce86b76ba15960b44677283be73d9
BLAKE2b-256 71de81a9235c65d870626cb8eea609b2c04a0ee1edd17f25b44885d060030a89

See more details on using hashes here.

Provenance

The following attestation bundles were made for fantasy_football_manager-0.3.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fantasy_football_manager-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da18734a6af2fbad0d1cdb07399212fdc912a4c067665205e9e7737b7958dbb3
MD5 6e7d1913ec63dd8bed23b574fee5c553
BLAKE2b-256 122cc7b5fe5cb6e6d912ee5addd9ca6791a60c4c99e08ba716015a8d6c901694

See more details on using hashes here.

Provenance

The following attestation bundles were made for fantasy_football_manager-0.3.2-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

0.3.3

2 files

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

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