Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleeper MCP

A read-only Model Context Protocol server for the public Sleeper API. It exposes users, leagues, rosters, matchups, transactions, drafts, players, trending activity, playoff brackets, traded picks, and sport state through async FastMCP tools.

Sleeper requires no API key. Please respect its documented guidance to stay below 1,000 requests per minute. The full players response is several megabytes and should generally be fetched no more than once per day.

Install

Requires Python 3.11 or newer and uv.

uv sync

Run

The server uses MCP's stdio transport by default:

uv run sleeper-mcp

The equivalent module command is:

uv run python -m sleeper_mcp.server

Docker

The image is based on alpine:latest and runs the MCP server over stdio. Keep -i so the client can talk to the process on stdin.

docker build -t sleeper-mcp .
docker run --rm -i sleeper-mcp

Cursor (Docker)

{
  "mcpServers": {
    "sleeper": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "sleeper-mcp"
      ]
    }
  }
}

Claude Desktop (Docker)

{
  "mcpServers": {
    "sleeper": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "sleeper-mcp"
      ]
    }
  }
}

Configure an MCP client

Use the workspace's absolute path in your client configuration (or the Docker commands above).

Cursor

Add this server to your Cursor MCP configuration:

{
  "mcpServers": {
    "sleeper": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/talweiss/Desktop/codeProjects/sleeper-mcp",
        "run",
        "sleeper-mcp"
      ]
    }
  }
}

Claude Desktop

Add the same entry under mcpServers in Claude Desktop's configuration:

{
  "mcpServers": {
    "sleeper": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/talweiss/Desktop/codeProjects/sleeper-mcp",
        "run",
        "sleeper-mcp"
      ]
    }
  }
}

Restart the client after changing its configuration.

Development

uv run pytest

The package follows a layered design:

  • client.py owns HTTP concerns and the Sleeper base URL.
  • service.py maps methods to documented API endpoints.
  • tools.py documents and exposes service methods as MCP tools.
  • server.py wires the layers together and starts FastMCP.

About

An mcp server that consumes the Sleeper sports API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages