Formula One MCP Server (Python)

MIT License
  • Linux
  • Apple

Integrations

  • Enables access to Formula One racing data from a GitHub repository, with the README mentioning the project was inspired by another GitHub repository.

  • Utilizes NumPy as a dependency for working with numerical data in Formula One racing statistics and telemetry analysis.

  • Leverages pandas for data manipulation and analysis of Formula One data, including race results, telemetry, and driver statistics.

一级方程式 MCP 服务器

提供一级方程式赛车数据的模型上下文协议 (MCP) 服务器。该软件包提供了各种用于查询 F1 数据的工具,包括赛事日程、车手信息、遥测数据和比赛结果。

特征

  • 赛事日程:查看任意赛季的完整 F1 赛事日程
  • 赛事信息:有关特定大奖赛赛事的详细数据
  • 比赛结果:比赛、排位赛、短跑和练习赛的综合结果
  • 驾驶员信息:访问特定会话的驾驶员详细信息
  • 性能分析:通过单圈时间统计数据分析驾驶员的表现
  • 车手对比:比较同一时段内多名车手的表现
  • 遥测数据:获取特定圈数的详细遥测数据
  • 锦标赛积分榜:查看任意赛季的车手和车队积分榜

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 f1-mcp-server:

npx -y @smithery/cli install @Machine-To-Machine/f1-mcp-server --client claude

手动安装

uv管理的 python 项目中,通过以下方式添加依赖项:

uv add f1-mcp-server

或者,对于使用pip作为依赖项的项目:

pip install f1-mcp-server

要在项目内运行服务器:

uv run f1-mcp-server

或者在隔离环境中全局运行它:

uvx f1-mcp-server

直接从源安装:

git clone https://github.com/Machine-To-Machine/f1-mcp-server.git cd f1-mcp-server pip install -e .

用法

命令行

该服务器可以以两种模式运行:

标准 I/O 模式(默认):

uvx run f1-mcp-server

SSE 传输模式(适用于 Web 应用程序):

uvx f1-mcp-server --transport sse --port 8000

Python API

from f1_mcp_server import main # Run the server with default settings main() # Or with SSE transport settings main(port=9000, transport="sse")

API 文档

服务器通过 MCP 公开以下工具:

工具名称描述
get_event_schedule获取特定赛季的一级方程式赛车赛程
get_event_info获取有关特定一级方程式大奖赛的详细信息
get_session_results获取特定一级方程式赛事的结果
get_driver_info获取有关特定一级方程式赛车手的信息
analyze_driver_performance分析一级方程式赛车比赛中车手的表现
compare_drivers比较多名一级方程式赛车手的表现
get_telemetry获取一级方程式赛车特定圈数的遥测数据
get_championship_standings获取一级方程式锦标赛积分榜

有关底层数据的详细信息,请参阅 FastF1 文档: FastF1 文档

依赖项

  • anyio(>=4.9.0)
  • 点击(>=8.1.8)
  • fastf1(>=3.5.3)
  • mcp(>=1.6.0)
  • numpy(>=2.2.4)
  • 熊猫(>=2.2.3)
  • uvicorn(>=0.34.0)

发展

设置开发环境

git clone https://github.com/Machine-To-Machine/f1-mcp-server.git cd f1-mcp-server uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e ".[dev]"

代码质量

# Run linting uv run ruff check . # Run formatting check uv run ruff format --check . # Run security checks uv run bandit -r src/

贡献指南

  1. 分叉存储库
  2. 创建功能分支: git checkout -b feature-name
  3. 提交您的更改: git commit -am 'Add some feature'
  4. 推送到分支: git push origin feature-name
  5. 提交拉取请求

执照

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

作者

  • 机器对机器

致谢

该项目利用了FastF1 ,这是一个用于访问一级方程式赛车数据的优秀 Python 包。我们感谢它的维护者和贡献者。

该项目f1_data.py灵感来源于用 TypeScript 编写的rakeshgangwar/f1-mcp-server。f1_data.py模块大部分改编自其源代码。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

该项目使用 Python FastF1 库实现了一个模型上下文协议 (MCP) 服务器,用于提供一级方程式赛车数据。受现有 TypeScript 服务器的启发,该项目通过 FastF1 以 Python 原生方式提供类似的 F1 数据功能。

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Usage
      1. Command Line
      2. Python API
    3. API Documentation
      1. Dependencies
        1. Development
          1. Setup Development Environment
          2. Code Quality
          3. Contribution Guidelines
        2. License
          1. Authors
            1. Acknowledgements

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.
                Last updated 2 months ago
                48
                4
                TypeScript
                • Apple
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol (MCP) server that provides mathematical calculations and operations using NumPy, enabling users to perform numerical computations like matrix operations, statistical analysis, and polynomial fitting directly through Claude.
                Last updated 2 months ago
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                Provides Formula One data and statistics through a Model Context Protocol interface, allowing users to access race calendars, session results, driver statistics, telemetry data, and championship standings.
                Last updated a month ago
                JavaScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A simple TypeScript library for creating Model Context Protocol (MCP) servers with features like type safety, parameter validation, and a minimal code API.
                Last updated a month ago
                1
                TypeScript
                MIT License

              View all related MCP servers

              ID: qu9jvw5zsv