fastf1-mcp: an MCP server for Formula 1 data

fastf1-mcp: an MCP server for Formula 1 data

fastf1-mcp•bysurya96t

An MCP server that lets MCP-compatible AI assistants query Formula 1 race results, lap times, telemetry, standings and more through the FastF1 library, including chart tools and live replay support.

License: MIT•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Offers 36 tools spanning standings, race results, lap times, telemetry, pit stops, qualifying, race control, weather, race progression, tyre degradation, corner analysis, DRS zones, and championship projections.
  • •Provides chart tools that return PNG images, including track maps, speed traces, position charts, tyre strategies and lap-time plots.
  • •Exposes four MCP resources for schedule, driver, constructor and circuit reference data.
  • •Includes a live replay bridge that follows a race playing in f1-race-replay and produces race-engineer commentary.

BEST FOR

  • •Asking questions about Formula 1 race results, lap times and telemetry through an MCP-compatible assistant.
  • •Getting visual race analysis such as track maps, speed traces and tyre strategy charts shown inline.
  • •Following a live replay with race-engineer style commentary and overtake/flag updates.

ABOUT FASTF1-MCP

fastf1-mcp: an MCP server for Formula 1 data is cataloged as an MCP server attributed to surya96t. An MCP server that lets MCP-compatible AI assistants query Formula 1 race results, lap times, telemetry, standings and more through the FastF1 library, including chart tools and live replay support. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for fastf1-mcp: an MCP server for Formula 1 data are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which Formula 1 seasons does the server's data cover?

Standings, schedules and historical results go back to 1950, while FastF1 live timing session data is available from 2018 onwards.

Can circuit maps be drawn without downloading data?

Yes, real circuit outlines come from bundled data and plot_circuit works offline.

Upstream README

View this exact version on GitHub

README.md · 0cb227faf5dd · Fetched 2026-11-13 12:49:51 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

fastf1-mcp

CI PyPI

An MCP server that exposes Formula 1 data to AI assistants via the FastF1 library. Ask Claude (or any MCP-compatible client) questions about race results, lap times, telemetry, standings, and more.


Features

  • 36 tools covering standings, race results, lap times, telemetry, pit stops, qualifying, race control, weather, race progression, tyre degradation, corner analysis, DRS zones and live championship projections
  • Real circuit maps offline — every F1 circuit since 2018 drawn from bundled outline data, no download needed
  • Charts — track maps, speed traces, race position charts, tyre strategies and lap-time plots returned as PNG images Claude can show inline
  • Live replay bridge — follow a race playing in f1-race-replay and get race-engineer commentary
  • 4 MCP resources for schedule, driver, constructor, and circuit reference data
  • 6 guided prompts for race recaps, qualifying analysis, strategy deep-dives, weekend previews and live replay commentary
  • Async-safe LRU session cache — repeat queries are instant after the first load
  • Distance-based telemetry sampling — large raw datasets compressed to ≤ 500 points
  • All errors returned as structured dicts — the server never crashes on bad input

These are unedited PNGs from the server's chart tools, the same images Claude shows inline, drawn from real F1 timing data via FastF1. Under each one is a question that brings it up and the tool it calls.

Monza track map coloured by speed, with numbered corners and DRS zones
"Show Gasly's fastest lap at Monza 2020, coloured by speed."  plot_track_map
Bahrain 2022 car positions on track at the start of lap 20
"Where was everyone on track when lap 20 of Bahrain 2022 began?"  plot_track_map(at_lap=20)
2025 British GP position chart highlighting Norris, Piastri and Hülkenberg
"How did Hülkenberg get from P19 to the podium at Silverstone?"  plot_position_chart
Hamilton vs Verstappen speed trace and gap, 2021 Saudi Arabian GP
"Compare Hamilton's and Verstappen's fastest laps in Jeddah 2021."  plot_speed_trace
2026 Chinese GP tyre strategy by driver
"What tyre strategies did teams run in China this year?"  plot_tyre_strategy
All 23 circuits on the 2026 F1 calendar
"Draw every circuit on the 2026 calendar." Works offline.  plot_circuit(year=2026)

Quick start

No clone needed — uv runs the published package.

Claude Code

claude mcp add fastf1 -- uvx fastf1-mcp-server

Claude Desktop — add to claude_desktop_config.json and restart:

{
  "mcpServers": {
    "fastf1": {
      "command": "uvx",
      "args": ["fastf1-mcp-server"]
    }
  }
}

Then ask: "Plot the tyre strategies from the 2025 British Grand Prix" or "Who led every lap of the 2021 Saudi Arabian GP, and when were the red flags?"


Requirements

  • Python 3.12+
  • uv (recommended) or pip

Installation

git clone https://github.com/Surya96t/fastf1-mcp
cd fastf1-mcp
uv sync

With pip

pip install fastf1-mcp-server

Running the server

# via uv (development)
uv run fastf1-mcp-server

# or directly
python -m fastf1_mcp

MCP Inspector (development / debugging)

# Option A — official npx inspector
npx @modelcontextprotocol/inspector uv --directory . run fastf1-mcp-server

# Option B — fastmcp wrapper
uv run fastmcp dev inspector -m fastf1_mcp.server --with-editable .

Both open the inspector at http://localhost:6274.


Claude Desktop configuration (from a clone)

Add the following to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "fastf1": {
      "command": "uv",
      "args": ["run", "fastf1-mcp-server"],
      "cwd": "/absolute/path/to/fastf1-mcp",
      "env": {
        "FASTF1_MCP_LOG_LEVEL": "INFO",
        "FASTF1_MCP_MAX_CACHED_SESSIONS": "10"
      }
    }
  }
}

Restart Claude Desktop after saving. The server name fastf1 will appear in the tools panel.


Configuration

All settings are read from environment variables with the FASTF1_MCP_ prefix.

VariableDefaultDescription
FASTF1_MCP_FASTF1_CACHE_PATH~/.fastf1_cacheDisk cache for FastF1 session files
FASTF1_MCP_MAX_CACHED_SESSIONS10Max sessions held in memory (LRU)
FASTF1_MCP_DEFAULT_TELEMETRY_SAMPLES200Default telemetry sample points
FASTF1_MCP_MAX_TELEMETRY_SAMPLES500Hard cap on telemetry sample points
FASTF1_MCP_EXPORT_DIR./fastf1-exportsDirectory for CSV exports (relative to server cwd)
FASTF1_MCP_AUTO_EXPORT_ROWS50Auto-export to CSV when the bulk array exceeds this many rows. Set to 0 to disable.
FASTF1_MCP_REPLAY_STREAM_HOST127.0.0.1f1-race-replay telemetry stream host (keep on loopback — the stream is unauthenticated)
FASTF1_MCP_REPLAY_STREAM_PORT9999f1-race-replay telemetry stream port
FASTF1_MCP_LOG_LEVELINFOPython logging level

Exporting full datasets for analysis

get_lap_times, get_stint_analysis, get_lap_telemetry, and compare_telemetry route the bulk data array through CSV when the user needs the file rather than the inline JSON.

Two ways the export gets triggered:

  1. Auto-export (default for large responses) — when the response's bulk array would exceed FASTF1_MCP_AUTO_EXPORT_ROWS rows (default 50), the server writes it to CSV in FASTF1_MCP_EXPORT_DIR and the response carries exportPath + a note instead of the array. This catches full-race lap-time queries, full-grid stint analyses, and 200-point telemetry traces — exactly the cases where MCP clients would otherwise silently spill the response to an opaque temp file.
  2. Explicit export_path parameter — pass it on the tool call:
    • export_path=True → write to <FASTF1_MCP_EXPORT_DIR>/<auto-named>.csv
    • export_path="data/laps" → write the auto-named file into the given directory
    • export_path="data/ver-monaco.csv" → write to exactly that file

The summary field is always included so a chat-only user can still answer "what was the fastest lap / what's the strategy" without opening the file. Relative paths resolve against the MCP server's working directory — under Claude Desktop, that's the cwd set in your MCP config, so files land in the user's project directory by default.


Tools

Quick Lookup (Ergast API — 1950-present)

ToolDescription
get_scheduleGet the F1 race calendar for a season.
get_driver_standingsGet driver championship standings.
get_constructor_standingsGet constructor championship standings.
get_driver_infoGet driver information.
get_race_results_historicalGet historical race results (pre-2018 or when session data unavailable).
get_circuit_infoGet circuit information.

Session Data (FastF1 Live Timing — 2018-present)

ToolDescription
get_session_resultsGet session classification/results.
get_lap_timesGet all lap times for a driver in a session.
get_fastest_lapsGet fastest laps in a session, one per driver.
get_race_paceCalculate average race pace for all drivers.
get_stint_analysisAnalyze tire stints for a race.
get_pit_stopsGet all pit stops from a race.
get_qualifying_breakdownGet qualifying results split by Q1/Q2/Q3.

Telemetry (FastF1 Live Timing — 2018-present)

ToolDescription
get_lap_telemetryGet telemetry data for a specific lap.
compare_telemetryCompare telemetry between two drivers on the same session.
get_speed_trap_dataGet speed trap and top-speed data for all drivers in a session.
get_sector_timesGet best sector times and theoretical best lap for each driver.
get_corner_analysisCorner-by-corner apex/entry/exit speed, gear and brake point for one lap; with a second driver, where each gains or loses time.
get_drs_zonesDRS zones (open/close distance, length, surrounding corners) inferred from where the flap actually opened (fastest laps, or in races the laps with the most DRS use). 2018–2025 (DRS was replaced by active aero in 2026).

Race Analysis (FastF1 Live Timing — 2018-present)

ToolDescription
get_race_control_messagesRace control feed with a session summary: SC/VSC/red-flag periods (with laps), penalties, investigations, track-limits deletions. Filter by category, driver or lap range.
get_weatherAir/track temperature, humidity, wind and rain over a session, with rain periods mapped to laps.
get_position_changesLap-by-lap positions and gaps to the leader, grid→finish movement, laps led and lead changes.
get_tyre_degradationFuel-corrected degradation rate per stint and per compound, plus compound crossover estimates. Works on races and practice long runs.
get_championship_projectionDrivers' and constructors' standings as if the race ended at any lap — live points, lead changes during the race, and final official standings. Handles sprint weekends and the 2019–2024 fastest-lap point.

Charts (PNG images)

ToolDescription
plot_speed_traceSpeed vs distance for one lap, or two drivers overlaid with a time-gap panel and corner markers.
plot_position_chartRace history chart — every driver's position by lap, up to 8 highlighted.
plot_tyre_strategyStint bars coloured (and lettered) by compound, in finishing order.
plot_lap_timesLap time vs lap for up to 3 drivers, marker shape = compound.
plot_track_mapCircuit map of a lap coloured by speed or gear, with numbered corners, DRS zones and direction of travel — or, with at_lap, every car's position on track at the start of that lap. Falls back to the stored outline when FastF1 telemetry can't be downloaded.
plot_circuitReal circuit outline from bundled data — works offline. By name ("Monaco", "COTA", "Spa"), Grand Prix, or year + round; with only a year, a sheet of that season's circuits. Shows official length, direction of racing and start/finish.

All chart tools accept save_path to also write the PNG into the export directory. plot_speed_trace also shades where DRS was open.

Live Replay (f1-race-replay)

These read the telemetry stream that f1-race-replay broadcasts on localhost:9999 while a replay is playing. Start a replay there (python main.py --viewer --year 2024 --round 12), then ask Claude what's happening.

ToolDescription
get_replay_stateSnapshot: replay time, lap, leader, track status, safety car, weather, live leaderboard (tyre, speed, DRS, pit, gaps) and latest race-control messages.
watch_replayWatch for N seconds and report overtakes, pit entries/exits, SC/VSC/red-flag changes and new race-control messages.

The client drains the stream continuously and disconnects promptly — f1-race-replay's server writes on its render thread, so a client that stopped reading would freeze the replay.

Utility

ToolDescription
list_eventsList all events in a season.
list_driversList all drivers in a season, optionally filtered to a specific event.
get_cache_statusCheck server in-memory session cache status.
clear_cacheClear cached sessions from in-memory storage.

Resources

URIDescription
f1://schedule/{year}Full race calendar for a season
f1://drivers/{year}All drivers who competed in a season
f1://constructors/{year}All constructors in a season
f1://circuitsAll F1 circuits (all-time)

Prompts

PromptArgsWhat it does
race_recapyear, eventResults + position changes + race control + fastest laps + stints, then narrates the race
qualifying_analysisyear, eventQ breakdown + sector times + corner analysis of the pole lap
driver_comparisonyear, driver1, driver2Season-level head-to-head: standings, races, qualifying
strategy_analysisyear, eventStints + pit timing + tyre degradation + SC/VSC timing + race pace — explains who won the strategy battle
weekend_previewyear, eventCircuit details + recent history + championship context
replay_commentaryroundsRace-engineer radio updates on a replay running in f1-race-replay

Example queries (Claude Desktop)

Who won the 2024 Monaco Grand Prix and what was the strategy?
→ use race_recap prompt or call get_session_results + get_stint_analysis

Compare Verstappen and Leclerc's telemetry in 2024 Monaco qualifying
→ compare_telemetry(2024, "Monaco", "Q", "VER", "LEC")

Who had the fastest theoretical lap in 2024 Silverstone qualifying?
→ get_sector_times(2024, "Silverstone", "Q")

Where did Norris lose pole to Verstappen in 2024 Spain qualifying?
→ get_corner_analysis(2024, "Spain", "Q", "NOR", driver2="VER")

Why did everyone pit on lap 34? Were there any penalties?
→ get_race_control_messages(2024, "Hungary")

How quickly did the mediums degrade compared to the hards?
→ get_tyre_degradation(2024, "Bahrain")

Show me how the 2024 Brazil race unfolded
→ plot_position_chart(2024, "Brazil", highlight=["VER", "NOR", "RUS"])

Where was everyone when the safety car came out on lap 34?
→ plot_track_map(2024, "Hungary", "R", at_lap=34)

Draw the Suzuka circuit / show me all the 2026 tracks
→ plot_circuit("Suzuka") / plot_circuit(year=2026)

Who was leading the championship on the road at half distance in Abu Dhabi?
→ get_championship_projection(2024, "Abu Dhabi", after_lap=29)

What's happening in the replay right now?
→ get_replay_state() / watch_replay(duration_sec=10)

Show me the 2024 constructor standings after round 10
→ get_constructor_standings(2024, after_round=10)

Development

# Install dev dependencies
uv sync --dev

# Run tests
uv run pytest

# Run tests with coverage
uv run pytest --cov=fastf1_mcp

# Lint
uv run ruff check src/

Data sources & coverage

SourceCoverageUsed for
Ergast API (via FastF1)1950 – presentStandings, schedules, historical results, circuit info
FastF1 Live Timing2018 – presentLap times, telemetry, qualifying, pit stops, tire data, race control, weather
MultiViewer (via FastF1)2018 – presentCircuit corner positions (corner analysis, speed-trace markers)
bacinger/f1-circuits (bundled, MIT)all F1 circuits used 2018 – 2026 + classicsOffline circuit outlines and 2020 – 2026 calendars (plot_circuit, track-map fallback)

Note: FastF1 session data is only available from 2018 onwards. Use get_race_results_historical for earlier seasons.


License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for fastf1-mcp: an MCP server for Formula 1 data from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/fastf1-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research