Formula One Racing Data (FastF1) MCP server

Provides Formula One racing data through FastF1 Python library, enabling access to race calendars, event information, session results, driver statistics, lap times, telemetry data, and championship standings for motorsport analysis.
Back to servers
Setup instructions
Provider
Rakesh Gangwar
Release date
Mar 22, 2025
Language
TypeScript
Stats
3 stars

The Formula One MCP Server provides access to Formula One data and statistics using the FastF1 Python library. It enables you to retrieve race calendars, event information, session results, driver data, telemetry information, and championship standings through a clean Model Context Protocol interface.

Prerequisites

Before installing the F1 MCP Server, ensure you have:

  • Node.js 18 or later
  • Python 3.8 or later
  • FastF1 library

Installation

Install Python Dependencies

First, install the required Python packages:

pip install fastf1 pandas numpy

Install Node.js Dependencies

Navigate to the server directory and install Node.js dependencies:

cd f1-mcp-server
npm install

Build the TypeScript Code

Compile the TypeScript source:

npm run build

Configure MCP Settings

Add the following to your Cline MCP settings file (located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

{
  "mcpServers": {
    "formula1": {
      "command": "node",
      "args": ["/path/to/your/f1-mcp-server/build/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

Note: Replace /path/to/your/f1-mcp-server with the actual path to your installation.

Available Tools

Get Event Schedule

Retrieve the Formula One race calendar for a specific season.

Parameters:

  • year (number): Season year (e.g., 2023)

Get Event Information

Get detailed information about a specific Formula One Grand Prix.

Parameters:

  • year (number): Season year (e.g., 2023)
  • identifier (string): Event name or round number (e.g., "Monaco" or "7")

Get Session Results

Retrieve results for a specific Formula One session.

Parameters:

  • year (number): Season year (e.g., 2023)
  • event_identifier (string): Event name or round number (e.g., "Monaco" or "7")
  • session_name (string): Session name (e.g., "Race", "Qualifying", "Sprint", "FP1", "FP2", "FP3")

Get Driver Information

Access information about a specific Formula One driver.

Parameters:

  • year (number): Season year (e.g., 2023)
  • event_identifier (string): Event name or round number (e.g., "Monaco" or "7")
  • session_name (string): Session name (e.g., "Race", "Qualifying", "Sprint", "FP1", "FP2", "FP3")
  • driver_identifier (string): Driver identifier (number, code, or name; e.g., "44", "HAM", "Hamilton")

Analyze Driver Performance

Analyze a driver's performance in a Formula One session.

Parameters:

  • year (number): Season year (e.g., 2023)
  • event_identifier (string): Event name or round number (e.g., "Monaco" or "7")
  • session_name (string): Session name (e.g., "Race", "Qualifying", "Sprint", "FP1", "FP2", "FP3")
  • driver_identifier (string): Driver identifier (number, code, or name; e.g., "44", "HAM", "Hamilton")

Compare Drivers

Compare performance between multiple Formula One drivers.

Parameters:

  • year (number): Season year (e.g., 2023)
  • event_identifier (string): Event name or round number (e.g., "Monaco" or "7")
  • session_name (string): Session name (e.g., "Race", "Qualifying", "Sprint", "FP1", "FP2", "FP3")
  • drivers (string): Comma-separated list of driver codes (e.g., "HAM,VER,LEC")

Get Telemetry Data

Access telemetry data for a specific Formula One lap.

Parameters:

  • year (number): Season year (e.g., 2023)
  • event_identifier (string): Event name or round number (e.g., "Monaco" or "7")
  • session_name (string): Session name (e.g., "Race", "Qualifying", "Sprint", "FP1", "FP2", "FP3")
  • driver_identifier (string): Driver identifier (number, code, or name; e.g., "44", "HAM", "Hamilton")
  • lap_number (number, optional): Lap number (gets fastest lap if not provided)

Get Championship Standings

Retrieve Formula One championship standings.

Parameters:

  • year (number): Season year (e.g., 2023)
  • round_num (number, optional): Round number (gets latest standings if not provided)

Example Usage

Once the server is properly configured and running, you can use these tools with Cline to access Formula One data.

Here are some example queries you can make:

  • "Show me the 2023 Formula One race calendar"
  • "Get the results from the 2022 Monaco Grand Prix"
  • "Compare Hamilton and Verstappen's performance in the 2021 British Grand Prix"
  • "Show me the telemetry data from Leclerc's fastest lap in the 2023 Italian Grand Prix qualifying"
  • "What are the current F1 championship standings?"

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "formula1" '{"command":"node","args":["/Users/rakeshgangwar/Documents/Cline/MCP/f1-mcp-server/build/index.js"],"disabled":false,"autoApprove":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "formula1": {
            "command": "node",
            "args": [
                "/Users/rakeshgangwar/Documents/Cline/MCP/f1-mcp-server/build/index.js"
            ],
            "disabled": false,
            "autoApprove": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "formula1": {
            "command": "node",
            "args": [
                "/Users/rakeshgangwar/Documents/Cline/MCP/f1-mcp-server/build/index.js"
            ],
            "disabled": false,
            "autoApprove": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later