grand-prix-data-gateway
A specialized service providing exhaustive access to Formula One motorsport statistics, encompassing yearly schedules, competitor profiles, real-time telemetry streams, race outcome summaries, and comparative performance metrics for deep analytical consumption.
Author

Machine-To-Machine
Quick Info
Actions
Tags
Grand Prix Data Gateway (F1 MCP Service)
An implementation of the Model Context Protocol (MCP) dedicated to serving Formula One racing data. This package furnishes numerous utilities for interrogating F1 datasets, including event agendas, participant biographicals, intricate telemetry logs, and finalized competition results.
Key Capabilities
- Event Chronology: Retrieval of the complete F1 contest calendar across selectable seasons.
- Event Specifics: Acquisition of in-depth data pertaining to singular Grand Prix meetings.
- Session Outcomes: Comprehensive result sets derived from races, qualification periods, sprint contests, and practice runs.
- Competitor Profiling: Access to detailed driver attributes relevant to specific race segments.
- Performance Deep Dive: Statistical examination of a driver's efficiency, focusing on lap timing metrics.
- Driver Benchmarking: Ability to juxtapose operational metrics between several drivers within the identical session context.
- Telemetry Acquisition: Retrieval of high-granularity telemetry information tied to individual laps.
- Championship Tracking: Current and historical views of both driver and constructor standings for any given year.
Deployment
Installation via Smithery
For automated deployment into Claude Desktop environments using Smithery:
bash npx -y @smithery/cli install @Machine-To-Machine/f1-mcp-server --client claude
Conventional Python Setup
In a project managed by uv, incorporate this package into dependencies via:
bash uv add f1-mcp-server
Alternatively, for environments utilizing pip for dependency resolution:
bash
pip install f1-mcp-server
To initiate the server within your current project context:
bash uv run f1-mcp-server
Or to launch globally within an isolated execution space:
bash uvx f1-mcp-server
For direct installation from the source repository:
bash git clone https://github.com/Machine-To-Machine/f1-mcp-server.git cd f1-mcp-server pip install -e .
Operational Modes
Interface Execution
The server can be invoked in two primary configurations:
Standard Stream Mode (the default):
bash uvx run f1-mcp-server
Server-Sent Events (SSE) Transport Mode (optimized for web frontends):
bash uvx f1-mcp-server --transport sse --port 8000
Programmatic Interface (Python)
python from f1_mcp_server import main
Execute the server utilizing default parameters
main()
Or configure with specific SSE transport parameters
main(port=9000, transport="sse")
Exposed API Toolkit
The server furnishes the following capabilities through the MCP interface:
| Method Identifier | Functional Description |
|---|---|
get_event_schedule |
Retrieve the Formula One racing calendar pertinent to a specified year. |
get_event_info |
Obtain granular details concerning an individual Formula One Grand Prix. |
get_session_results |
Fetch finalized outcomes for any designated Formula One competition segment. |
get_driver_info |
Secure biographical and session-specific data for a particular Formula One participant. |
analyze_driver_performance |
Conduct in-depth evaluation of a driver's efficiency across a Formula One session. |
compare_drivers |
Execute a comparative analysis of performance metrics between multiple Formula One racers. |
get_telemetry |
Access high-fidelity telemetry streams recorded for a selected Formula One lap. |
get_championship_standings |
Query the current status of Formula One driver and constructor championship rankings. |
Consult the FastF1 Documentation for comprehensive details regarding the underlying data sourcing mechanisms:
Required Packages
- anyio (>=4.9.0)
- click (>=8.1.8)
- fastf1 (>=3.5.3)
- mcp (>=1.6.0)
- numpy (>=2.2.4)
- pandas (>=2.2.3)
- uvicorn (>=0.34.0)
Development Workflow
Environment Configuration
bash git clone https://github.com/Machine-To-Machine/f1-mcp-server.git cd f1-mcp-server uv venv source .venv/bin/activate # Windows equivalent: .venv\Scripts\activate uv pip install -e ".[dev]"
Quality Assurance Checks
bash
Execute static analysis checks (linting)
uv run ruff check .
Validate code formatting adherence
uv run ruff format --check .
Perform security vulnerability scanning
uv run bandit -r src/
Contribution Protocol
- Duplicate the repository (Fork).
- Establish a dedicated feature branch:
git checkout -b new-feature-name - Commit modifications:
git commit -am 'Implementing requested enhancement' - Push the branch to the upstream remote:
git push origin new-feature-name - Submit a formal Pull Request.
Licensing
This software is distributed under the terms specified in the MIT License (refer to the LICENSE file for full details).
Originators
- Machine To Machine
Special Recognition
We extend gratitude to the creators of FastF1, a superior Python library essential for Formula 1 data retrieval. Their dedication is greatly appreciated.
This implementation drew inspiration from the TypeScript project located at rakeshgangwar/f1-mcp-server, with significant adaptation occurring in the f1_data.py module based on their original source structure.
