Get the FREE Ultimate OpenClaw Setup Guide →

sleeper

MCP server from sourknives/sleeper-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sourknives-sleeper-mcp-server python -m sleeper_mcp_server \
  --env LOG_LEVEL="INFO" \
  --env MAX_RETRIES="3" \
  --env CACHE_TTL_SECONDS="3600" \
  --env SLEEPER_API_BASE_URL="https://api.sleeper.app/v1"

How to use

The Sleeper MCP Server exposes a natural language interface to Sleeper Fantasy Football data, enabling Claude Desktop to fetch league information, rosters, players, matchups, drafts, and perform trade analysis with conversational prompts. You can ask for current league rosters, view draft history with pick positions, search for players and retrieve statistics, or analyze potential trades against roster needs. The server also includes intelligent caching to reduce redundant API calls and rate-limiting safeguards to respect Sleeper's limits. Available tools cover League Tools (leagues, rosters, users, draft info), Player Tools (search, stats, trends), Matchup Tools (matchups and real-time scores), and Trade Tools (analyze trade targets, evaluate roster needs).

How to install

Prerequisites:

  • Python 3.8 or higher
  • Access to Claude Desktop application

Install from Source:

  1. Clone the repository:
git clone <repository-url>
cd sleeper-mcp-server
  1. Install the package in editable mode:
pip install -e .
  1. For development with testing and linting tools:
pip install -e ".[dev]"

Configuration (example):

  • Update Claude Desktop MCP configuration file with the sleeper server settings as shown in the README configuration examples.
  • Ensure the environment variables match your deployment (SLEEPER_API_BASE_URL, CACHE_TTL_SECONDS, LOG_LEVEL, MAX_RETRIES).

Start the server (example):

# If using the configured Python environment
python -m sleeper_mcp_server

Verify installation by querying a basic endpoint or using Claude Desktop to load the sleeper MCP server. If you encounter authentication or rate-limiting issues, adjust SLEEPER_API_BASE_URL, CACHE_TTL_SECONDS, and MAX_RETRIES as needed.

Additional notes

Environment variables:

  • SLEEPER_API_BASE_URL: Sleeper API base URL (default: https://api.sleeper.app/v1)
  • CACHE_TTL_SECONDS: Cache duration in seconds (default: 3600)
  • LOG_LEVEL: Logging verbosity (DEBUG, INFO, WARNING, ERROR)
  • MAX_RETRIES: Maximum retry attempts for API calls (default: 3)

Common issues:

  • API rate limits: The server implements exponential backoff and queuing; if you hit limits, increase CACHE_TTL or MAX_RETRIES and ensure proper backoff behavior.
  • Networking: Ensure outbound access to Sleeper API endpoints from your hosting environment.
  • Dependency conflicts: Use a dedicated Python virtual environment to avoid conflicts with system packages.

Additional tips:

  • Use autoApprove to pre-authorize frequently used endpoints for smoother Claude interactions.
  • Fine-tune CACHE_TTL_SECONDS based on how dynamic the data is in your use case.
  • Review and adjust LOG_LEVEL for production vs development environments.

Related MCP Servers

Sponsor this space

Reach thousands of developers