Sleeper 🏈 Model Context Protocol Server
LocalAbout Sleeper 🏈 Model Context Protocol Server
A Sleeper MCP server for fantasy football users to inspect league history and current-season details. Its tools cover league settings, matchups, playoff records, and lineup analysis.
Key features
- 01Current NFL week and player trends
- 02League names and configuration
- 03Weekly matchup and lineup details
- 04Historical playoffs and rivalry records
- 05Bench-versus-starter analysis
Use cases
- 01Reviewing current league and player trends
- 02Checking a matchup's starters and bench
- 03Comparing playoff results across seasons
MCP support
Exposes 15 tools to MCP clients for retrieving Sleeper league data, including current-season information and historical records.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMESleeper 🏈 Model Context Protocol Server
A Model Context Protocol (MCP) server that provides users with access to their historic performance across their Sleeper leagues. This server also provides access to current season details.
Key Files
index.ts
- Defines the 15 listed MCP tools below:
get-current-nfl-week- Current NFL week informationget-trending-players- Most added/dropped players league-wideget-user-roster-trending-players- Trending players on user's rosterget-league-names-for-user- All leagues for a usernameget-league-settings- General league configurationget-league-playoff-schedule- Playoff structure and timingget-league-scoring-settings- Detailed scoring rulesget-league-roster-settings- Starting lineup requirementsget-matchup-details- Head-to-head matchup summaries for a given weekget-matchup-starters- Retrieves the starters on both teams for a given matchupget-league-playoff-history- Historical playoff resultsget-matchup-bench- Retrieves the benched players on both teams for a given matchupget-bench-starter-analysis- Lineup optimization analysis for a given matchupget-season-head-to-head- Complete rivalry records across seasonsget-league-playoff-bracket- Retrieves the playoff bracket for a league
utils/processors.ts
- This file is responsible for implementation details for tools that require historical data lookup.
- We define a function called
processLeagueDataByYearwhich facilitates access to historical league information.- This is essential because the Sleeper API does not provide direct access to historical league data and so a league chain must be constructed manually by following
previous_league_idreferences. - This function allows the client to provide year ranges such as
"2022","2022-2024","2020, 2022, 2024". - Each tool that utilizes this function needs to provide a processor function, which formats the outputs for the specific year based on the type of endpoints being accessed.
- This is essential because the Sleeper API does not provide direct access to historical league data and so a league chain must be constructed manually by following
utils/api.ts
- Houses the api calls for communication with the Sleeper API.
Getting Started
Prerequisites:
- Node.js
- npm
- Claude Desktop App
Installation:
- Clone the Repository
git clone https://github.com/asotiropusc/sleeper-mcp-server.git cd sleeper-mcp-server - Install Dependencies
npm install
Configuration:
To use this MCP server you have to notify Claude Desktop of it through the Claude Config. To open the config:
On Mac:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows:
code $env:AppData\Claude\claude_desktop_config.json
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"sleeper-fantasy-football": {
"command": "/ABSOLUTE/PATH/TO/PARENT/FOLDER/sleeper-mcp-server/node_modules/.bin/tsx",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sleeper-mcp-server/src/index.ts"
]
}
}
}
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.