Sponsored by Deepsite.site

Fastf1 Mcp Server

Created By
Surya96t19 days ago
MCP 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. 21 tools covering: - Ergast historical lookups (standings, schedules, race results, driver/circuit info) — 1950 to present - Session data (lap times, race pace, stint analysis, pit stops, qualifying breakdown) - Telemetry (speed traces, sector times, driver comparisons with lap delta) - Utilities (event/driver listing, session cache management) 4 MCP resources: f1://schedule/{year}, f1://drivers/{year}, f1://constructors/{year}, f1://circuits 5 guided prompts: race_recap, qualifying_analysis, driver_comparison, strategy_analysis, weekend_preview Install: pip install fastf1-mcp-server
Overview

fastf1-mcp

CI

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

  • 21 tools covering standings, race results, lap times, telemetry, pit stops, and qualifying
  • 4 MCP resources for schedule, driver, constructor, and circuit reference data
  • 5 guided prompts for race recaps, qualifying analysis, strategy deep-dives, and weekend previews
  • 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

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

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_LOG_LEVELINFOPython logging level

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.

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, eventCalls results + fastest laps + pit stops + stints, then narrates the race
qualifying_analysisyear, eventQ breakdown + sector times + top laps analysis
driver_comparisonyear, driver1, driver2Season-level head-to-head: standings, races, qualifying
strategy_analysisyear, eventStints + pit timing + race pace — explains who won the strategy battle
weekend_previewyear, eventCircuit details + recent history + championship context

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")

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

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


License

MIT

Server Config

{
  "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"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs