This project implements a Model Context Protocol (MCP) server providing Formula One racing data using the Python FastF1 library. Inspired by an existing TypeScript server, it offers similar F1 data functionalities natively in Python via FastF1.
A Model Context Protocol (MCP) server that provides Formula One racing data. This package exposes various tools for querying F1 data including event schedules, driver information, telemetry data, and race results.
To install f1-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Machine-To-Machine/f1-mcp-server --client claude
In a uv
managed python project, add to dependencies by:
uv add f1-mcp-server
Alternatively, for projects using pip
for dependencies:
pip install f1-mcp-server
To run the server inside your project:
uv run f1-mcp-server
Or to run it globally in isolated environment:
uvx f1-mcp-server
To install directly from the source:
git clone https://github.com/Machine-To-Machine/f1-mcp-server.git cd f1-mcp-server pip install -e .
The server can be run in two modes:
Standard I/O mode (default):
uvx run f1-mcp-server
SSE transport mode (for web applications):
uvx f1-mcp-server --transport sse --port 8000
from f1_mcp_server import main # Run the server with default settings main() # Or with SSE transport settings main(port=9000, transport="sse")
The server exposes the following tools via MCP:
Tool Name | Description |
---|---|
get_event_schedule | Get Formula One race calendar for a specific season |
get_event_info | Get detailed information about a specific Formula One Grand Prix |
get_session_results | Get results for a specific Formula One session |
get_driver_info | Get information about a specific Formula One driver |
analyze_driver_performance | Analyze a driver's performance in a Formula One session |
compare_drivers | Compare performance between multiple Formula One drivers |
get_telemetry | Get telemetry data for a specific Formula One lap |
get_championship_standings | Get Formula One championship standings |
See the FastF1 documentation for detailed information about the underlying data: FastF1 Documentation
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
This project is licensed under the MIT License - see the LICENSE file for details.
This project leverages FastF1
, an excellent Python package for accessing Formula 1 data. We are grateful to its maintainers and contributors.
This project was inspired by rakeshgangwar/f1-mcp-server which was written in TypeScript. The f1_data.py
module was mostly adapted from their source code.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!