@michaelfromyeg/fantasy-sports-toolkit
v0.2.0
Published
Sport-agnostic fantasy agent tooling for every coding-agent harness, authored as a Weft marketplace. Provider-agnostic skills (set-lineup, waiver-wire, trade-analyzer) for football/basketball/baseball/hockey, plus a Sleeper data-provider plugin. Consume w
Maintainers
Readme
fantasy-sports-toolkit
A fantasy-sports toolkit you author once and compile to every coding agent.
This is a Weft marketplace (namespace
dev.fantasylab). You write provider-agnostic skills, commands, an agent, and MCP
server definitions once, and Weft compiles them into the native plugin format for
Claude Code, OpenAI Codex, Cursor, GitHub Copilot, and OpenCode.
The idea: the judgment (how to set a lineup, value a trade, read the waiver wire) lives in portable, sport-agnostic skills, while the data comes from a swappable MCP provider plugin. The same skills handle football, basketball, baseball, and hockey. They read whatever roster slots and scoring your league uses, so you can bring whichever sport and platform you play and the logic stays the same.
Layout
marketplace.yaml # the catalog (name + namespace + plugins)
plugins/
fantasy-manager/ # provider-agnostic skills + bundled context MCPs
sleeper/ # Sleeper data-provider plugin (MCP)
yahoo/ # Yahoo data-provider plugin (MCP)
out/ # compiled output for all 5 harnesses (generated; gitignored)
.claude/ # files placed by `weft install` (generated; gitignored)out/ and .claude/ are generated by weft build / weft install and aren't
committed. Run the CLI to regenerate them.
The plugins
plugins/fantasy-manager (skills, v0.3.0)
The provider-agnostic brains of the toolkit. It carries no roster data of its own.
It expects a data provider MCP (like sleeper) to be connected, and falls back to
asking you to paste your roster if none is. Every skill reads the league's own
roster slots and scoring, so it works across sports: football (QB/RB/WR/TE/FLEX/K/DEF,
weekly lineups, byes), basketball (PG/SG/SF/PF/C/G/F/UTIL, daily lineups, off-nights),
baseball (C/1B/2B/3B/SS/OF/UTIL/SP/RP), and hockey (C/LW/RW/D/G).
Skills (auto-triggered by description, each with an eval suite):
set-lineupbuilds the optimal starting lineup for the scoring period, respecting the league's slots, schedule, and OUT/inactive designations, and surfaces the close calls.waiver-wireranks free agents by rest-of-season value for your roster and assigns a FAAB bid (or waiver priority) and a drop candidate to each claim.trade-analyzerscores a proposed trade on raw value and roster fit (category vs. points scoring included), then gives an Accept / Decline / Counter verdict and drafts the counter.
Commands (explicit, fast-path versions):
/start-sitgives a decisive head-to-head start/sit call between two players./trade-checkgives a one-line gut-check verdict on a trade stated inline.
Agent:
waiver-scoutscans the whole free-agent pool for breakout candidates ahead of the waiver run and returns a ranked shortlist. It scouts and recommends; it never submits claims.
Evals (evals/*.cases.yaml) are per-skill case suites with trace assertions (e.g.
"the model called Read"), output regex matches, and LLM-judge rubrics, covering
both football and basketball lineup cases. Run them with weft eval against the
Claude harness.
The plugin also bundles a few provider-independent context MCPs that help no matter which sport or platform you're on:
sports-datagives live scores, schedules, and standings across sports (TheSportsDB via the Pipeworx gateway). Remote HTTP, no install, no API key.redditsearches the sport's fantasy subreddits (r/fantasyfootball, r/fantasybball, ...) for injury news and sentiment. npm package, anonymous.web-fetchfetches any page (injury reports, depth charts) as clean markdown. PyPI package, no API key.
plugins/sleeper (provider)
A single MCP data provider: read-only access to the Sleeper fantasy API for the
sports Sleeper supports (NFL and NBA), covering leagues, rosters, players, matchups,
trending pickups, plus lineup/start-sit/waiver analysis. No API key required.
Install it alongside fantasy-manager to give the skills live data.
plugins/yahoo (provider)
A second, interchangeable MCP data provider: Yahoo Fantasy Sports (NFL, NHL, NBA,
and MLB) via the mcp-yahoo-fantasy package, run with uvx. It exposes leagues,
standings, rosters, matchups, and free agents, plus write operations (set lineups,
add/drop, propose and respond to trades). Unlike Sleeper it needs a one-time Yahoo
OAuth login: create a Yahoo developer app for YAHOO_CONSUMER_KEY and
YAHOO_CONSUMER_SECRET, then run uvx --from mcp-yahoo-fantasy yahoo-login once.
The providers are the swap point. The fantasy-manager skills treat any of them as
a plain data source, so you connect whichever platform you play (Sleeper, Yahoo, or
a future ESPN provider) and the lineup, waiver, and trade logic works unchanged.
Design
Every skill, command, and the agent treats the connected fantasy MCP as a pure data
source (Sleeper, ESPN, Yahoo, etc.) and keeps the ranking, valuation, and slotting
logic both sport- and provider-independent. So you improve the trade-valuation rules
once and every harness, sport, and provider benefits; you can connect sleeper
today and swap in another provider later without touching the skills; and with no
provider connected the skills just ask you to paste the data and still produce an
answer.
Build and install
The compiler is Weft, published as
@michaelfromyeg/weft-cli
(the weft binary).
npm install -g @michaelfromyeg/weft-cli
# or run ad hoc:
npx @michaelfromyeg/weft-cli <command>Install this marketplace straight from a remote ref, no clone needed:
weft install github:michaelfromyeg/fantasy-sports-toolkit
weft install npm:@michaelfromyeg/fantasy-sports-toolkitOr work with a local clone, run from the repo root (where marketplace.yaml lives):
# validate a plugin before building
weft validate plugins/fantasy-manager
# compile the whole marketplace to every harness
weft build . --out out # writes out/{claude,codex,cursor,copilot,opencode}
weft build . --out out --target claude,codex # a subset
# place the compiled plugins into a harness scope
weft install . --scope project # writes into ./.claude (and detected harnesses)
weft install . --scope user
weft install . --only set-lineup
# run a skill's eval suite (claude harness)
weft eval plugins/fantasy-managerweft build's default output dir is .weft-out; this repo uses out/, so pass
--out out to match.
Third-party MCP packages
The MCP servers referenced here are third-party and not maintained by this project.
We only ship server.json pointers to them; their code, licensing, availability,
and behavior are owned by their respective authors: sleeper-mcp (npm),
reddit-mcp-buddy (npm), mcp-server-fetch (PyPI), and the Pipeworx sports gateway
remote (https://gateway.pipeworx.io/sports/mcp). Review each before installing. The
Sleeper, Reddit, and league/team trademarks belong to their respective owners; this
project is unaffiliated.
License
MIT, see LICENSE. Both plugins also declare license: MIT.
Authored once, compiled everywhere by Weft. Maintained by @michaelfromyeg.
