asotiropusc/sleeper-mcp-server
3.2
If you are the rightful owner of sleeper-mcp-server 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 🏈 Model Context Protocol Server provides users with access to their historic performance across their Sleeper leagues, as well as current season details.
Tools
15
Resources
0
Prompts
0
Sleeper 🏈 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
processLeagueDataByYear
which 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_id
references. - 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"
]
}
}
}