f1-mcp

f1-mcp

An MCP server that provides 118+ Formula 1 analytics tools, enabling race analysis, driver comparisons, telemetry exploration, and strategy simulation through natural language.

Category
Visit Server

README

F1 Analytics MCP Server

License: MIT Python 3.12+ Tests PyPI version GitHub stars GitHub issues GitHub Discussions

An MCP (Model Context Protocol) server providing 118+ Formula 1 analytics tools powered by FastF1 and the Ergast API. Connect it to Claude Desktop, Claude Code, or any MCP client to analyze races, compare drivers, explore telemetry, and simulate strategies using natural language.

Features

  • Session & Driver Info — race results, standings, circuit details, driver metadata
  • Lap & Sector Analysis — lap times, sector deltas, consistency scores, clean lap filtering
  • Telemetry — speed/throttle/brake/gear/RPM traces, corner analysis, braking points
  • Strategy Intelligence — tyre degradation, pit windows, undercut/overcut analysis, strategy simulation
  • Race Position — overtakes, battles, gap evolution, position changes, lead changes
  • Predictive AI — race winner prediction, overtake probability, tyre cliff prediction, safety car probability
  • Visualizations — speed maps, race progression charts, tyre degradation plots, track dominance maps

Quick Start

pip install (recommended)

pip install f1-mcp

Install from source:

pip install git+https://github.com/Luffy610/f1-mcp.git

Docker

docker compose up -d

The MCP server will be available at http://localhost:8000/sse.

MCP Client Configuration

Claude Desktop / Claude Code (stdio — recommended)

{
  "mcpServers": {
    "f1": {
      "command": "f1-mcp"
    }
  }
}

SSE mode (remote / Docker)

{
  "mcpServers": {
    "f1": {
      "type": "sse",
      "url": "http://localhost:8000/sse"
    }
  }
}

To start the SSE server manually: python server.py

Tool Categories

Category Tools Examples
Session 8 Race info, weather, circuit details, flag events
Driver 8 Standings, driver info, team lookup, points
Lap 10 Lap times, distributions, clean laps, deleted laps
Sector 8 Sector times, deltas, consistency, improvement trends
Telemetry 12 Speed/brake/throttle/gear traces, corner analysis
Strategy 10 Tyre strategy, stint lengths, compound usage, degradation
Pit Stops 6 Pit times, pit lane loss, pit stop summaries
Race Position 8 Overtakes, battles, gap evolution, lead changes
Strategy Intelligence 10 Undercut/overcut, optimal pit window, strategy simulation
Telemetry Intelligence 10 Braking analysis, corner speeds, dirty air, energy deployment
Advanced Analytics 8 Driver style clustering, aggression/risk indices, consistency
Predictive AI 14 Race winner, overtake probability, tyre cliff, safety car
Visualization 6 Speed maps, race progression, tyre degradation plots

Example Prompts

Analyze why Verstappen won the 2023 Bahrain GP. Break down his tyre strategy,
pit stops, race pace trend, and any overtakes he made.
Compare Verstappen and Leclerc through Turn 10 at the 2023 Bahrain GP.
Who brakes later, carries more apex speed, and gets on the throttle earlier?
Simulate how the 2023 Bahrain GP would have played out if Verstappen used
a two-stop strategy instead of his actual strategy.

See example.md for more detailed example prompts with the specific tools they trigger.

Contributing

We welcome contributions! The master branch is protected — please fork the repo, create a feature branch, and submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-new-tool)
  3. Make your changes and ensure tests pass (python -m pytest tests/ -v)
  4. Submit a pull request

See CONTRIBUTING.md for detailed guidelines on project structure, adding tools, and code style.

Reporting Issues & Requesting Features

Development

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run all tests
python -m pytest tests/ -v

# Run specific test group
python -m pytest tests/ -v -k "test_lap"

# Start SSE server for development
python server.py

Architecture

f1_mcp/                → Python package
  server.py            → Entry point, registers all tool modules
  config.py            → FastF1 cache configuration
  connectors/          → Data sources (FastF1Loader, ErgastClient)
  core/                → Caching layer + serialization utilities
  models/              → Pydantic schemas
  services/            → Business logic (14 service classes)
  tools/               → MCP tool registrations (14 modules, 1:1 with services)
tests/                 → End-to-end test suite (118 tests)

Environment Variables

Variable Default Description
F1_CACHE_DIR ./cache Directory for FastF1 data cache

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured