Skip to main content
Glama
craigchang

sleeper_mcp

by craigchang

sleeper_mcp

Local Model Context Protocol server for the Sleeper fantasy API. Tools are locked to the user and league IDs in your gitignored .env. The public API is read-only; no token is required.

Setup

Requires Node.js 20+.

cp .env.example .env
npm install

npm install is enough; Cursor compiles TypeScript on launch. Do not start the server with npx tsx — that pulls in a platform-specific esbuild binary and breaks when Cursor’s Node architecture differs from the one used to install dependencies.

Fill in .env:

SLEEPER_USER_ID=your_numeric_user_id
SLEEPER_LEAGUE_IDS=league_id_one,league_id_two
SLEEPER_SEASON=2025
  • Look up SLEEPER_USER_ID with GET https://api.sleeper.app/v1/user/<username>.

  • SLEEPER_LEAGUE_IDS is a required allowlist. Tools will not accept any other league.

  • SLEEPER_USER_ID and each SLEEPER_LEAGUE_IDS value must be numeric Sleeper ids.

  • SLEEPER_SEASON is optional. If set, it must be a 4-digit year. If omitted, the server uses league_season from GET /v1/state/nfl.

Never commit .env. Cursor user MCP settings may set the same variables; existing environment values win over the file.

On start the server checks that the user exists and that every configured league belongs to that user for the season.

Related MCP server: sleeper-caffeine MCP

Cursor

.cursor/mcp.json launches the server with no IDs:

{
  "mcpServers": {
    "sleeper": {
      "command": "node",
      "args": ["scripts/launch.js"]
    }
  }
}

Cursor runs that with its own Node (20+). The launcher compiles src/ to dist/ then starts the server, so you do not need tsx or a matching esbuild binary.

Enable the server in Cursor MCP settings. Keep real IDs out of any committed file; use .env or Cursor user MCP env overrides.

Tools

Tool

What it returns

get_user

Configured user (username, user_id, display_name)

get_user_leagues

Allowlisted leagues only

get_rosters

Rosters with owner and player names

get_matchups

Week matchups paired by matchup_id (week defaults to NFL state)

get_nfl_state

Current week / season

If exactly one league is configured, league_id is optional on league-scoped tools.

Player IDs are resolved from a daily cache of GET /v1/players/nfl stored in gitignored .cache/players-nfl.json.

Scripts

npm start          # compile + stdio MCP (same entry Cursor uses)
npm run build      # compile only
npm test           # mocked unit tests

Log only to stderr. stdout is the MCP protocol channel.

Inspector

npx @modelcontextprotocol/inspector node scripts/launch.js
A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Provides read-only access to the Sleeper Fantasy Sports API for league info, rosters, matchups, drafts, transactions, and player data.
    18
    71
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides read-only access to Sleeper fantasy football leagues, enabling team snapshots, available players, matchups, trade context, and league history through standardized MCP tools.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for NFL fantasy football retrieval, providing access to NFL stats and Sleeper league data through retrieval-oriented tools.
  • A
    license
    Not graded
    quality
    C
    maintenance
    A read-only MCP server that supplies live context from Sleeper fantasy-football leagues, including rosters, trade analysis, draft picks, and league settings via Sleeper's public API.
    MIT

View all related MCP servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/craigchang/sleeper_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server