> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MyFantasyLeague

> Connect a MyFantasyLeague.com fantasy football league to Serval so workflows can read league data and manage a franchise — rosters, lineups, waivers, trades, and live-draft picks. Currently in beta.

## About MyFantasyLeague

MyFantasyLeague (MFL) is a fantasy football platform known for deeply customizable leagues and a complete public API. Connecting a league to Serval lets workflows read everything about it — rules, rosters, free agents, projections, standings, transactions — and act for your franchise: submit lineups, claim players on waivers or with FAAB bids, make immediate add/drops, manage injured reserve and the taxi squad, propose and answer trades, and make picks in a live draft. The MyFantasyLeague integration is currently in **beta**.

**Authentication**

Serval signs in to MFL with a franchise owner's username and password, and stores the password encrypted. It exchanges those credentials for MFL's `MFL_USER_ID` session cookie and reuses that cookie across calls, signing in again automatically when it expires or the password changes. Workflow authors never handle the credentials. Serval identifies itself with a User-Agent registered under MFL's API client program, which grants higher rate limits than anonymous clients get.

Everything Serval can do is bounded by what that MFL account can do in the league: it acts as that owner's franchise, and commissioner-only operations work only if the account is the league commissioner.

**League hosts**

MFL serves each league from a numbered server (for example `www47.myfantasyleague.com`) and can move leagues between servers. Serval discovers the league's current host automatically when you connect and pins requests to it; site-wide data (the player database, injuries, ADP) is read from MFL's shared API host.

## What the MyFantasyLeague integration enables

| Capability              | Description                                                                                                                       |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| League setup and rules  | Read the league configuration, franchises, divisions, lineup requirements, and scoring rules.                                     |
| Rosters and free agents | Read every franchise's roster (with IR/taxi status and salary info) and the available free agents.                                |
| Player data             | Read MFL's full player database, player profiles, the NFL injury report, projected and actual fantasy scores, and ADP draft data. |
| Standings and schedules | Read league standings, weekly results, live scoring, the fantasy schedule, the NFL schedule, and the current NFL week.            |
| Lineups                 | Submit a franchise's starting lineup for a week.                                                                                  |
| Waivers and add/drops   | Read pending waivers; submit standard waiver claims, FAAB (blind-bid) claims, and immediate first-come-first-serve add/drops.     |
| IR and taxi squad       | Move players on and off injured reserve and the taxi squad.                                                                       |
| Trades                  | Read pending trades and trade bait; propose trades (players, picks, FAAB dollars) and accept, reject, or revoke offers.           |
| Drafting                | Read draft results and ADP, manage the pre-draft player queue, and make live-draft picks.                                         |
| Ad hoc API calls        | Call any documented MFL request the connected account is allowed to make.                                                         |

## Get your credentials

1. Use the MFL account that owns your franchise (or create a dedicated one and add it as an owner of the franchise you want Serval to manage).
2. Find your **League ID** — the 4- or 5-digit number in your league's URL, for example `17268` in `https://www47.myfantasyleague.com/2026/home/17268`.
3. Note the **season year** your league is playing under (for example `2026`).

## Connect MyFantasyLeague to Serval

1. In Serval, go to **Settings → Integrations** and choose **MyFantasyLeague**.
2. Enter the account's **Username** and **Password**.
3. Enter the **League ID** and **Season**.
4. Save the connection. Serval looks the league up, discovers which MFL server hosts it, and verifies the account can access it.

## Gotchas and troubleshooting

<AccordionGroup>
  <Accordion title="The account must own a franchise in the league">
    Most league data and every team action require the connected account to be an owner in the configured league. If the connection test fails with a "requires logged in user" message, the credentials are fine but the account isn't an owner in that league ID — or the league ID or season is wrong.
  </Accordion>

  <Accordion title="One connection per league">
    A connection is scoped to a single league and season. If you play in several leagues, connect each one separately; at the start of a new season, update the connection's season (league IDs usually carry over year to year).
  </Accordion>

  <Accordion title="MFL reports failures with a 200 response">
    MFL answers a rejected call with an error payload rather than an error status. Serval reads the payload and raises the failure, so a permission problem surfaces as a failed step instead of an empty result. If a step fails with a message quoting MFL, that message came from MFL.
  </Accordion>

  <Accordion title="Writes are never retried automatically">
    MFL rate-limits by IP and asks clients not to retry failed calls aggressively. Serval retries reads after backing off, but never retries a write (waiver claim, lineup, trade, draft pick) on its own — a timed-out write may still have been applied, so check the result before resubmitting.
  </Accordion>

  <Accordion title="If MFL moves your league to a different server">
    MFL occasionally moves leagues between its numbered servers. Reads keep working, but if team actions start failing after a move, open the integration's settings and save them again — Serval re-discovers the league's host on every save.
  </Accordion>

  <Accordion title="Cache the player database">
    MFL updates its player database at most once per day and asks clients to read it no more than daily. Workflows that need it often should store it and refresh with the SINCE parameter rather than re-reading it on every run.
  </Accordion>

  <Accordion title="Beta integration">
    The MyFantasyLeague integration is marked beta in the connect screen. Behavior and available capabilities may change.
  </Accordion>
</AccordionGroup>

***

Need help? Contact **[support@serval.com](mailto:support@serval.com)** for assistance with your MyFantasyLeague integration.
