Skip to main content
Glama
OpenF1 MCP Server

OpenF1 MCP Server

by ragulhari

openf1-mcp

MCP server for the OpenF1 API — Formula 1 timing, telemetry and session data from 2023 onwards.

TypeScript, stdio transport, read-only. Team radio is not included (F1 decreased radio coverage in 2026).

Tools

Discovery

Tool

Use

get_meetings

Find Grand Prix weekends → meeting_key

get_sessions

Find practice / qualifying / sprint / race → session_key

get_drivers

Map driver numbers to names and teams

Data (one tool for each endpoint)

get_session_result, get_starting_grid, get_laps, get_stints, get_pit, get_position, get_intervals, get_overtakes, get_race_control, get_weather, get_championship_drivers, get_championship_teams, get_car_data, get_location.

Composite

Tool

Result

get_race_summary

Classification with names, teams, grid, positions gained, status (DNF/DNS/DSQ)

get_tyre_strategy

Compound sequence, stint lengths and pit stops for each driver

compare_fastest_laps

Fastest lap, sectors, speeds, theoretical best lap and delta for 2–10 drivers

All tools accept "latest" for session_key / meeting_key.

Common arguments

  • Typed parameters – equality filters such as session_key, driver_number (one number or a list), lap_number.

  • filters – comparison filters: [{"field":"lap_duration","op":"<","value":90}]. The server checks the field names.

  • date_from / date_to – time range (UTC, ISO 8601) for endpoints with a date attribute.

  • fields – return only these attributes.

  • limit – maximum records (default 200, max 1000).

Size control

Large results do not go to the model in full:

  • Results above limit are sampled evenly for time series (or cut for other data) and get a summary (min / max / avg of numeric fields and first / last date) computed on all records.

  • get_car_data and get_location (~3.7 Hz) need session_key, one driver_number, and a lap_number or a date range of 10 minutes or less. With lap_number, the server finds the start and end of the lap for you.

Reliability

  • Cache: 6 h for historical data, 10 min for the calendar, 10 s for latest queries.

  • Requests are spaced (350 ms) and retried on HTTP 429 / 5xx.

  • "No results found" (HTTP 404) is returned as an empty list with a hint.

  • Errors go back to the model as isError results with a clear message.

Related MCP server: OpenF1 MCP Server

Install

Node.js 20 or later.

npm install
npm run build
npm test          # unit + MCP protocol tests (no network)
npm run smoke     # tests against the real OpenF1 API

Claude Code

claude mcp add openf1 -- node /absolute/path/openf1-mcp/dist/index.js

Claude Desktop

claude_desktop_config.json:

{
  "mcpServers": {
    "openf1": {
      "command": "node",
      "args": ["/absolute/path/openf1-mcp/dist/index.js"]
    }
  }
}

MCP Inspector

npm run inspect

Configuration

Variable

Default

Description

OPENF1_TOKEN

–

Bearer token for the paid real-time tier. Historical data needs no token.

OPENF1_BASE_URL

https://api.openf1.org/v1

API base URL.

OPENF1_MIN_INTERVAL_MS

350

Minimum time between requests.

OPENF1_DEFAULT_LIMIT

200

Default record limit.

Example prompts

  • "Who won the 2025 São Paulo GP and how many positions did each driver gain?"

  • "Compare the tyre strategies of Norris and Piastri in the last race."

  • "Show the speed and throttle of Verstappen on lap 10 of the latest race."

  • "Were there safety cars in the 2025 Brazil race? On which laps?"

Project structure

src/
  index.ts      stdio entry point, server instructions, env config
  endpoints.ts  endpoint catalog (parameters, attributes, guards)
  client.ts     HTTP client: query builder, cache, throttle, retry
  shape.ts      projection, limit, sampling, numeric summary
  tools.ts      tool registration, telemetry guards, composite tools
test/           vitest suite with a fake API
scripts/smoke.ts  real API check

Notes

OpenF1 is an unofficial project and is not associated with the Formula 1 companies. F1 and related marks are trademarks of Formula One Licensing B.V.

Available Tools

20 tools
compare_fastest_lapsCompare fastest lapsA
Read-onlyIdempotent

Compare the fastest lap of 2 to 10 drivers in a session: lap time, sectors, speeds, best sectors, theoretical best lap and delta to the fastest driver.

Inputs: session_key (required), driver_number (required).

get_car_dataCar telemetryA
Read-onlyIdempotent

Car telemetry at about 3.7 Hz: speed, RPM, gear, throttle, brake, DRS. VERY large data: you must give session_key, ONE driver_number and a lap_number or a date range (max 10 minutes).

Inputs: limit, fields, date_to, filters, +4 more.

get_championship_driversDrivers championship (beta)A
Read-onlyIdempotent

Drivers championship points and position before and after a race. Race sessions only.

Inputs: limit, fields, filters, meeting_key, +2 more.

get_championship_teamsTeams championship (beta)A
Read-onlyIdempotent

Teams championship points and position before and after a race. Race sessions only.

Inputs: limit, fields, filters, team_name, +2 more.

get_driversDriversB
Read-onlyIdempotent

Driver details for a session: name, acronym, team, team colour, headshot URL.

Inputs: limit, fields, filters, team_name, +4 more.

get_intervalsIntervalsB
Read-onlyIdempotent

Gap to the car ahead and gap to the leader during a race (about every 4 s). Large data: filter by driver and time.

Inputs: limit, fields, date_to, filters, +4 more.

get_lapsLapsB
Read-onlyIdempotent

Lap data: lap time, sector times, intermediate and speed-trap speeds, pit-out flag, mini-sector segments (segments are not available in races).

Inputs: limit, fields, filters, lap_number, +4 more.

get_locationCar locationA
Read-onlyIdempotent

Approximate car position on track (x, y, z) at about 3.7 Hz. VERY large data: you must give session_key, ONE driver_number and a lap_number or a date range (max 10 minutes).

Inputs: limit, fields, date_to, filters, +4 more.

get_meetingsMeetings (Grand Prix weekends)A
Read-onlyIdempotent

Find meetings (Grand Prix or testing weekends). Use this first to get a meeting_key. Data starts in 2023.

Inputs: year, limit, fields, filters, +4 more.

get_overtakesOvertakesA
Read-onlyIdempotent

Position exchanges between two drivers in a race (on track, pit stops or penalties). Data can be incomplete.

Inputs: limit, fields, date_to, filters, +6 more.

get_pitPit laneB
Read-onlyIdempotent

Pit lane passages: lap, time in pit lane (lane_duration) and stationary stop time (stop_duration, from the 2024 US GP onwards).

Inputs: limit, fields, date_to, filters, +5 more.

get_positionPosition changesB
Read-onlyIdempotent

Driver position during a session: the initial position and each change.

Inputs: limit, fields, date_to, filters, +5 more.

get_race_controlRace controlB
Read-onlyIdempotent

Race control messages: flags, safety car, DRS, penalties, track limits, session status.

Inputs: flag, limit, scope, fields, +8 more.

get_race_summaryRace summaryA
Read-onlyIdempotent

Classification of a session with driver names, teams, grid position, positions gained, laps, gap and status (DNF/DNS/DSQ). Works for races, sprints, qualifying and practice.

Inputs: session_key (required).

get_session_resultSession resultA
Read-onlyIdempotent

Final standings of a session (position, laps, duration, gap, DNF/DNS/DSQ). In qualifying, duration and gap_to_leader are arrays for Q1, Q2, Q3.

Inputs: limit, fields, filters, position, +3 more.

get_sessionsSessionsA
Read-onlyIdempotent

Find sessions (practice, qualifying, sprint, race). Use this to get a session_key, which most other tools need.

Inputs: year, limit, fields, filters, +6 more.

get_starting_gridStarting gridB
Read-onlyIdempotent

Starting grid of a race, with the qualifying lap time of each driver.

Inputs: limit, fields, filters, position, +3 more.

get_stintsStintsC
Read-onlyIdempotent

Tyre stints: compound, first and last lap, tyre age at the start of the stint.

Inputs: limit, fields, filters, compound, +4 more.

get_tyre_strategyTyre strategyB
Read-onlyIdempotent

Tyre strategy for each driver in a session: compound sequence, stint lengths and pit stops.

Inputs: session_key (required), driver_number.

get_weatherWeatherB
Read-onlyIdempotent

Track weather each minute: air and track temperature, humidity, pressure, rain, wind.

Inputs: limit, fields, date_to, filters, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 20 tools

    Disambiguation3/5

    Several tools overlap in practice: get_session_result and get_race_summary both return session classifications/standings, while get_stints and get_tyre_strategy both expose tyre-stint information. get_pit also partially overlaps with get_tyre_strategy because strategy includes pit stops. Descriptions help, but an agent could still misselect among these related tools.

    Naming Consistency5/5

    All tool names follow a clear snake_case verb_noun pattern, with get_* used for the vast majority and compare_fastest_laps as a natural action-specific variant. There is no mixing of camelCase, vague names, or inconsistent structural conventions.

    Tool Count4/5

    Twenty tools is slightly heavy, but the F1 data domain is broad and each tool maps to a recognizable data type or analysis operation. The count is reasonable for the scope, though some redundancy among result, tyre, and pit tools keeps it from being perfectly scoped.

    Completeness4/5

    The surface covers the core F1 workflow very well: meetings, sessions, drivers, results, championships, laps, stints, pits, positions, intervals, race control, weather, telemetry, location, and fastest-lap comparison. Minor gaps remain, such as no explicit team-radio tool and no standalone teams endpoint beyond championship context.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides comprehensive Formula 1 data access including race schedules, session results, lap times, telemetry data, driver/constructor standings, and circuit information. Enables users to retrieve and analyze F1 racing data through natural language queries using the FastF1 Python package.
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables access to Formula 1 data from the openF1.org API, including driver information, race results, lap times, telemetry, pit stops, weather conditions, and live position data across multiple seasons.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to query real-time and historical Formula 1 data through the OpenF1 API, providing tools for driver info, lap times, telemetry, race events, and more.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides Formula 1 data via the Ergast API, enabling users to check current standings, get race results, view the season schedule, and look up driver profiles.
      57 npm
      MIT