fastf1-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fastf1-mcp Who won the 2024 Monaco Grand Prix?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fastf1-mcp
A local MCP server that gives Claude (or any MCP-compatible AI client) access to Formula 1 race data. Load any session from 2018 onwards, ask questions in natural language, and get answers backed by real telemetry, timing, and strategy data.
No hosted API. No credentials for data. Everything runs locally on your machine.
Install
pip install fastf1-mcpRelated MCP server: Formula One MCP Server
Use with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"f1": {
"command": "fastf1-mcp"
}
}
}Restart Claude Desktop. Then ask:
Use with Claude Code
claude mcp add f1 fastf1-mcpThen in any Claude Code session, ask:
"Load the 2024 Monaco qualifying and tell me who got pole"
"Compare Verstappen and Leclerc's race pace at Silverstone"
"What was Hamilton's pit strategy at Monza?"
What It Does
The MCP server exposes 17 tools that Claude can call to fetch specific F1 data:
Tool | What It Answers |
| Load a race, qualifying, or practice session |
| "What races are in 2024?" |
| "Who won?", "What was the podium?" |
| "Who got pole?", "Q3 times?" |
| "How consistent was Leclerc?" |
| "Who set the fastest lap?" |
| "When did everyone pit?" |
| "What compounds did they use?" |
| "What was Verstappen's top speed?" |
| "Compare Norris vs Piastri" |
| "Was it wet?" |
| "Give me an overview of the race" |
| "Did the track get faster?" |
| "Who gained the most positions?" |
| "Who is car 44?" |
| "Who was in this session?" |
| "What session is loaded?" |
Fuzzy Input Normalization
You don't need to know exact driver codes or race names. The server resolves natural language:
You Say | Resolves To |
"Leclerc", "charles", "LEC", "16" | Charles Leclerc (LEC) |
"checo", "Perez", "11" | Sergio Perez (PER) |
"spa" | Belgian Grand Prix |
"monza" | Italian Grand Prix |
"silverstone" | British Grand Prix |
"qualifying", "quali", "Q" | Qualifying session |
How It Works
You ask Claude: "Who won the 2024 Bahrain race?"
│
▼
Claude picks tool: load_session(year=2024, race="Bahrain", session="race")
│
▼
fastf1-mcp loads data via FastF1 (cached locally after first download)
│
▼
Claude picks tool: race_result()
│
▼
fastf1-mcp returns structured JSON with the classification
│
▼
Claude answers: "Verstappen won from Perez and Sainz..."First load of a session downloads from F1 servers (~10-30 seconds)
Every load after is instant (cached at
~/.cache/f1_mcp/)No API keys needed for F1 data — it's public timing data via FastF1
Claude only sees small JSON tool results, not raw telemetry dumps
Data Coverage
Seasons: 2018 onwards (FastF1 limitation)
Sessions: Race, Qualifying, Sprint, Practice (FP1/FP2/FP3)
Data: Results, lap times, pit stops, tyre stints, telemetry (speed/throttle/brake), weather, circuit info
Testing
pip install fastf1-mcp[test]
# Unit tests (no network, instant)
pytest tests/ -m "not integration" -v
# Full suite (downloads F1 data on first run, cached after)
pytest tests/ -v133 tests covering normalization, session management, tool execution, and MCP protocol (stdio JSON-RPC handshake, tool listing, tool calls).
Use as a Python Library
You can also import the package directly without MCP:
from f1_mcp.session import SessionManager
mgr = SessionManager()
mgr.load(2024, "Monaco", "qualifying")
print(mgr.qualifying_result())
print(mgr.lap_times("Leclerc"))
print(mgr.head_to_head("Verstappen", "Norris"))License
MIT
Available Tools
17 toolsdriver_telemetryA
Get summarized telemetry stats for a driver's lap.
Returns top speed, average speed, throttle application percentage, braking intensity, and other derived metrics. Defaults to the driver's fastest lap if no lap number is specified.
Use this when the user asks about speed, braking, throttle traces, or driving style analysis.
Args: driver: Driver name, code, or number (e.g. "Verstappen", "VER", "1") lap_number: Specific lap number, or -1 for the driver's fastest lap (default: -1)
Inputs: driver (required), lap_number. Returns: result
fastest_lapsA
Get the fastest lap set by each driver, ranked.
Use this when the user asks about fastest laps, who set the quickest time, or lap time comparisons across the field.
Args: top_n: Number of drivers to include (default 10)
Inputs: top_n. Returns: result
head_to_headA
Compare two drivers across all key metrics.
Use this when the user asks to compare drivers, wants a head-to-head analysis, or asks who was better between two specific drivers.
Args: driver_a: First driver — name, code, or number driver_b: Second driver — name, code, or number
Inputs: driver_a (required), driver_b (required). Returns: result
identify_driverA
Resolve a driver name, nickname, or number to their full identity.
Use this when the user refers to a driver ambiguously and you need to confirm who they mean. Handles nicknames ("Checo"), first names ("Charles"), car numbers ("44"), and partial matches ("lec").
Args: name: Any driver reference — name, nickname, abbreviation, or car number
Inputs: name (required). Returns: result
lap_timesA
Get lap-by-lap timing data for a specific driver.
Use this when the user asks about a driver's pace, consistency, lap time progression, or when they were fast/slow. Includes tyre compound and stint info per lap.
Driver names are fuzzy-matched: "Leclerc", "charles", "LEC" all work.
Args: driver: Driver name, code, or number (e.g. "Leclerc", "LEC", "16")
Inputs: driver (required). Returns: result
list_driversA
List all drivers in the current session with codes, names, and teams.
Use this when the user asks who was in the session, or when you need to find a driver's 3-letter code.
Inputs: no named parameters. Returns: result
load_sessionA
Load an F1 session for analysis. Must be called before other tools.
Use this when the user mentions a specific race, GP, or session they want to analyze. Race and session names are fuzzy-matched:
Race: "Bahrain", "Monza", "silverstone", "Monaco GP" all work
Session: "race", "qualifying", "quali", "FP1", "sprint" all work
Args: year: Season year (e.g. 2024) race: Grand Prix name — fuzzy matched (e.g. "Bahrain", "Monza", "silverstone") session: Session type — fuzzy matched (default "race"). Options: race, qualifying, sprint, FP1, FP2, FP3
Inputs: year (required), race (required), session. Returns: result
overtake_analysisA
Get position changes and pace comparisons between consecutive drivers.
Use this when the user asks about overtakes, who was faster than the car ahead, position gains/losses, or race dynamics.
Inputs: no named parameters. Returns: result
pit_stopsA
Get pit stop details — when each driver pitted and on which tyre.
Use this when the user asks about pit strategy, when someone pitted, how many stops a driver made, or undercut/overcut timing.
Args: driver: Driver name/code, or "all" for every driver (default: all)
Inputs: driver. Returns: result
qualifying_resultA
Get qualifying results with Q1/Q2/Q3 times.
Use this when the user asks about qualifying positions, Q1/Q2/Q3 times, pole position, or qualifying performance.
Inputs: no named parameters. Returns: result
race_resultA
Get the full race classification — who finished where.
Use this when the user asks about race results, who won, podium positions, DNFs, points scored, or finishing order.
Inputs: no named parameters. Returns: result
season_calendarA
Get the full F1 race calendar for a season.
Use this when the user asks about the schedule, which races happened, or wants to know race names to load a session.
Args: year: Season year (e.g. 2024, 2025, 2026)
Inputs: year (required). Returns: result
session_statusA
Check if a session is currently loaded and get its details.
Use this when you need to confirm what session is active before answering a question.
Inputs: no named parameters. Returns: result
session_summaryA
Get a quick overview of the loaded session with key facts.
Use this as a starting point when the user asks a general question about the session, or when you need context before answering. Includes: winner, DNFs, pit stops, fastest lap, weather.
Inputs: no named parameters. Returns: result
tire_stintsA
Get tyre stint breakdown — compound, start/end lap, stint length.
Use this when the user asks about tyre strategy, which compounds were used, how long stints were, or compound choices.
Args: driver: Driver name/code, or "all" for top 10 drivers (default: all)
Inputs: driver. Returns: result
track_evolutionA
Get how track conditions changed during the session.
Use this when the user asks about track rubbering in, grip changes, whether the track got faster, or temperature effects on pace.
Inputs: no named parameters. Returns: result
weatherA
Get weather conditions during the session.
Use this when the user asks about weather, track temperature, rain, or conditions that may have affected the race.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool has a clearly defined and distinct purpose with detailed descriptions that prevent overlap. For example, driver_telemetry focuses on summary lap statistics while lap_times provides lap-by-lap timing, and pit_stops vs tire_stints differentiate between timing and compound details.
All tool names use lowercase snake_case consistently and follow a descriptive pattern, either noun_phrase (e.g., fastest_laps, pit_stops) or verb_noun (e.g., list_drivers, load_session). No mixed conventions or vague verbs are present.
With 17 tools, the server covers the F1 analysis domain thoroughly but slightly exceeds the typical well-scoped range of 3-15. However, each tool serves a distinct purpose, so the count feels justified rather than excessive.
The tool set covers all major aspects of F1 session analysis: session loading, race and qualifying results, driver telemetry and laps, pit stops, tire stints, overtakes, track evolution, weather, head-to-head comparisons, and season calendars. No obvious gaps or dead ends exist for common queries.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseAqualityDmaintenanceThis 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.885 PyPI2MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides comprehensive Formula One racing data, enabling access to event schedules, driver information, telemetry data, race results, and performance analytics through natural language queries.81MIT
- AlicenseAqualityBmaintenanceMCP server for Formula 1 data via the FastF1 library. Ask Claude (or any MCP-compatible client) about race results, lap times, telemetry, standings, pit stops, and qualifying — with historical data back to 1950 via the Ergast API.36138 PyPIMIT
- FlicenseNot gradedqualityDmaintenanceA real-time Formula 1 analytics server that lets you ask natural language questions about races, lap times, tyre strategies, pit stops, and more using live data from the OpenF1 API.-