Skip to main content
Glama
sdotj
by sdotj

SleepBot

一个将 Claude 连接到梦幻橄榄球联赛的 MCP 服务器。第一阶段:通过 Sleeper 的公共 API 提供只读工具(无需认证)。设计为可扩展至写入操作、ESPN 和多个联赛,而无需更改工具接口。

架构

核心是平台无关的。每个工具都通过 LeagueAdapter 接口通信,绝不直接与平台 SDK 交互:

tools ──▶ LeagueAdapter (interface) ◀── SleeperAdapter ──▶ api.sleeper.app
  │                                       (EspnAdapter later)
  └──▶ config (leagues[] registry)

添加一个联赛或平台是配置更改,而非代码更改。该架构已使用 Cairncairn.blueprint 中映射;运行 cairn scan 可将映射与代码进行核对。

Related MCP server: Yahoo Fantasy Baseball MCP

设置

npm install
cp config/leagues.example.json config/leagues.json   # then edit with your league
npm run build

在应用 URL 中或通过 https://api.sleeper.app/v1/user/<username>/leagues/nfl/<season> 找到你的 Sleeper 联赛 ID。

config/leagues.json

{
  "leagues": [
    {
      "id": "my-main-league",        // your own label, passed to every tool
      "platform": "sleeper",         // "sleeper" | "espn"
      "sleeper": { "leagueId": "123456789012345678", "username": "yourusername" }
    }
  ]
}

密钥从不内联存储——像 "env:ESPN_S2" 这样的值会在运行时从环境中解析(参见 .env.example)。第一阶段不需要任何密钥。

运行

npm start          # serves over stdio (built)
npm run dev        # serves over stdio (tsx, no build)

使用 Claude Code 注册

// .mcp.json / claude mcp add
{
  "mcpServers": {
    "sleepbot": { "command": "node", "args": ["dist/index.js"] }
  }
}

工具(第一阶段——全部只读)

工具

用途

list_leagues

已配置的联赛(来自配置,不调用 API)

get_league_info

设置、计分、赛季、阵容位置

get_rosters

每个阵容:首发、替补、IR(球员姓名已解析)、战绩

get_my_roster

你自己的阵容,通过配置的 username 识别

get_matchups

每周对阵 + 比分(默认当前周)

get_standings

按胜场排序,再按总得分排序

get_transactions

交易、弃权、增删(默认当前周)

search_players

按姓名搜索球员,可按位置/球队筛选

get_trending_players

Sleeper 上被添加/被弃用最多的球员

每个工具都接受你的 leagueId 标签,因此多联赛支持只需“传入不同的 ID”。在配置中设置 sleeper.username,阵容/排名/对阵会标记为 isYou,这样 SleepBot 无需询问即可知道哪支球队是你的。

使用 npm test 运行测试。

路线图

  • 第二阶段 — Sleeper 写入操作(默认确认)+ 规则引擎(src/rules,已存根)

  • 第三阶段 — 基于相同工具的本地 GUI(Vite/React)

  • 第四阶段 — 针对 ESPN 基于 Cookie 的 API 的 EspnAdapter,使用相同接口

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (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 Servers

  • F
    license
    B
    quality
    C
    maintenance
    Enables comprehensive Sleeper Fantasy Football integration with Claude, providing real-time player projections, historical performance analytics, league management, and waiver wire analysis. Supports advanced NFL metrics, lineup optimization, and matchup analysis for fantasy football decision-making.
    6
    12
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables Claude to interact with Yahoo Fantasy Baseball and Basketball leagues, allowing roster analysis, matchup tracking, free agent browsing, and player stats retrieval via natural language.
    1
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI models to manage and query fantasy sports leagues through the Sleeper API, supporting tasks like player lookups, league activity, and draft management.
    50
    MIT

View all related MCP servers

Related MCP Connectors

  • Read-only fantasy analysis for ESPN, Yahoo, and Sleeper leagues via MCP

  • WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.

  • Connect Claude to Fathom meeting recordings, transcripts, and summaries

View all MCP Connectors

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/sdotj/sleeper-bot'

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