Skip to main content
Glama
virendhanwani

f1-mcp

f1-mcp

An MCP server exposing Formula 1 historical data (results, qualifying, pit stops, and championship standings) as tools an LLM can call directly — built on the Jolpica-F1 API.

Tools (more to be added)

Tool

Description

get_race_results

Race results by season + round number

get_race_results_by_name

Race results by season + race/circuit name (e.g. "Monaco")

get_qualifying_results

Qualifying results by season + round

get_pit_stops

Pit stop log for a race (2011 season onward)

get_driver_standings

Drivers' championship standings for a season

get_constructor_standings

Constructors' championship standings for a season

Related MCP server: MCP Server F1Data

Setup

python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

Running it

Standalone, with MCP Inspector (for testing tools/prompts manually):

npx @modelcontextprotocol/inspector python src/server.py

With Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "f1-mcp": {
      "command": "python",
      "args": ["/absolute/path/to/f1-mcp/src/server.py"]
    }
  }
}

Design notes

  • client.py is the only file that touches raw Jolpica JSON. Every method returns a typed schemas.py model — tool functions never parse MRData.* nesting directly.

  • Name-based race lookup (get_race_results_by_name) resolves a loose name ("Monaco", "Monaco GP") against the season's race calendar using substring matching first, with a fuzzy fallback (difflib) for typos — since the Ergast/ Jolpica API only supports lookup by round number.

  • Season schedules are cached per-session to avoid refetching the calendar on every name-based lookup.

Data source

Jolpica-F1 — free, no API key required. Historical race data from 1950 onward; pit stop data from 2011 onward.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables access to Formula 1 data from the openF1.org API, including driver information, race results, lap times, telemetry, pit stops, weather conditions, and live position data across multiple seasons.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Formula 1 data through LLM interfaces like Claude. Provides access to F1 information including circuits, constructors, drivers, grand prix, manufacturers, races, and seasons.
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides live Formula 1 data such as driver standings, race results, and schedule for the current season, enabling users to ask about F1 without stale training data.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query real-time and historical Formula 1 data through the OpenF1 API, providing tools for driver info, lap times, telemetry, race events, and more.
    MIT