SleepBot
SleepBot
Claudeをファンタジーフットボールリーグに接続するMCPサーバー。フェーズ1: Sleeperの公開APIを使用した読み取り専用ツール(認証不要)。ツールインターフェースを変更せずに、書き込みアクション、ESPN、複数リーグに拡張できるように構築されています。
アーキテクチャ
コアはプラットフォームに依存しません。すべてのツールはLeagueAdapterインターフェースと通信し、プラットフォームSDKに直接アクセスすることはありません:
tools ──▶ LeagueAdapter (interface) ◀── SleeperAdapter ──▶ api.sleeper.app
│ (EspnAdapter later)
└──▶ config (leagues[] registry)リーグやプラットフォームの追加は設定変更であり、コード変更ではありません。アーキテクチャはcairn.blueprint内でCairnを使用してマッピングされています。cairn scanを実行して、マップをコードと照合します。
Related MCP server: sleeper-mcp
セットアップ
npm install
cp config/leagues.example.json config/leagues.json # then edit with your league
npm run buildSleeperリーグIDは、アプリのURLまたはhttps://api.sleeper.app/v1/user/<username>/leagues/nfl/<season>で見つけてください。
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を参照)。フェーズ1ではシークレットは不要です。
実行
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"] }
}
}ツール(フェーズ1 — すべて読み取り専用)
Tool | Purpose |
| 設定済みリーグ(設定から取得、API呼び出しなし) |
| 設定、スコアリング、シーズン、ロースターのポジション |
| すべてのロースター:先発、ベンチ、IR(プレイヤー名を解決済み)、成績 |
| 設定された |
| 週ごとの対戦とスコア(デフォルトは現在の週) |
| 勝利数、次に得点でランク付け |
| トレード、ウェイバー、追加/ドロップ(デフォルトは現在の週) |
| 名前でプレイヤーを検索、ポジション/チームでフィルタリング |
| Sleeperで最も追加された/最もドロップされたプレイヤー |
すべてのツールはleagueIdラベルを受け取るため、マルチリーグ対応は「別のIDを渡す」だけです。設定でsleeper.usernameを設定すると、ロースター/順位/対戦がisYouでフラグ付けされ、SleepBotは尋ねることなくどのチームがあなたのものかを認識します。
npm testでテストを実行します。
ロードマップ
フェーズ2 — Sleeperの書き込みアクション(デフォルトで確認)+ ルールエンジン(
src/rules、スタブ)フェーズ3 — 同じツールを使用したローカルGUI(Vite/React)
フェーズ4 — ESPNのクッキーベースAPIに対する
EspnAdapter、同じインターフェース
This server cannot be deployed
Maintenance
Related MCP Connectors
Free fantasy sports AI: ESPN, Sleeper and Fantrax league data for Claude and ChatGPT. Read-only.
Fantasy analysis for your ESPN, Yahoo, and Sleeper leagues. Reads your leagues, never changes them.
Fantasy football for any AI agent: draft board, start/sit, waivers, your Sleeper league. Free.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables 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.121-
- AlicenseNot gradedqualityBmaintenanceEnables Claude to interact with Sleeper fantasy football leagues via MCP tools for roster, waiver, matchup, and transaction queries, plus a dashboard for daily reports, live scoring, and game-day alerts.99 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables Claude to securely read Sleeper fantasy football league data over the internet via the public API, supporting access from both Claude Desktop and mobile devices.-
- FlicenseNot gradedqualityCmaintenanceEnables Claude to query Sleeper's public fantasy football API over Streamable HTTP, covering leagues, rosters, drafts, matchups, player stats, trends, and player search. Roster data keeps IR (reserve) and taxi players distinct and enriched with player names, positions, teams, and statuses.-