sleeper-caffeine MCP

sleeper-caffeine MCP

Provides read-only access to Sleeper fantasy football leagues, enabling team snapshots, available players, matchups, trade context, and league history through standardized MCP tools.

Category
访问服务器

README

Sleeper Caffeine

Sleeper Caffeine is an open-source, read-only fantasy football front office for the desktop. Connect a public Sleeper league, choose your roster, and use Codex to produce league-specific analysis grounded in live Sleeper data and current web research.

The first release is intentionally safe: it cannot change a lineup, submit a waiver claim, send a trade, or accept one.

What works today

  • Multi-league onboarding from a Sleeper league URL or ID.
  • Team selection with Sleeper names, avatars, roster IDs, and user IDs.
  • A polished dashboard, full roster room, reserve/taxi handling, headshots, and fallbacks.
  • Manual Sleeper refresh with an immutable local snapshot history.
  • A live draft board with completed picks and upcoming native draft slots.
  • On-demand AI cards for team analysis, trade ideas, and draft candidates.
  • A persistent conversational analyst scoped to the active league.
  • Live web research with an explicit distinction between search/discovery and cited sources.
  • Waiver and weekly start/sit surfaces marked for activation when regular-season data is meaningful.
  • A standalone Sleeper MCP server over stdio and an app-managed Streamable HTTP bridge.

Product principles

  1. League data first. Codex must read the Sleeper MCP before making league-specific claims.
  2. Refresh is deterministic. Refreshing Sleeper updates SQLite and invalidates stale reports; it never spends an AI turn.
  3. AI is explicit. Every report has its own Generate or Regenerate action.
  4. Search is not a source. Search discovers material. Reports cite the page actually used.
  5. Read-only means read-only. No Sleeper credentials, browser cookies, shell access, or hidden roster mutations.
  6. Local by default. League snapshots, reports, recommendation history, chat, and the isolated Codex home live on the user's machine.

Architecture

flowchart LR
    Renderer["Electron renderer"] -->|typed IPC| Main["Electron main process"]
    Main --> Store["SQLite snapshots + reports"]
    Main --> Core["sleeper-core"]
    Main --> Codex["Installed codex app-server"]
    Codex -->|Streamable HTTP| MCP["Sleeper MCP bridge"]
    MCP --> Core
    Core --> API["Sleeper public API"]
    Core --> Cache["24-hour player cache"]
    Codex --> Web["Live web search"]

The renderer is sandboxed and receives only a narrow preload API. It never receives OpenAI tokens, raw child-process access, SQLite access, or arbitrary filesystem primitives.

Codex runs as one long-lived codex app-server process with:

  • A dedicated CODEX_HOME inside the app's user-data directory.
  • Codex-managed ChatGPT OAuth.
  • A read-only sandbox and approvalPolicy: "never".
  • The shell tool disabled.
  • Live web search enabled.
  • The local Sleeper MCP configured automatically.

Sleeper Caffeine discovers Codex through CODEX_CLI_PATH, the user's PATH, or known Codex/ChatGPT application locations. It does not bundle a Codex binary.

Repository layout

apps/
  desktop/                 Electron + React desktop product
packages/
  sleeper-core/            Sleeper API, schemas, joins, cache, domain logic
  sleeper-mcp/             Standalone MCP plus stdio and HTTP transports
  ipc-contract/            Renderer/main schemas and typed API
  codex-runtime/           Binary discovery, JSONL RPC, OAuth, threads, turns

The desktop and MCP use the same sleeper-core; the UI never calls the MCP as an internal API.

Requirements

  • Node.js 22 or newer.
  • pnpm 10.
  • An installed Codex CLI or an application that ships the Codex binary.
  • A ChatGPT account for AI analysis. Sleeper browsing and roster views work without it.

Run locally

pnpm install
pnpm dev

Production build:

pnpm build

Package the current platform:

pnpm dist:mac
pnpm dist:linux
pnpm dist:win

The app is not yet signed or notarized. Local macOS builds may require the standard unsigned-app development workflow.

Standalone Sleeper MCP

The original adapter remains independently usable:

pnpm build:packages
pnpm --filter @sleeper-caffeine/mcp start

Example Codex CLI registration:

codex mcp add sleeper -- node /absolute/path/to/sleeper-caffeine/packages/sleeper-mcp/dist/src/index.js

Tools:

Tool Purpose
get_team_snapshot Settings, joined roster, matchup, and traded-pick context.
get_available_players Players absent from every current league roster.
get_matchup_context Both sides of a weekly matchup with joined players.
get_trade_context Every roster, traded picks, drafts, and selected transactions.
get_league_history Linked historical seasons and obtainable champions.

Sleeper's player directory is cached for 24 hours. “Available” means absent from current rosters; it does not prove waiver clearance or lineup eligibility.

Development checks

pnpm typecheck
pnpm lint
pnpm test
pnpm build

Read-only live checks are opt-in:

SLEEPER_LIVE_LEAGUE_ID=123456789012345678 \
SLEEPER_LIVE_USER=your_username \
pnpm test:live

The desktop also contains opt-in live coverage for onboarding and the Codex app-server handshake.

Data and privacy

  • Sleeper's documented fantasy API is public and read-only; no Sleeper password is requested.
  • ChatGPT login is managed and stored by Codex inside the app-specific CODEX_HOME.
  • OpenAI access and refresh tokens are never exposed to the renderer or stored in SQLite.
  • “Clear local league data” removes leagues, snapshots, reports, chats, thread references, and the player cache. It deliberately does not sign the user out of ChatGPT.
  • The Athletic may appear in public search results, but this release does not automate a signed-in browser or bypass a subscription wall.

See SECURITY.md for reporting and trust boundaries.

Roadmap

  • Regular-season waiver and start/sit intelligence.
  • Faster live-draft polling and pick-aware candidate refresh.
  • Recommendation outcomes and retrospective scoring.
  • Additional projections/rankings adapters with clear licensing boundaries.
  • Cross-platform release signing and auto-update infrastructure.
  • Any future Sleeper write automation only as a separately designed, opt-in capability with explicit confirmations.

Contributing

Issues and pull requests are welcome. Start with CONTRIBUTING.md, and keep every proposed Sleeper integration read-only unless a future design document explicitly changes that boundary.

Sources

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选