The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Sport listing page.

An MCP (Model Context Protocol) server that exposes Formula 1 data from the OpenF1 API as tools for AI assistants (Claude Desktop, Cursor, MCP Inspector, etc.).
Full coverage: 18 data tools matching the 18 documented OpenF1 endpoints — sessions, meetings, drivers, results, laps, pit stops, stints, telemetry, weather, championships and more. Two MCP App views sit on top of that data: a drivers standings board and an animated race replay. Hosts that render MCP Apps show the HTML. Cursor and Claude Desktop do not: they return the same payload as JSON.
| Layer | Technology |
|---|---|
| Language | Python 3.13+ |
| MCP framework | FastMCP 4.x |
| Validation | Pydantic v2 |
| Data | OpenF1 API (REST, free for historical data 2023+) |
| Project management | uv + pyproject.toml |
| Transport | stdio |
In the Inspector UI: transport STDIO, command .venv/bin/python,
args src/mcp_sport/server.py → Connect.
Add to the client's MCP configuration:
The 18 data tools work in both clients. The views do not render there.
get_drivers_championship_view and get_race_replay_view return interactive
HTML. Cursor and Claude Desktop are incompatible with MCP Apps: they
ignore the UI and show the JSON payload. The MCP Inspector also treats the
result as text.
The views were validated in the official
basic-host
from modelcontextprotocol/ext-apps.
The server must be HTTP, with CORS exposing the MCP session headers.
Otherwise the browser cannot complete the Streamable HTTP handshake.
Terminal 1 — MCP server on port 8765:
Terminal 2 — basic-host (needs Node.js; npm start requires bun, so use tsx):
Open http://localhost:8080 (sandbox on :8081) and call
get_drivers_championship_view or get_race_replay_view. After a change to
the view HTML, hard-refresh the page (Ctrl+Shift+R) before running the tool
again. The host caches the ui:// resource.
| Domain | Tool | Description |
|---|---|---|
| Navigation | get_sessions | Sessions (practice, qualifying, sprint, race) |
get_meetings | Grand Prix and testing weekends | |
| Registry | get_drivers | Drivers by session/meeting |
| Results | get_session_results | Final classification of a session |
get_starting_grid | Starting grid | |
get_positions | Position history throughout a session | |
| Race | get_laps | Lap times, sectors and speeds |
get_pit_stops | Pit stops | |
get_stints | Stints and tyre compounds | |
get_intervals | Real-time gaps (leader and car ahead) | |
get_race_control | Flags, safety car, incidents | |
| Context | get_weather | Track weather (per-minute samples) |
get_overtakes | Overtakes | |
get_team_radio | Team radio excerpts (MP3) | |
| Telemetry | get_car_data | Speed, RPM, gear, throttle, brake, DRS (~3.7 Hz) |
get_location | Approximate car position on the circuit (~3.7 Hz) | |
| Championships | get_drivers_championship | Drivers standings (beta) |
get_teams_championship | Teams standings (beta) |
"How many points did Norris score in the last two races?"
The AI orchestrates: get_sessions(session_type="Race") to discover recent
sessions → get_session_results(session_key=..., driver_number=4) on each one.
| Document | Contents |
|---|---|
docs/Technical_Reference.md | Stack, versions and official links (source of truth) |
docs/Architectural_Design.md | Implementation patterns and procedure for new endpoints |
docs/Logging_Strategy.md | Logging strategy (stderr + per-request telemetry) |
tasks/ | History of planned and executed tasks |
| Variable | Default | Description |
|---|---|---|
MCP_SPORT_LOG_LEVEL | INFO | Log level on stderr (DEBUG, INFO, WARNING, ERROR) |
session_result and starting_grid return HTTP 404 until official results are publishedcar_data, location) returns 18–24k samples per session/driver.
Narrow the call with range filters such as speed_min and date_from/date_toMIT. OpenF1 is an unofficial project, not associated in any way with the Formula 1 companies.