Formula One MCP Server (Python)
一级方程式 MCP 服务器
提供一级方程式赛车数据的模型上下文协议 (MCP) 服务器。该软件包提供了各种用于查询 F1 数据的工具,包括赛事日程、车手信息、遥测数据和比赛结果。
特征
赛事日程:查看任意赛季的完整 F1 赛事日程
赛事信息:有关特定大奖赛赛事的详细数据
比赛结果:比赛、排位赛、短跑和练习赛的综合结果
驾驶员信息:访问特定会话的驾驶员详细信息
性能分析:通过单圈时间统计数据分析驾驶员的表现
车手对比:比较同一时段内多名车手的表现
遥测数据:获取特定圈数的详细遥测数据
锦标赛积分榜:查看任意赛季的车手和车队积分榜
Related MCP server: Formula One MCP Server
安装
通过 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-serverSSE 传输模式(适用于 Web 应用程序):
uvx f1-mcp-server --transport sse --port 8000Python 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 公开以下工具:
工具名称 | 描述 |
| 获取特定赛季的一级方程式赛车赛程 |
| 获取有关特定一级方程式大奖赛的详细信息 |
| 获取特定一级方程式赛事的结果 |
| 获取有关特定一级方程式赛车手的信息 |
| 分析一级方程式赛车比赛中车手的表现 |
| 比较多名一级方程式赛车手的表现 |
| 获取一级方程式赛车特定圈数的遥测数据 |
| 获取一级方程式锦标赛积分榜 |
有关底层数据的详细信息,请参阅 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/贡献指南
分叉存储库
创建功能分支:
git checkout -b feature-name提交您的更改:
git commit -am 'Add some feature'推送到分支:
git push origin feature-name提交拉取请求
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
作者
机器对机器
致谢
该项目利用了FastF1 ,这是一个用于访问一级方程式赛车数据的优秀 Python 包。我们感谢它的维护者和贡献者。
该项目f1_data.py灵感来源于用 TypeScript 编写的rakeshgangwar/f1-mcp-server。f1_data.py模块大部分改编自其源代码。
Available Tools
8 toolsanalyze_driver_performanceC
Analyze a driver's performance in a Formula One session
Inputs: year (required), event_identifier (required), session_name (required), driver_identifier (required).
compare_driversB
Compare performance between multiple Formula One drivers
Inputs: year (required), event_identifier (required), session_name (required), drivers (required).
get_championship_standingsC
Get Formula One championship standings
Inputs: year (required), round_num.
get_driver_infoC
Get information about a specific Formula One driver
Inputs: year (required), event_identifier (required), session_name (required), driver_identifier (required).
get_event_infoB
Get detailed information about a specific Formula One Grand Prix
Inputs: year (required), identifier (required).
get_event_scheduleA
Get Formula One race calendar for a specific season
Inputs: year (required).
get_session_resultsC
Get results for a specific Formula One session
Inputs: year (required), event_identifier (required), session_name (required).
get_telemetryC
Get telemetry data for a specific Formula One lap
Inputs: year (required), event_identifier (required), session_name (required), driver_identifier (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
All 8 tools target distinct aspects of Formula One data—drivers, events, sessions, championships, and telemetry—with no overlapping functionality. Each has a clear, non-redundant purpose.
Every tool uses a consistent verb_noun pattern with lowercase and underscores (e.g., get_driver_info, analyze_driver_performance). The naming is predictable and adheres to a single convention.
With 8 tools, the server is well-scoped for its domain. It covers essential F1 operations without being too sparse or overly granular, making it ideal for most common queries without excessive complexity.
The tool set covers major areas: driver info, performance analysis, comparisons, standings, event details, schedule, session results, and telemetry. One minor gap is lack of team/constructor info, but the surface is otherwise comprehensive for a dedicated F1 server.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A simple MCP server built with FastMCP and python
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time and historical Formula 1 racing data through the Model Context Protocol, offering access to timing data, driver stats, race results, telemetry, and more.14MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides comprehensive Formula One racing data, enabling access to event schedules, driver information, telemetry data, race results, and performance analytics through natural language queries.81MIT
- AlicenseAqualityCmaintenanceMCP server for Formula 1 data via the FastF1 library. Ask Claude (or any MCP-compatible client) about race results, lap times, telemetry, standings, pit stops, and qualifying — with historical data back to 1950 via the Ergast API.21MIT
- AlicenseAqualityDmaintenanceA local MCP server that gives Claude (or any MCP-compatible AI client) access to Formula 1 race data. Load any session from 2018 onwards, ask questions in natural language, and get answers backed by real telemetry, timing, and strategy data.171MIT