Skip to main content
Glama
tweiss777

sleeper-mcp

by tweiss777
README.md
# Sleeper MCP

A read-only [Model Context Protocol](https://modelcontextprotocol.io/) server for
the public [Sleeper API](https://docs.sleeper.com/). 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](https://docs.astral.sh/uv/).

```bash
uv sync
```

## Run

The server uses MCP's stdio transport by default:

```bash
uv run sleeper-mcp
```

The equivalent module command is:

```bash
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.

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

### Cursor (Docker)

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

### Claude Desktop (Docker)

```json
{
  "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:

```json
{
  "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:

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

Restart the client after changing its configuration.

## Development

```bash
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.

TDQS

A4.4/5.0

Scored across 18 tools

Disambiguation5/5

Each tool targets a distinct resource or scope: user profiles, league members/rosters, matchups, winners vs losers brackets, league-level vs draft-level traded picks, and player lookup vs trending. The few names that share terms are clearly differentiated by their scope qualifiers and descriptions.

Naming Consistency5/5

All tools use a consistent get_ prefix and snake_case noun-based naming, and related resources share clear patterns like get_league_*, get_user_*, and get_draft_*. There are no mixed conventions or unpredictable verb choices.

Tool Count4/5

At 18 tools, this is above the typical 3–15 sweet spot, but the server is scoped to the broad Sleeper fantasy sports API and every tool maps to a meaningful endpoint. The count is on the higher end but still reasonable given the domain.

Completeness5/5

The surface covers the full read-only Sleeper workflow: user resolution, league discovery, rosters, users, matchups, playoff brackets, transactions, traded picks, sports state, drafts, draft picks, player lookup, and trending players. There are no obvious dead ends because the descriptions include explicit chaining between related tools.

Maintenance

ActivityMaintained
ResponsivenessNo issues