Skip to main content
Glama
cfbd-mcp-server

cfbd-mcp-server

by lenwood

大学橄榄球数据 MCP 服务器

MCP 服务器实现提供对来自Claude Desktop内的大学橄榄球数据 API的大学橄榄球统计数据的访问。

Python 版本 CFBD API 版本 MIT 许可证 铁匠徽章

概述

该模型上下文协议 (MCP) 服务器使 AI 助手和应用程序能够:

  • 查询全面的大学橄榄球统计数据和数据

  • 访问比赛结果、球队记录和球员统计数据

  • 分析比赛实况数据并进行总结

  • 查看排名和获胜概率指标

  • 比较团队表现并产生见解

用户可以使用自然语言运行查询。

Related MCP server: Clash Royale MCP Server

示例输出

问:2014 赛季 FCS 比赛中最大的冷门是什么?

答:让我来帮您找出 2014 年 FCS 最大的冷门。我会查看比赛数据,重点关注 FCS 球队之间实力差距较大且结果出乎意料的比赛。

数据显示,2014 年 FCS 联赛中出现了几场引人注目的冷门,但最引人注目的一场是 2014 年 9 月 6 日东华盛顿队以 52-59 击败华盛顿队。这场比赛意义非凡,因为:

  1. 华盛顿是来自 Pac-12 联盟的 FBS 球队

  2. 本场比赛在华盛顿的主场(哈士奇体育场)举行

  3. 根据赛后统计,东华盛顿的获胜概率仅为 1.4%

  4. 东华盛顿队拿下的 59 分是 FCS 球队对阵 Pac-12 对手的最高得分

  5. 比赛开始前,华盛顿队多次被看好

该赛季其他值得注意的FCS冷门事件包括:

  • 北达科他州立大学以34比14击败爱荷华州立大学

  • 贝休恩-库克曼队以14比12击败FIU队

  • 北爱荷华大学险胜爱荷华大学(31-23败北)

然而,考虑到以下因素,华盛顿东部战胜华盛顿似乎是 2014 年 FCS 赛季最大的冷门:

  • 部门差异(FCS 与 FBS)

  • FBS 对手的实力(Power 5 联盟)

  • 劣势方的得分差距和进攻表现

  • 作为FCS战胜Power 5球队中得分最高的球队之一,其历史意义重大

  • 事实上,这件事发生在恶劣的道路上

先决条件

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装大学橄榄球数据服务器:

npx -y @smithery/cli install cfbd --client claude
  1. 克隆此存储库:

git clone https://github.com/yourusername/cfbd-mcp-server
cd cfbd-mcp-server
  1. 创建并激活虚拟环境:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖项:

uv pip install -e .
  1. 在项目根目录中创建一个.env文件并添加您的 API 密钥:

CFB_API_KEY=your_api_key_here

手动安装

  1. 克隆此存储库:

git clone https://github.com/yourusername/cfbd-mcp-server
cd cfbd-mcp-server
  1. 创建并激活虚拟环境:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖项:

uv pip install -e .
  1. 在项目根目录中创建一个.env文件并添加您的 API 密钥:

CFB_API_KEY=your_api_key_here

用法

运行服务器

启动服务器:

uv run cfbd-mcp-server

与 Claude Desktop 连接

  1. 打开您的 Claude Desktop 配置:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. 添加服务器配置:

{
    "mcpServers": {
        "cfbd-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/full/path/to/cfbd-mcp-server",
                "run",
                "cfbd-mcp-server"
            ],
            "env": {
                "CFB_API_KEY": "xxx",
                "PATH": "/full/path/to/python"
            }
        }
    }
}
  1. 关闭然后重新启动 Claude Desktop

重新启动后,您会在文本框的右下角看到一个小锤子图标。将鼠标悬停在该图标上,您将看到可用的 MCP 工具数量。

安装成功的截图

安装后更新

  1. 下载更新的文件

cd cfbd-mcp-server
git pull
  1. 卸载现有包:

uv pip uninstall cfbd-mcp-server
  1. 删除现有的构建工件和元数据

对于 Windows:

rmdir /s /q build dist
del /s /q *.egg-info

对于 macOS:

rm -rf build dist *.egg-info
  1. 安装修改后的包及其依赖项

uv pip install -e .
uv sync --dev --all-extras
uv run cfbd-mcp-server
  1. 关闭并重新启动 Claude Desktop

特征

资源

访问所有端点的架构文档:

  • schema://games - 游戏信息和分数

  • schema://records - 球队赛季记录

  • schema://games/teams - 详细的团队比赛数据

  • schema://plays - 逐场播放信息

  • schema://drives - 驱动器摘要和结果

  • schema://play/stats - 个人游戏统计数据

  • schema://rankings - 民意调查中的团队排名

  • schema://metrics/wp/pregame - 赛前获胜概率

  • schema://game/box/advanced - 高级得分统计

工具

直接查询端点:

  • get-games检索游戏数据

  • get-records - 获取团队记录

  • get-games-teams - 访问团队比赛统计数据

  • get-plays - 查询比赛实况数据

  • get-drives - 分析驱动器信息

  • get-play-stats - 查看播放统计数据

  • get-rankings - 查看球队排名

  • get-pregame-win-probability - 查看获胜概率

  • get-advanced-box-score - 访问详细的游戏统计数据和分析

提示

预建分析模板:

  • analyze-game - 获取特定游戏的详细分析

  • analyze-team - 全面的单一团队分析

  • analyze-trends - 分析一个季节的趋势

  • compare-teams - 比较两支球队的表现

  • analyze-rivalry - 分析历史竞争对手对决

API 限制

大学橄榄球数据 API 可以免费使用,但有速率限制:

  • 免费套餐:每分钟请求数有限

  • CFBD Patreon 订阅者可享受更高的速率限制

  • 使用高效的查询模式来避免达到限制

  • 妥善处理速率限制错误

发展

项目结构

cfbd-mcp-server/
├── README.md
├── pyproject.toml
└── src/
    └── cfbd_mcp_server/
        ├── .env
        ├── __init__.py
        ├── cfbd_schema.py
        ├── schema_helpers.py
        └── server.py

开发设置

  1. 克隆存储库

  2. 安装开发依赖项:

uv pip install -e ".[dev]"
  1. 运行测试:

pytest

贡献

  1. 分叉存储库

  2. 创建功能分支

  3. 提交你的更改

  4. 推送到你的 fork

  5. 提交拉取请求

故障排除

常见问题

  1. API 密钥错误

    • 验证.env和claude_desktop_config.json文件中的 API 密钥是否设置正确

    • 检查 collegefootballdata.com 上的密钥是否有效

  2. 速率限制

    • 尽可能分散请求

    • 考虑订阅 Patreon 以获得更高的限额

    • 对频繁访问的数据实施缓存

  3. 连接问题

    • 验证互联网连接

    • 在 collegefootballdata.com 检查 API 状态

    • 确保代码中正确处理错误

获取帮助

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

致谢

Available Tools

9 tools
get-advanced-box-scoreC

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get advanced box score data for college football games.
        Required: gameId
        Example valid queries:
        - gameId=401403910
        

Inputs: gameId (required).

get-drivesB

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football drive data.
        Required: year
        Optional: season_type, week, team, offense, defense, conference, offense_conference, defense_conference, classification
        Example valid queries:
        - year=2023
        - year=2023, team="Alabama"
        - year=2023, offense="Alabama", defense="Auburn"
        

Inputs: year (required), season_type, week, team, +6 more.

get-gamesC

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football game data.
        Required: year
        Optional: week, season_type, team, conference, category, game_id
        Example valid queries:
        - year=2023
        - year=2023, team="Alabama"
        - year=2023, week=1, conference="SEC"
        

Inputs: year (required), week, season_type, team, +3 more.

get-games-teamsB

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football team game data.
        Required: year plus at least one of: week, team or conference.
        Example valid queries:
        - year=2023, team="Alabama"
        - year=2023, week=1
        - year=2023, conference="SEC
        

Inputs: year (required), week, season_type, team, +3 more.

get-playsB

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football play-by-play data.
        Required: year AND week
        Optional: season_type, team, offense, defense, conference, offense_conference, defense_conference, play_type, classification
        Example valid queries:
        - year=2023, week=1
        - year=2023, week=1, team="Alabama"
        - year=2023, week=1, offense="Alabama", defense="Auburn"
        

Inputs: year (required), week (required), season_type, team, +7 more.

get-play-statsB

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football play statistic data.
        Optional: year, week, team, game_id, athlete_id, stat_type_id, season_type, conference
        At least one parameter is required
        Example valid queries:
        - year=2023
        - game_id=401403910
        - team="Alabama", year=2023
        

Inputs: year, week, team, game_id, +4 more.

get-pregame-win-probabilityC

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football pregame win probability data.
        Optional: year, week, team, season_type
        At least one parameter is required
        Example valid queries:
        - year=2023
        - team="Alabama"
        - year=2023, week=1
        

Inputs: year, week, team, season_type.

get-rankingsB

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football rankings data.
        Required: year
        Optional: week, season_type
        Example valid queries:
        - year=2023
        - year=2023, week=1
        - year=2023, season_type="regular"
        

Inputs: year (required), week, season_type.

get-recordsC

Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.

Get college football team record data.
        Optional: year, team, conference
        Example valid queries:
        - year=2023
        - team="Alabama"
        - conference="SEC"
        - year=2023, team="Alabama"
        

Inputs: year, team, conference.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each tool targets a distinct aspect of college football data (box scores, drives, games, plays, etc.), with clear boundaries. However, 'get-games' and 'get-games-teams' could cause some confusion as both relate to game data, though their descriptions clarify that 'get-games-teams' focuses on team-specific game data. Overall, the purposes are mostly distinct.

    Naming Consistency5/5

    All tool names follow a consistent 'get-[resource]' pattern using kebab-case, with clear and descriptive nouns (e.g., 'advanced-box-score', 'drives', 'games'). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.

    Tool Count5/5

    With 9 tools, the count is well-scoped for a college football data API server. Each tool covers a specific data type (e.g., rankings, plays, records), and there are no redundant or trivial tools, making the set comprehensive yet manageable for the domain.

    Completeness4/5

    The tool set provides broad coverage for retrieving college football data, including games, plays, rankings, and statistics. Minor gaps exist, such as no tools for updating or creating data (which may be intentional for a read-only API) or for more niche data like player profiles, but core querying needs are well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for accessing college basketball statistics through the SportsData.io CBB v3 Stats API, enabling AI agents to retrieve and analyze college basketball data through natural language interactions.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that integrates with the official Clash Royale API to provide real-time data on players, clans, cards, and tournaments. It enables users to query battle logs, chest cycles, and global rankings directly through Claude Desktop or Claude Code.
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server for natural language analysis of baseball league data, enabling team statistics, standings, lineup suggestions, and scouting reports via Claude Desktop.
      -
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that connects Claude Desktop to Hudl, enabling live access to team stats, player stats, and game results through natural language queries.
      7
      -