- Home
- MCP servers
- Sleeper API
Sleeper API
- python
5
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"einreke-sleeper-scraper-mcp": {
"command": "python",
"args": [
"server.py"
]
}
}
}You can run a local MCP server that exposes the Sleeper Fantasy Football API so agents can fetch user, league, draft, roster, matchups, transactions, and player data in read-only fashion. This server lets you integrate Sleeper data into tools and copilots without managing authentication keys.
How to use
Start by installing and running the local MCP server to enable data access from Sleeper. Use your MCP client to invoke the available tools, such as getting user information, listing leagues, retrieving draft details, and fetching player data.
How to install
Prerequisites: you need Python and the requests library.
pip install requests
-
Place this MCP in a directory named
mcp_sleeper. -
Create a cursor configuration that points to the local MCP server. Add the following snippet to a file at
.cursor/mcp.json:
{
"mcpServers": {
"sleeper": {
"command": "python server.py"
}
}
}
- Start the MCP using your MCP client by running the sleeper MCP configuration.
cursor run-mcp sleeper
Additional notes
This MCP provides read-only access to Sleeper data. The server does not require an API key.
Rate limiting depends on Sleeper’s policies. Be mindful of the number of calls you issue in a short time window to avoid throttling.
Available tools
getUserInfo
Fetch user information by username or user_id to identify players or owners in Sleeper communities.
getUserLeagues
Retrieve all leagues for a user for a given sport and season to understand participation across formats.
getUserDrafts
List all drafts for a user for a specific sport and season to track drafting activity.
getLeagueInfo
Obtain details about a specific league, including settings and meta information.
getLeagueRosters
Fetch all rosters in a league to analyze team compositions.
getLeagueUsers
List all users participating in a league.
getLeagueMatchups
Retrieve matchups for a league in a specific week to study scheduling and results.
getLeagueWinnersBracket
Fetch the playoff winners bracket for a league.
getLeagueLosersBracket
Fetch the playoff losers bracket for a league.
getLeagueTransactions
Fetch transactions in a league for a specific week to track trades and moves.
getLeagueTradedPicks
Fetch all traded picks in a league to review draft exchanges.
getLeagueDrafts
Fetch all drafts for a league to review draft histories.
getDraftInfo
Fetch information about a specific draft to understand structure and results.
getDraftPicks
Fetch all picks in a draft to analyze selection order.
getDraftTradedPicks
Fetch traded picks in a draft to track cross-league moves.
getAllPlayers
Fetch information about all players for a specific sport to populate rosters and rankings.
getTrendingPlayers
Fetch trending players based on add/drop activity to identify rising values.
getNFLState
Fetch the current NFL state for up-to-date league contexts.