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.
- Install and connect both MCP servers.
- Read the saved action modes with
get_manager_config. - Keep
set_lineupin advisory mode for the first check. - Call
espn_connectwith your league ID, team ID, season,phase="season", and scoringweek. - Sign in to ESPN in the dedicated Chrome window when required.
- Call
espn_syncto import the observed roster, projections, and player locks. - Call
recommend_lineupon the manager to calculate the weekly lineup. - Read
espn_get_statusto 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b40169b72a4480fd39914842d2a93b22d048908e13d607d4de86dd16a0f862b2
|
|
| MD5 |
c60066654a5ebceacce6bcd36a63986c
|
|
| BLAKE2b-256 |
f0006a00eee1a96d3741b0424692533aabb865d5063da0651add363cbf477b9e
|
Provenance
The following attestation bundles were made for fantasy_football_manager-0.3.0.tar.gz:
Publisher:
release.yml on krmisystems/fantasy-football-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fantasy_football_manager-0.3.0.tar.gz -
Subject digest:
b40169b72a4480fd39914842d2a93b22d048908e13d607d4de86dd16a0f862b2 - Sigstore transparency entry: 2755372634
- Sigstore integration time:
-
Permalink:
krmisystems/fantasy-football-manager@d3acc32150ad71b0d85847f603fcd7649a2436b7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/krmisystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3acc32150ad71b0d85847f603fcd7649a2436b7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fantasy_football_manager-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fantasy_football_manager-0.3.0-py3-none-any.whl
- Upload date:
- Size: 103.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
829544b1687df28fdc59a4843fb72ec5b6dea6ea7d12a794d856f8206e059fe4
|
|
| MD5 |
a6808d62de8b42c9f45295f827a7535d
|
|
| BLAKE2b-256 |
4976231601a2e5906eb13552a8f20ceb8a23ace15e0f951214437c355da5a8d8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fantasy_football_manager-0.3.0-py3-none-any.whl -
Subject digest:
829544b1687df28fdc59a4843fb72ec5b6dea6ea7d12a794d856f8206e059fe4 - Sigstore transparency entry: 2755372638
- Sigstore integration time:
-
Permalink:
krmisystems/fantasy-football-manager@d3acc32150ad71b0d85847f603fcd7649a2436b7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/krmisystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3acc32150ad71b0d85847f603fcd7649a2436b7 -
Trigger Event:
workflow_dispatch
-
Statement type: