Formula One MCP Server

Formula One MCP Server

site icon
2025.05.09 0
JavaScriptF1 数据分析赛车数据服务娱乐功能
Formula One MCP Server 是一个基于 FastF1 Python 库的模型上下文协议(MCP)服务器,提供对一级方程式赛车数据和统计信息的访问。它允许用户通过简洁的 MCP 接口获取比赛日历、赛事信息、会话结果、车手数据、单圈时间、遥测数据以及锦标赛排名等信息。
View on GitHub

Overview

基本能力

产品定位

Formula One MCP Server 是一个专门用于访问和分析一级方程式赛车数据的服务,旨在为开发者和数据分析师提供一个便捷的接口来获取和处理 F1 赛事相关数据。

核心功能

  • 获取特定赛季的一级方程式比赛日历
  • 检索大奖赛赛事的详细信息
  • 获取会话结果(正赛、排位赛、练习赛)
  • 访问车手信息和统计数据
  • 通过单圈时间和遥测数据分析车手表现
  • 比较多位车手的表现
  • 获取车手和车队的锦标赛排名

适用场景

  • F1 赛事数据分析
  • 车手表现比较
  • 赛事结果查询
  • 遥测数据分析
  • 锦标赛排名跟踪

工具列表

  1. get_event_schedule:获取特定赛季的 F1 比赛日历
  2. get_event_info:获取特定大奖赛的详细信息
  3. get_session_results:获取特定会话的结果
  4. get_driver_info:获取特定车手的信息
  5. analyze_driver_performance:分析车手在特定会话中的表现
  6. compare_drivers:比较多位车手的表现
  7. get_telemetry:获取特定单圈的遥测数据
  8. get_championship_standings:获取锦标赛排名

常见问题解答

  • 数据来源:使用 FastF1 Python 库,提供官方 F1 计时数据、赛车遥测和会话结果
  • 许可证:MIT

使用教程

使用依赖

  • Node.js 18 或更高版本
  • Python 3.8 或更高版本
  • FastF1 库

安装教程

  1. 安装 Python 依赖
pip install fastf1 pandas numpy
  1. 安装 Node.js 依赖
cd f1-mcp-server
npm install
  1. 构建 TypeScript 代码
npm run build
  1. 添加到 MCP 设置 在 Cline MCP 设置文件中添加以下内容:
{
  "mcpServers": {
    "formula1": {
      "command": "node",
      "args": ["/Users/rakeshgangwar/Documents/Cline/MCP/f1-mcp-server/build/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

调试方式

安装完成后,可以通过以下示例查询进行调试: - "Show me the 2023 Formula One race calendar" - "Get the results from the 2022 Monaco Grand Prix" - "Compare Hamilton and Verstappen's performance in the 2021 British Grand Prix" - "Show me the telemetry data from Leclerc's fastest lap in the 2023 Italian Grand Prix qualifying" - "What are the current F1 championship standings?"

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。