fantasy-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SWID | Yes | Your ESPN `SWID` cookie value (keep curly braces). Required for authentication. | |
| SEASON | No | Optional season year (defaults to current calendar year). Set explicitly from January to July to view last season. | |
| ESPN_S2 | Yes | Your ESPN `espn_s2` cookie value (keep URL-encoded). Required for authentication. | |
| TEAM_ID | No | Optional team ID (normally auto-detected from SWID; set only if needed). | |
| LEAGUE_ID | Yes | Your ESPN fantasy football league ID (the number after `leagueId=` in the URL). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| whoamiA | Verify ESPN credentials and league configuration. Call this first. Cheap (one small request, no roster data). Returns the league id/name, season, and the user's team id/name. Fails with an explanatory message if cookies are expired or the league/team can't be resolved. |
| setupA | Show the in-chat setup card for connecting the user's ESPN league. Call this when any tool reports the league is not configured, or when the user asks to set up, connect, update, or change their league or cookies. The card explains where to find the espn_s2 and SWID cookies, has one input per value, and saves + verifies them via save_settings. Ask the user to fill in the card; do not ask them to paste cookies into the chat. If this client cannot display cards, tell the user to set the values in the extension's settings in Claude Desktop or in .env for a local checkout (see README). |
| save_settingsA | Save ESPN credentials and league id, then verify them against ESPN. Normally called by the setup card's Save & test button; you may call it
directly if the user pasted values into the chat. Returns {"ok": true,
"league_name", "team_name", "season"} on success, or {"ok": false,
"error": "..."} with a message to relay. Values are stored in a per-user
config file that takes precedence over the extension's settings form.
Values are written to the config file before the ESPN check, so on an
|
| get_league_settingsA | League rules: scoring, roster construction, schedule/playoffs, waivers, trades. Call this before start/sit, pickup, or trade advice so recommendations use this league's scoring (scoring.ppr = points per reception; scoring.summary is a one-line description; scoring.rules maps stat names -- the same names get_player's game log uses -- to points, with unmapped ESPN ids as stat_). roster.lineup gives starting slots and bench/IR counts; roster.position_limits caps how many of a position a team may roster. waivers describes the claim system (budget is FAAB dollars when present); trades.deadline is a UTC date. |
| get_standingsA | League standings: rank, record, points for/against, streak, projected finish, waiver order. Use this for "where do I stand", "who's in the playoff picture", "who has the top waiver priority", or "who's been active on waivers/trades". Teams are ordered by ESPN's playoff seed (falling back to wins then points for when ESPN hasn't seeded yet, e.g. preseason); is_me marks the user's team; owner is the ESPN member name; projected_rank is ESPN's projected final standing; clinched is set once a team has clinched a playoff spot. Records and points update when ESPN finalizes each week (use get_matchup for live scores). |
| get_my_teamA | Return the user's fantasy team: season record, points, and full roster. Each roster row has: player_id (pass to get_player); name; position (the player's NFL position, e.g. QB/RB/WR); slot (the fantasy lineup slot — BENCH and IR mean not starting, anything else is a starter); pro_team (NFL team abbreviation); injury_status; projected (ESPN's projection for the current NFL week, null if unavailable). Rows are ordered starters first, then bench, then IR. Record and points are season-to-date for the configured season. |
| get_teamA | Another league team's roster: record, points, and players with current-week projections. Use this for trade targets, "who has the most RBs", or "what does Lucas's team look like". team is a team id (from get_standings or get_matchup) or a name / abbreviation (case-insensitive; a partial name works if unique). Same shape as get_my_team: owner, record, points_for/against, and roster rows with player_id, name, position, slot, pro_team, injury_status, and projected for the current NFL week. |
| get_matchupA | Return the user's head-to-head matchup for the current week (or a given week). Use this for "am I winning?", "who am I playing?", or "should I have started X?". week defaults to the current matchup period (current_week); pass an earlier week for a final result or next week's number for a preview with projections. There is no per-player game-state field: points of 0.0 may mean the player has not played yet OR played and scored nothing -- do not claim to know which. Top level: week; status (UPCOMING, IN_PROGRESS, or FINAL); is_home; my_team; opponent. Each team has: team_id, name, abbrev, score (fantasy points so far this week), projected (ESPN's live projection for the week's final score, or for a future week the sum of starters' player projections -- see projected_source: "espn" | "sum_of_starters" | null), win_probability (0-1, may be null), and roster. Each roster row has the same fields as get_my_team (player_id, name, position, slot, pro_team, injury_status) plus points (scored so far this week) and projected (ESPN's projection for this player this week; null if unavailable). Only rows whose slot is not BENCH or IR count toward score. |
| get_projectionsA | ESPN projections for the user's roster for one NFL week, with a suggested optimal lineup. Use this for "set my lineup", "start X or Y?", or "who's on bye?". week defaults to current_week (the league's current NFL week, which ESPN keeps until the week's games finish); to plan ahead once games have kicked off, call again with week = current_week + 1. Projections are null until ESPN publishes them. players: every rostered player with slot (current lineup slot), opponent ("@KC" away, "vs KC" home, "BYE"), kickoff (UTC), and projected (ESPN's points projection for that week; null if ESPN has none). suggested_lineup fills this league's starting slots (including FLEX/superflex slots and their eligibility rules) to maximize projected points; players on IR or marked OUT/suspended are never started. changes lists who to start (with their suggested slot) and who to sit (with their current slot) to get there, plus the projected gain; a continuing starter that merely moves slots appears only in suggested_lineup. Present changes to the user rather than the whole table when they ask for lineup advice. |
| get_free_agentsA | List available players (free agents and waiver claims) in the user's league. Use this for "who should I pick up?", "best available RB", or "who's trending". Args: position -- one of QB, RB, WR, TE, K, D_ST (case-insensitive; D/ST also accepted); omit for all positions. limit -- 1 to 50, default 10. sort -- "owned" (most rostered across ESPN first, default) or "projected" (highest season projection first). Each player row: player_id (pass to get_player), name, position, pro_team, injury_status, status (FREEAGENT = add immediately; WAIVERS = must submit a claim), percent_owned (% of ESPN leagues rostering them), percent_change (ownership trend -- positive means being picked up), season_projected / season_points (full-season projected / scored so far), week_projected / week_points (current NFL week; 0.0 may mean not played yet OR played and scored nothing), and positional_rank (ESPN's season rank at their position; null if unavailable). Next-week projections are not available from this tool. |
| get_transactionsA | League transaction log: adds, drops, waiver claims (including pending), and trades. Use this for "who dropped X", "did my waiver claim go through", recent trades, or waiver activity. Newest first. A pending waiver claim has status PENDING; its processed field is when ESPN will run it (already executed claims/trades have processed set to when they ran). Lineup moves (bench/slot changes, not adds or drops) are hidden unless include_lineup_moves is true -- they rarely matter for these questions. Args: team -- id or name/abbreviation (case-insensitive, partial name ok) to filter to one team's transactions, including trades where that team is the other side; omit for the whole league. limit -- 1 to 100, default 25. Each row: id, type (WAIVER, FREEAGENT, TRADE, LINEUP, or DRAFT), status (e.g. PENDING, EXECUTED, DECLINED, VETOED), espn_type (ESPN's raw type, e.g. TRADE_ACCEPT), week, team (who initiated it), proposed/processed (UTC timestamps), bid (FAAB dollars, 0 if none), items (action ADD/DROP/ LINEUP/TRADE/DRAFT, player_id, name -- null if not in the player index -- position, pro_team, from_team/to_team, from_slot/to_slot), and a one-line summary. |
| get_playerA | Full profile for one player: status, league ownership, season numbers, outlook, game log. Use this for "tell me about X", "how has X been doing", "who has X in my league", or "is X worth a claim". Pass exactly one of: name (full name is best; a partial name works if it matches one active player) or player_id (from any other tool's rows -- prefer this when you have it). Returns: player_id, name, position, pro_team, injury_status, injured, eligible_slots; league_status (ONTEAM / FREEAGENT / WAIVERS) and owned_by (the league team rostering them, or null); ownership across all ESPN leagues (percent_owned, percent_started, percent_change = trend, adp); season {year, projected, points, positional_rank}; last_season {year, points}; outlook (ESPN's written preseason summary); game_log newest first, each week with points, projected (null until ESPN publishes it), and stats -- raw counts such as rush_yds, targets, pass_td, fg_made_40_49, dst_sacks (zero-valued stats omitted). Covers this season and last. No news articles or opponent-matchup ratings. Name lookup uses a snapshot of ESPN's active-player list taken when the server started; a player signed since then may not resolve by name but still works by player_id. In clients that support MCP Apps this renders as a card; the JSON profile is always returned as text. headshot_url points at ESPN's CDN (team logo for a D/ST) and is not verified to exist. |
| compare_playersA | Compare 2-6 players side by side for "X or Y?" decisions. players may mix names and player_ids (ids from other tools are precise;
names are matched against ESPN's active-player index). Ambiguous or
unknown names are returned in Each row: identity/status/owned_by; week {projected, opponent, kickoff}; season {projected, points, positional_rank, games, avg}; last_3 (points in the most recent games this season, newest first); last_season {points, games, avg} or null; percent_owned / percent_change (ESPN-wide ownership and trend). Rows keep the input order. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Prefab Renderer (setup) | |
| Prefab Renderer (get_player) |
TDQS
Scored across 13 tools
Each tool targets a distinct purpose: credential checks, settings, roster views, player profiles, standings, matchups, projections, transactions, and comparisons. Even similar tools like get_my_team and get_team differ by target team, and get_player vs compare_players are clearly separated by context.
Names follow a consistent verb_noun pattern with get_* for retrieval operations and descriptive verbs for others (save_settings, setup, compare_players). No mixed conventions or ambiguous verbs.
13 tools is well within the ideal range for a domain-specific server. Each tool covers a necessary aspect of fantasy football information retrieval without redundancy or bloat.
The surface covers all major fantasy football queries: team rosters, standings, matchups, player details, free agents, transactions, projections, and lineup advice. League settings and credential management are included, making the tool set self-sufficient for read-only use.