home / mcp / sleeper fantasy mcp server

Sleeper Fantasy MCP Server

Model Context Protocol server for Sleeper Fantasy Football integration with Claude Code. Get comprehensive fantasy analytics, player projections, historical performance, and advanced NFL metrics.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "justfeltlikerunning-sleeper-fantasy-mcp": {
      "command": "node",
      "args": [
        "/path/to/sleeper-fantasy-mcp/dist/index.js"
      ]
    }
  }
}

You connect Sleeper Fantasy data to Claude Code with this MCP server to get real-time fantasy analytics, projections, and league management right at your fingertips. It lets you pull player data, projections, historical performance, and waiver analysis, then optimize lineups and compare matchups—all within your Claude environment.

How to use

You interact with the Sleeper Fantasy MCP to fetch league analytics, projections, and matchup insights. Start by loading the MCP server in Claude Code, then use the available tools to retrieve your league information, your roster, and potential add/drop candidates. Request projected points for players, view historical scores, and run lineup optimization for upcoming weeks. Use trending players and waiver wire data to identify hot pickups. You can also compare your projections against opponents to refine decisions for each matchup.

How to install

npm install

Copy the example environment file and set your Sleeper details. This configures your Sleeper username, league IDs, and team names so the MCP can access your data.

cp .env.example ~/.env

Edit the environment file with your Sleeper credentials and league identifiers. You will provide your Sleeper username, the IDs for the leagues you want to monitor, and your team names.

SLEEPER_USERNAME=your_sleeper_username
ROAD_TO_GLORY_ID=your_league_id_1  
DYNASTY_LEAGUE_ID=your_league_id_2
ROAD_TO_GLORY_TEAM=Your Team Name 1
DYNASTY_TEAM=Your Team Name 2

If you need to locate your league ID, open the Sleeper app or website, navigate to your league, and copy the long number from the URL. This is the value you paste into ROAD_TO_GLORY_ID and DYNASTY_LEAGUE_ID.

cp .env.example ~/.env

Build the project to generate the MCP server binaries and assets.

npm run build

Add the MCP server to Claude Code by editing the Claude Code MCP configuration. The snippet below shows the standard local runtime setup using Node to run the built MCP from its dist index.

{
  "mcpServers": {
    "sleeper_fantasy": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/sleeper-fantasy-mcp/dist/index.js"],
      "env": {}
    }
  }
}

Restart Claude Code to load the new MCP server. This applies the configuration and starts listening for your commands.

Additional setup and configuration

Multiple leagues can be configured to monitor different Sleeper environments. You can set up two leagues: ROAD_TO_GLORY_ID with ROAD_TO_GLORY_TEAM and DYNASTY_LEAGUE_ID with DYNASTY_TEAM. The MCP will expose tools to fetch league info, your roster, and matchups for each configured league.

The MCP supports a full set of tools for analytics and research, including projections, historical scores, matchup projections, and lineup optimization, as well as trending players and waiver wire analysis.

Troubleshooting

If you encounter a “League not found” error, verify that the league ID(s) are correct, your Sleeper username matches your profile, and the team names are an exact (case-sensitive) match in the configured leagues.

If the MCP cannot connect, restart Claude Code after configuration changes and ensure the dist/index.js path is correct. Rebuild the project if necessary to confirm a successful build.

If no data is returned, confirm you are in an active fantasy season, that the leagues are accessible, and that week numbers you request are valid (1–18).

Notes

The server is designed to run locally within Claude Code using a stdio-based MCP configuration. Environment variables can be extended later to secure credentials or API keys as needed.

Available tools

get_league_info

Fetch league settings, standings, and overall league information.

get_my_roster

Retrieve your current roster with player details and positions.

get_my_matchup

Analyze your current week matchup and projected outcomes.

get_available_players

List players available on waivers or free agents.

get_player_projections

Provide projected fantasy points for players based on current data.

get_historical_scores

Show historical fantasy points and advanced stats for players.

get_matchup_projections

Compare projections across matchups to inform decisions.

optimize_lineup

Suggest the optimal lineup for a given week.

get_trending_players

Identify hot waiver wire pickups and rising players.

filter_players

Filter players by position, team, availability, and metrics.