Metadata-Version: 2.4
Name: f1-mcp
Version: 0.1.1
Summary: MCP server for Formula 1 data - provides F1 telemetry, race results, standings, and analytics for Claude Desktop
Author-email: Rajat <driven.rajat@gmail.com>
License: MIT
License-File: LICENSE
Keywords: claude,f1,formula1,mcp,racing,telemetry
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.10
Requires-Dist: fastf1>=3.0.0
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# F1 MCP Server

<!-- mcp-name: io.github.drivenrajat/f1 -->

A Model Context Protocol (MCP) server that provides comprehensive Formula 1 data and analytics for Claude Desktop integration.

## Features

This server exposes 36+ tools for accessing F1 data:

### Race Data
- Race results and classifications
- Sprint race results
- Qualifying progression (Q1, Q2, Q3)
- Grid vs finish comparisons
- DNF lists and retirement reasons

### Telemetry & Analysis
- Speed trace comparisons between drivers
- Gear shift visualizations
- Brake and throttle analysis
- RPM and engine data
- DRS usage patterns

### Timing & Laps
- Fastest lap data with sector times
- Lap-by-lap timing
- Deleted laps (track limits)
- Lap consistency statistics
- Personal best laps

### Strategy
- Tire compound analysis
- Stint breakdowns
- Pit stop data and fastest stops
- Starting tire choices
- Strategy comparisons

### Standings & History
- Driver championship standings
- Constructor standings
- Historical race winners
- Track records

### Live Data
- Live session status
- Real-time positions
- Live lap times
- Live telemetry
- Current weather conditions

### Other
- Team radio links
- Race control messages
- Track status (flags, safety car)
- Weather data
- Circuit information

## Installation

### Prerequisites

- Python 3.10 or higher
- Claude Desktop

### Setup

1. Clone this repository:
```bash
git clone https://github.com/drivenrajat/f1.git
cd f1
```

2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -e .
```

### Configure Claude Desktop

Add this server to your Claude Desktop MCP configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "f1": {
      "command": "python",
      "args": ["/path/to/f1/f1_server.py"]
    }
  }
}
```

Or if using uv:

```json
{
  "mcpServers": {
    "f1": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/f1", "python", "f1_server.py"]
    }
  }
}
```

## Usage

Once configured, you can ask Claude questions like:

- "Show me the 2024 F1 calendar"
- "Get the race results from Monaco 2024"
- "Compare telemetry between Verstappen and Norris at Silverstone qualifying"
- "What was Hamilton's tire strategy at Spa?"
- "Show me the current driver standings"
- "Get the fastest pit stops from the Italian GP"

## Data Sources

- **FastF1**: Historical telemetry, lap times, and session data
- **Ergast API**: Championship standings and historical results
- **OpenF1 API**: Team radio recordings

## Caching

The server automatically caches FastF1 data in a `cache` directory to improve performance on repeated queries.

## License

MIT License - see [LICENSE](LICENSE) for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
