About · open source

How League Loom is built

League Loom is an open Model Context Protocol (MCP) server that connects Claude, ChatGPT, and other AI tools to your ESPN, Sleeper, and Fantrax fantasy leagues — read-only, private, and built on the platforms' own data APIs.

Architecture

How it works under the hood

A small, read-only server that turns three fantasy platforms into one set of AI tools.

Model Context Protocol server

Built on the open MCP standard — runs over stdio locally and as a stateless Streamable HTTP service when hosted, so it plugs into Claude, ChatGPT, and any MCP client.

OAuth 2.1, no shared keys

Connecting uses Dynamic Client Registration + PKCE. Each person authorizes their own accounts — there's no shared API key and nothing to copy.

Stateless, encrypted tokens

Your credentials are sealed into your own access token with AES-256-GCM — not stored in any database. The server holds no per-user state between requests.

Provider-adapter pattern

Each platform maps into one set of normalized shapes (standings, rosters, matchups, players), so a single set of read-only tools works across Fantrax, ESPN, and Sleeper.

Read-only by design

Every endpoint is a read. League Loom never sets a lineup, makes a move, or writes anything back to your leagues.

Data connections

Where the data comes from

League Loom talks directly to each platform's own read-only API — no scraping, no third-party data resellers.

Sleeper docs ↗

API: Sleeper's official public read API (api.sleeper.app) — fully documented.

Auth: No auth — public reads; your username identifies your team.

Sports: NFL, NBA

ESPN

API: ESPN's fantasy read endpoints (lm-api-reads.fantasy.espn.com + the fan API) — unofficial and undocumented.

Auth: Public leagues need nothing; private leagues use your own espn_s2 + SWID cookies.

Sports: NFL, NBA, MLB, NHL, WNBA

Fantrax

API: Fantrax's official “fxea” External API (fantrax.com/fxea) — a read-only Beta API with no public docs page.

Auth: A read-only Secret ID for league discovery; team matched by team id/name.

Sports: Many (NFL, NBA, MLB, NHL & more)

Built with

The open-source stack

Standing on great open tools and standards.

Open source

MIT licensed & opening up

League Loom is being open-sourced under the MIT license. Follow what ships in the changelog — a running, plain-English log of every capability as it's released.

Open-sourcing soon — MIT licensed