Sleeper API MCP

by einreke

卧铺 API MCP

该模型上下文协议 (MCP) 服务器提供对 Sleeper Fantasy Football API 的访问。它使代理能够从 Sleeper 平台获取有关用户、联赛、选秀、球员名单、对阵和球员信息的数据。

特征

  • 访问用户信息和联赛
  • 检索联赛详细信息、名单和用户
  • 获取比赛信息和季后赛对阵表
  • 查看交易和交易选秀权
  • 访问选秀信息和选秀权
  • 获取玩家数据和趋势玩家信息
  • 无需 API 密钥(Sleeper API 是只读的)

设置

要求

pip install requests

用法

  1. 将此 MCP 放置在名为mcp_sleeper的目录中
  2. 使用以下.cursor/mcp.json代码片段配置 Cursor:
{ "mcpServers": { "sleeper": { "command": "python server.py" } } }
  1. 使用以下命令启动 MCP:
cursor run-mcp sleeper

API 方法

MCP 提供以下工具:

用户数据

  • getUserInfo :通过用户名或 user_id 获取用户信息
  • getUserLeagues :获取用户在指定运动和赛季的所有联赛
  • getUserDrafts :获取用户针对特定运动和赛季的所有选秀

联赛数据

  • getLeagueInfo :获取有关特定联赛的信息
  • getLeagueRosters :获取联盟中的所有球员名单
  • getLeagueUsers :获取联盟中的所有用户
  • getLeagueMatchups :获取特定周的联赛对阵情况
  • getLeagueWinnersBracket :获取联赛季后赛冠军阵容
  • getLeagueLosersBracket :获取联赛季后赛失败者名单
  • getLeagueTransactions :获取特定周的联赛交易
  • getLeagueTradedPicks :获取联盟中所有交易选秀权
  • getLeagueDrafts :获取联盟的所有选秀

草稿数据

  • getDraftInfo :获取有关特定草稿的信息
  • getDraftPicks :获取选秀中的所有选秀
  • getDraftTradedPicks :获取选秀中的所有交易选秀权

玩家数据

  • getAllPlayers :获取某项特定运动的所有运动员的信息
  • getTrendingPlayers :根据添加/删除活动获取热门玩家

状态数据

  • getNFLState :获取当前 NFL 状态

示例用法

代理可以使用以下 MCP 从 Sleeper 检索数据:

# Get user information user_info = getUserInfo({"username_or_user_id": "sleeper_username"}) # Get user's leagues for the 2023 NFL season leagues = getUserLeagues({"user_id": user_info["user_id"], "sport": "nfl", "season": "2023"}) # Get information about a specific league league_info = getLeagueInfo({"league_id": leagues[0]["league_id"]}) # Get rosters for a league rosters = getLeagueRosters({"league_id": league_info["league_id"]}) # Get matchups for a specific week matchups = getLeagueMatchups({"league_id": league_info["league_id"], "week": 1}) # Get trending players trending_players = getTrendingPlayers({"sport": "nfl", "type": "add", "lookback_hours": 24, "limit": 10})

速率限制

请注意 API 调用的频率。根据 Sleeper 的文档,每分钟 API 调用次数应保持在 1000 次以下,以免被 IP 封禁。

进一步阅读

-
security - not tested
F
license - not found
-
quality - not tested

该模型上下文协议服务器提供对 Sleeper Fantasy Football API 的访问,使代理无需 API 密钥即可获取有关用户、联赛、选秀、名册、对决和球员信息的数据。

  1. 特征
    1. 设置
      1. 要求
      2. 用法
    2. API 方法
      1. 用户数据
      2. 联赛数据
      3. 草稿数据
      4. 玩家数据
      5. 状态数据
    3. 示例用法
      1. 速率限制
        1. 进一步阅读

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that allows Claude to make API requests on your behalf, providing tools for testing various APIs including HTTP requests and OpenAI integrations without sharing your API keys in the chat.
            Last updated -
            Python
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that provides access to Fantasy Premier League data, allowing users to compare players, find team information, view gameweek data, and get FPL-related advice through Claude for Desktop and other MCP-compatible clients.
            Last updated -
            7
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
            Last updated -
            46
            2
            Python
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            Provides structured access to NHL data including teams, players, standings, schedules, and statistics through the Model-Context Protocol pattern.
            Last updated -
            TypeScript

          View all related MCP servers

          ID: kobyamwiqz