Sleeper Fantasy MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sleeper Fantasy MCPgive me a Week 4 recap for league 1122334455"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sleeper Fantasy MCP
A lightweight, read-only Model Context Protocol (MCP) server for Sleeper fantasy football data, designed for AI clients such as ChatGPT and deployable on Cloudflare Workers.
Use it to build weekly league recaps, inspect injuries, analyze waiver trends, explore historical rivalries, review playoff brackets, track traded picks, and more — without running a database or storing Sleeper credentials.
Features
Read-only by design — no roster, lineup, waiver, or league mutations.
No Sleeper API key required — uses Sleeper's public read-only API.
Cloudflare Workers — small, stateless deployment with no database required.
League-aware player context — joins Sleeper player data against league rosters.
Historical league traversal — can follow Sleeper's
previous_league_idchain automatically.MCP-native tools — structured data intended for use by AI clients rather than scraping webpages.
Optional bearer-token protection — enable
MCP_API_KEYif your MCP client supports custom authorization headers.
Related MCP server: StatHead
Available MCP tools
Tool | Purpose |
| League settings, owners, rosters, standings, and current NFL state |
| Matchups, scores, starters, bench players, transactions, standings, player metadata, and explicit completed/current/future status |
| Roster-aware injury and availability data with starter, reserve, practice, and depth-chart context |
| Sleeper-wide adds/drops with optional league ownership and free-agent availability |
| Traverse linked prior seasons using |
| Historical head-to-head records across one or more league seasons |
| Current standings plus winners/losers brackets with explicit scheduled/active/complete playoff status |
| Current and future traded draft picks with ownership mapping |
| League drafts and completed draft picks |
| NFL leagues for a Sleeper user and season |
Quick start
Requirements
Node.js 18 or newer
npm
A Cloudflare account
An MCP client that supports a remote HTTP MCP server
Clone the repository:
git clone https://github.com/jbaros/sleeper-ffb-worker.git
cd sleeper-ffb-workerInstall dependencies and run the tests:
npm install
npm testAuthenticate Wrangler with Cloudflare:
npx wrangler loginDeploy:
npm run deployWrangler will return a Worker URL similar to:
https://sleeper-fantasy-mcp.<your-subdomain>.workers.devThe MCP endpoint is:
https://sleeper-fantasy-mcp.<your-subdomain>.workers.dev/mcpThe health endpoint is:
https://sleeper-fantasy-mcp.<your-subdomain>.workers.dev/healthFor v1.3.0, the health response should include:
{
"ok": true,
"service": "sleeper-fantasy",
"version": "1.3.0",
"mcp_endpoint": "/mcp"
}Connect an MCP client
Configure your MCP client with the deployed Worker URL ending in /mcp.
For clients such as ChatGPT that support custom remote MCP connections, add the Worker as a new MCP/plugin connection and review the discovered tools before enabling it.
If you deploy a new version and your client still shows an older tool list, refresh or reconnect the MCP connection so the client rediscovers the server schema.
Example prompts
Replace <LEAGUE_ID> with your Sleeper league ID.
Weekly recap
Give me a Week 4 recap for league <LEAGUE_ID>. Include the closest matchup,
biggest blowout, bench mistakes, transactions, major injuries, and some
friendly trash talk.Injury report
Give me an injury report for league <LEAGUE_ID>. Prioritize starters,
questionable/doubtful/out players, reserve-list players, and important
depth-chart context.Waiver / trending players
Show the most-added and most-dropped players over the last 24 hours and tell
me which of them are still free agents in league <LEAGUE_ID>.League history and rivalries
Build an all-time rivalry report for league <LEAGUE_ID> using its linked
previous seasons. Include head-to-head records and total points scored.Playoff picture
Give me the current playoff picture for league <LEAGUE_ID> and explain the
current seeds and bracket matchups.Matchup status
get_weekly_debrief includes explicit timing/state fields so an MCP client does not have to infer whether a 0-0 matchup is finished, in progress, upcoming, or in a future week.
Top-level fields include:
league_current_weeklast_scored_weekweek_status
Each matchup includes:
matchup_status—completed,in_progress,upcoming,future, orpendingis_completedis_currentis_futureis_in_progress
Margins are left null for upcoming and future matchups instead of reporting a misleading 0-point margin.
Player and injury data
The Worker fetches Sleeper's NFL player catalog and preserves useful metadata when available, including:
player name, team, and position
fantasy positions
active/status state
depth-chart position and order
age and years of experience
injury status
injury body part
injury start date
injury notes
practice participation/description
Sleeper's
news_updatedtimestamp
get_league_injuries joins this data against the league roster and reports whether a player is currently a starter or reserve.
Sleeper does not populate every field for every player, and practice/injury metadata may be sparse or change during the week. Consumers should treat missing fields as unavailable rather than as confirmation that a player is healthy.
Trending players
get_trending_players supports:
adddropboth
It also accepts a configurable lookback window and result limit.
Supplying a league_id enriches each trending result with league-specific information such as:
whether the player is already rostered
whether the player is available
fantasy team / owner
starter status
reserve status
Example tool arguments:
{
"league_id": "<LEAGUE_ID>",
"type": "both",
"lookback_hours": 24,
"limit": 25
}League history
Sleeper links renewed leagues using previous_league_id.
get_league_history can follow that chain automatically, and get_rivalry_history can use the same approach to build multi-season head-to-head records. Future scheduled matchups are excluded from rivalry records; for an in-season league, only weeks through Sleeper's last_scored_leg are counted.
Example:
{
"league_id": "<LEAGUE_ID>",
"max_seasons": 10
}You can also pass explicit league IDs to get_rivalry_history when you want complete control over which seasons are included.
Playoff brackets
get_playoff_picture combines:
current standings
Sleeper winners bracket
Sleeper losers bracket
roster IDs resolved to owner/team names
The response also includes playoff_state with:
current_weekplayoff_week_startplayoffs_startedbracket_data_availablebracket_status—scheduled,active,complete, ornot_available
Sleeper can expose bracket structures before the playoffs begin. When that happens, this project labels the bracket scheduled so clients do not mistake those entries for completed playoff results.
Traded draft picks
get_traded_picks returns Sleeper's league-level traded-pick records and resolves:
original owner
previous owner
current owner
season
round
This is useful for dynasty, keeper, and draft-pick-trading leagues.
Authentication
By default, the Worker does not require authentication. The underlying Sleeper endpoints used by this project are public and read-only.
If you want to protect your MCP endpoint, create a Wrangler secret:
npx wrangler secret put MCP_API_KEYWhen MCP_API_KEY is configured, requests to /mcp must include:
Authorization: Bearer <your-secret>Only enable this if your MCP client supports sending the required authorization header.
Do not commit secrets, API keys, .dev.vars, or other credentials to the repository.
Updating an existing deployment
From an existing checkout:
git pull
npm install
npm test
npm run deployIf the MCP tool list changed, refresh or reconnect your MCP client after deploying.
Development
Run the test suite:
npm testStart a local Wrangler development server:
npm run devDeploy to Cloudflare Workers:
npm run deployProject layout
.
├── .github/
│ └── workflows/
│ └── test.yml
├── src/
│ └── index.js
├── test/
│ └── worker.test.mjs
├── package.json
├── wrangler.jsonc
└── README.mdRelease notes
v1.3.0
Added explicit weekly matchup state to
get_weekly_debrief.Current-week 0-0 matchups are labeled
upcominginstead of looking like ties.Future weeks are labeled
future, and their matchup margins arenull.Added
playoff_stateto distinguish scheduled, active, complete, and unavailable brackets.Added regression tests for matchup and playoff state classification.
v1.2.1
Fixed rivalry history so future scheduled matchups are not counted as 0-0 ties.
In-season rivalry calculations now stop at Sleeper's
last_scored_leg.Added regression tests covering in-season, completed-season, and preseason behavior.
API behavior and limitations
The project is intentionally read-only.
Sleeper's player catalog is large, so the Worker caches it per Worker isolate for up to 24 hours.
Sleeper asks integrations to remain below 1,000 API calls per minute.
Practice, injury, depth-chart, and news-related fields may be missing or delayed.
Playoff bracket endpoints may not contain useful data until Sleeper creates the bracket.
Historical traversal depends on leagues being linked through Sleeper's
previous_league_id.This project does not scrape sports-news websites or attempt to replace official team/NFL reporting.
Security and privacy
This Worker does not require Sleeper usernames, passwords, session cookies, or private Sleeper credentials.
League and player information returned by the Worker comes from Sleeper's public API. If you deploy the Worker without MCP_API_KEY, anyone who knows the Worker URL can call its read-only MCP tools.
If that is not appropriate for your deployment, enable MCP_API_KEY or place the Worker behind another access-control layer.
License
See LICENSE.
Disclaimer
This is an unofficial community project and is not affiliated with, endorsed by, or sponsored by Sleeper.
Sleeper and related names and marks belong to their respective owners.
This server cannot be deployed
Maintenance
Related MCP Connectors
Free fantasy sports AI: ESPN, Sleeper and Fantrax league data for Claude and ChatGPT. Read-only.
Fantasy analysis for your ESPN, Yahoo, and Sleeper leagues. Reads your leagues, never changes them.
Live sports stats and pre-computed analysis for AI assistants across NBA, MLB, NFL, and NHL.
- NFL MCPOAuthcom.nflmcp
NFL analytics tools for AI agents: stats, fantasy, injuries, schedules, and advanced analysis.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables natural language interaction with Sleeper Fantasy Football API data, allowing queries about leagues, players, matchups, draft results, and trade analysis.1325-
- AlicenseNot gradedqualityBmaintenanceAn open NFL fantasy-football analytics platform that provides live data, machine-learned projections, dynasty values, and prospect grades via an MCP server for AI clients.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides read-only, league-aware Sleeper fantasy football draft context to AI assistants, including live picks, rosters, and player availability over Streamable HTTP MCP.117 npmMIT
- FlicenseNot gradedqualityCmaintenanceRead-only MCP server that provides access to public Sleeper NFL fantasy data, including leagues, rosters, matchups, waivers, drafts, and player information. It enables AI clients to retrieve fantasy football details without requiring authentication or account modifications.-