evandiewald/sleeper-mcp
If you are the rightful owner of sleeper-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Sleeper MCP Server is a Model Context Protocol server that provides access to the Sleeper fantasy football API, enabling AI assistants to retrieve comprehensive fantasy football data.
Sleeper MCP Server
A Model Context Protocol (MCP) server that provides access to the Sleeper fantasy football API. This server enables AI assistants to retrieve fantasy football data including leagues, rosters, player stats, projections, and more.
Remote Server URL
The publicly-hosted server can be accessed via clients like Claude Desktop using the following URL:
https://sleeper-mcp.evandiewald.workers.dev/sse
Features
Core League Data
- User & League Info: Get user details and league information
- Rosters & Matchups: View team rosters and weekly matchup results
- Standings: Regular season standings and playoff brackets
- Drafts: Access draft picks and draft history
Player Data
- Player Search: Fuzzy search for players by name
- Statistics: Historical player stats (season or weekly)
- Projections: Fantasy projections with formatted tables
- News: Recent player news articles
- Rankings: Season-long player rankings by PPR points
- Trending: Players being added/dropped across leagues
NFL State
- Current Season Info: Get current week, season type, and schedule data
- Weekly Projections: All player projections for specific weeks
Installation & Setup
Prerequisites
- Node.js 18+
- npm or yarn
Local Development
-
Clone the repository:
git clone <repository-url> cd sleeper-mcp -
Install dependencies:
npm install -
Start the development server:
npm run devThe server will be available at:
- MCP endpoint:
http://localhost:8787/mcp - SSE endpoint:
http://localhost:8787/sse
- MCP endpoint:
Remote Deployment (Cloudflare Workers)
-
Install Wrangler CLI:
npm install -g wrangler -
Login to Cloudflare:
wrangler login -
Deploy the server:
npm run deployAfter deployment, your server will be available at:
https://your-worker-name.your-subdomain.workers.dev/mcp
Connecting to Claude Desktop
Local Connection
Add this configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"sleeper": {
"command": "node",
"args": ["-e", "require('http').createServer((req,res)=>{if(req.url==='/mcp'){require('./dist/index.js').default.fetch(req).then(r=>r.text()).then(t=>res.end(t))}else{res.end('404')}}).listen(8787)"],
"cwd": "/path/to/sleeper-mcp"
}
}
}
Remote Connection
For a deployed Cloudflare Worker:
{
"mcpServers": {
"sleeper": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch", "https://your-worker-name.your-subdomain.workers.dev/mcp"]
}
}
}
Available Tools
User & League Management
get_user- Get user information by username or user IDget_user_leagues- Get all leagues for a user in a specific sport and seasonget_league- Get league information and settingsget_league_users- Get all users (managers) in a league
Roster & Matchup Data
get_league_rosters- Get all team rosters in a league with optional player enrichmentget_matchups- Get matchup results and scores for a specific week
Standings & Playoffs
get_regular_season_standings- Returns the latest regular season standings for a leagueget_playoff_results- Get the playoff results - use this to determine final standings for a leagueget_winners_bracket- Get the winners bracket for league playoffsget_losers_bracket- Get the losers bracket for league playoffs
Draft Information
get_user_drafts- Get all drafts for a user in a specific sport and seasonget_draft_picks- Get all picks from a specific draft
Player Data & Statistics
search_players- Search for players by name with fuzzy matchingfind_player_id- Find a player's ID by name with confidence scoringget_player_stats- Get player statistics for a season, optionally grouped by weekget_player_projections- Get player projections with formatted table displayget_player_news- Get recent news articles for a playerget_player_ranks- Get player rankings by PPR points for a season
League-wide Analytics
get_trending_players- Get players that are trending (being added/dropped) across leaguesget_weekly_projections- Get all player projections for a specific weekget_enriched_players- Get player data enriched with projections and rankings
NFL State
get_nfl_state- Get current NFL season state (week, season type, etc.)
Usage Examples
Basic League Information
Get information about league 12345
→ Uses get_league tool
Show me the rosters for league 12345
→ Uses get_league_rosters tool with player enrichment
Player Data
Search for Josh Allen
→ Uses search_players tool
Get Josh Allen's stats for 2024
→ Uses get_player_stats tool
Show me Saquon Barkley's projections
→ Uses get_player_projections tool (returns formatted table)
League Analysis
What are the standings for league 12345?
→ Uses get_regular_season_standings tool
Show me the playoff results for league 12345
→ Uses get_playoff_results tool
Development
Scripts
npm run dev- Start local development servernpm run deploy- Deploy to Cloudflare Workersnpm run format- Format code with Biomenpm run lint:fix- Fix linting issuesnpm run type-check- Run TypeScript type checking
Project Structure
src/
├── index.ts # Main MCP server implementation
└── ...
package.json # Dependencies and scripts
tsconfig.json # TypeScript configuration