F1 Results, Drivers, Lap Times, Telemetry MCP Server
Explore F1 results, driver profiles, lap times, telemetry and circuit data via the MCP server for instant access and race analysis.
Overview
This MCP (Model Context Protocol) server provides instant programmatic access to Formula 1 race data: results, driver profiles, lap times, telemetry, and circuit metadata. It exposes the underlying datasets via REST endpoints and MCP-compatible tool descriptors so LLMs and downstream services can request context snippets or run structured queries against the F1 dataset. The server is designed to make historical and live race information available to AI agents, dashboards, analytics pipelines, and developer tools.
You can use the server to fetch single resources (a driver profile or circuit), run aggregated queries (compare lap times across sessions), or integrate real-time telemetry into an LLM workflow using MCP tool descriptors. The API returns JSON and supports filtered queries, payloads for telemetry playback, and CSV/JSON exports for analytics.
Features
- REST API endpoints for drivers, races, lap times, telemetry, and circuits
- MCP tool descriptors for seamless LLM integration (tool listing + run endpoints)
- Filtered and paginated queries (season, race, session, driver)
- Lap and telemetry data export in JSON or CSV
- Aggregation endpoints for comparative analysis (best laps, stint comparisons)
- Lightweight configuration; run locally or inside Docker
- Designed for analytics workflows and real-time context provisioning to models
Installation / Configuration
Clone the repository and follow the steps below. The examples cover common installation options — check the repository README for project-specific commands if they differ.
- Clone the repo
- Install dependencies (Node.js example)
# If the project uses npm
# or if it uses yarn
- Environment variables Create a .env file in the project root (example variables):
PORT=8080
DATA_PATH=./data
MCP_BASE=/mcp
LOG_LEVEL=info
- Run locally
# npm
# or explicitly (if using node entry file)
- Run with Docker
# build
# run
Note: If the project uses Python/Flask/FastAPI, replace npm commands with pip and the appropriate run command (e.g., uvicorn main:app –reload). Consult the repository README for language-specific details.
Available Resources
The server exposes a set of logical endpoints. The exact paths may vary; replace BASE with your server root (e.g., http://localhost:8080).
| Endpoint | Method | Purpose |
|---|---|---|
| BASE/drivers | GET | List drivers or search by name; supports ?season= and ?team= |
| BASE/drivers/{driverId} | GET | Driver profile (bio, seasons, teams, stats) |
| BASE/races | GET | Race calendar and results by season |
| BASE/races/{raceId}/results | GET | Race classification, points, finishing status |
| BASE/laps | GET | Query lap times with filters: season, race, session, driver |
| BASE/laps/{raceId}/{session}/driver/{driverId} | GET | All lap times for a driver in a session |
| BASE/telemetry | GET/WS | Telemetry streams or snapshots (position, speed, throttle, brake) |
| BASE/circuits | GET | Circuit metadata and sector maps |
| BASE/mcp/tools | GET | MCP tool descriptors (for LLM tool discovery) |
| BASE/mcp/tools/{toolName}/run | POST | Run a tool with structured JSON args (returns context payload) |
Example: fetch a driver profile
|
Example: run an MCP tool to get race-summary context
Example response fields (driver profile)
Use Cases
- LLM context retrieval: Use the MCP tool descriptors endpoint so a language model can discover available tools and request structured race summaries, driver bios, or recent-lap context before answering a user query.
- Comparative lap analysis: Pull lap times for two drivers in the same session and compute delta times, best sectors, and stint performance for data-driven commentary.
- Telemetry playback: Stream telemetry to a visualization tool for replays or to extract features (e.g., top speed, max throttle) for automated reports.
- Race dashboards and ETL: