npm package: @striderlabs/mcp-hertz
Description: Model Context Protocol connector for Hertz car rental
Latest version: 1.0.0

# @striderlabs/mcp-hertz

A Model Context Protocol (MCP) connector for the Hertz car rental service. This connector enables AI assistants (such as Claude) to search for vehicles, manage reservations, look up locations, retrieve rental policies, and check Gold Plus Rewards loyalty status — all through Hertz's website via headless browser automation.

---

## Overview

This connector uses [Playwright](https://playwright.dev/) to drive a headless Chromium browser against `hertz.com`. It exposes 10 MCP tools that cover the full car rental workflow:

- Search available vehicles
- Get detailed vehicle and rate information
- Find nearby Hertz locations
- Create, view, modify, and cancel reservations
- Retrieve rental policies and insurance options
- Add optional extras (GPS, child seats, etc.)
- Check Gold Plus Rewards loyalty status

---

## Prerequisites

- **Node.js** 18 or higher
- **npm** 9 or higher
- Internet access to reach `hertz.com`

---

## Installation

### From the package directory

```bash
npm install
npx playwright install chromium
npm run build
```

### As a global CLI

```bash
npm install -g @striderlabs/mcp-hertz
npx playwright install chromium
```

---

## Configuration

No API keys or environment variables are required. The connector uses public-facing Hertz web pages. Network access to `https://www.hertz.com` must be available from the host running the connector.

Optional environment variables that may influence Playwright behavior:

| Variable | Description |
|---|---|
| `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` | Path to a custom Chromium binary |
| `HTTP_PROXY` / `HTTPS_PROXY` | Proxy server for outbound requests |

---

## Running the Server

```bash
# Development (TypeScript source)
npm run dev

# Production (compiled)
npm run build
npm start
```

The server communicates over **stdio** using the MCP protocol and is designed to be launched by an MCP host such as Claude Desktop.

---

## Claude Desktop Configuration

Add the following to your Claude Desktop `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "hertz": {
      "command": "node",
      "args": ["/path/to/mcp-hertz/dist/index.js"]
    }
  }
}
```

Or, if installed globally:

```json
{
  "mcpServers": {
    "hertz": {
      "command": "mcp-hertz"
    }
  }
}
```

---

## Tools

### 1. `search_vehicles`

Search for available Hertz vehicles at a given location and date range.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `pickup_location` | string | Yes | City name, airport code (e.g. `LAX`), or address |
| `dropoff_location` | string | No | Return location if different from pickup |
| `pickup_date` | string | Yes | ISO date `YYYY-MM-DD` |
| `pickup_time` | string | Yes | 24-hour time `HH:MM` |
| `dropoff_date` | string | Yes | ISO date `YYYY-MM-DD` |
| `dropoff_time` | string | Yes | 24-hour time `HH:MM` |
| `vehicle_class` | enum | No | Economy, Compact, Midsize, Standard, Fullsize, Premium, Luxury, SUV, Van, Truck |
| `driver_age` | number | No | Driver age in years (default: 25) |
| `discount_code` | string | No | Promotional or discount code |

**Returns:** Array of `VehicleResult` objects with make/model, class, transmission, passengers, bags, daily rate, total rate, features, and availability.

---

### 2. `get_vehicle_details`

Retrieve detailed information and rate breakdown for a specific vehicle.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `vehicle_id` | string | Yes | Vehicle ID from `search_vehicles` results |
| `rate_code` | string | No | Rate code for specific pricing |

**Returns:** `VehicleResult` extended with `rate_details` (base rate, taxes, total, cancellation policy).

---

### 3. `get_locations`

Find Hertz rental locations near a city, airport, or set of coordinates.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | Yes | City name, airport code (e.g. `ORD`), or street address |
| `type` | enum | No | `airport`, `city`, or `all` (default: `all`) |
| `latitude` | number | No | Latitude for proximity search |
| `longitude` | number | No | Longitude for proximity search |
| `radius_miles` | number | No | Search radius in miles (default: 25) |

**Returns:** Array of `Location` objects with name, address, city, state, phone, hours, and airport info.

---

### 4. `create_reservation`

Create a new Hertz rental reservation.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `vehicle_id` | string | Yes | Vehicle ID from search results |
| `rate_code` | string | No | Rate code for pricing |
| `pickup_location_id` | string | Yes | Location ID for pickup |
| `dropoff_location_id` | string | No | Location ID for return (defaults to pickup) |
| `pickup_datetime` | string | Yes | ISO datetime e.g. `2025-06-15T10:00:00` |
| `dropoff_datetime` | string | Yes | ISO datetime e.g. `2025-06-20T10:00:00` |
| `driver_first_name` | string | Yes | Driver's first name |
| `driver_last_name` | string | Yes | Driver's last name |
| `driver_email` | string | Yes | Driver's email address |
| `driver_phone` | string | Yes | Driver's phone number |
| `driver_age` | number | No | Driver age in years |
| `discount_code` | string | No | Promotional or discount code |
| `cdp_number` | string | No | Corporate Discount Program number |
| `loyalty_number` | string | No | Hertz Gold Plus Rewards member number |

**Returns:** `Reservation` object with confirmation number, status, vehicle, locations, dates, driver info, and total cost.

---

### 5. `get_reservation`

Look up an existing reservation by confirmation number and last name.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `confirmation_number` | string | Yes | Hertz confirmation number |
| `last_name` | string | Yes | Driver's last name as on the reservation |

**Returns:** `Reservation` object.

---

### 6. `modify_reservation`

Modify an existing reservation (dates, locations, or vehicle class).

| Parameter | Type | Required | Description |
|---|---|---|---|
| `confirmation_number` | string | Yes | Hertz confirmation number |
| `last_name` | string | Yes | Driver's last name |
| `new_pickup_datetime` | string | No | New pickup date/time in ISO format |
| `new_dropoff_datetime` | string | No | New dropoff date/time in ISO format |
| `new_pickup_location_id` | string | No | New pickup location ID |
| `new_dropoff_location_id` | string | No | New dropoff location ID |
| `new_vehicle_class` | enum | No | New vehicle class preference |

**Returns:** Updated `Reservation` object.

---

### 7. `cancel_reservation`

Cancel an existing reservation. Free cancellation is available up to 24 hours before the scheduled pickup.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `confirmation_number` | string | Yes | Hertz confirmation number |
| `last_name` | string | Yes | Driver's last name |
| `reason` | string | No | Optional reason for cancellation |

**Returns:** Object with `success` boolean, `message`, and `confirmation_number`.

---

### 8. `get_rental_policies`

Retrieve Hertz rental policies, insurance options, and fee information.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `location_id` | string | No | Location ID for location-specific policies |
| `vehicle_class` | enum | No | Vehicle class for class-specific notes |
| `country` | string | No | Country code (default: `US`) |

**Returns:** Policy object including minimum age requirements, fuel policy, mileage policy, insurance options, cancellation terms, accepted payment methods, and Gold Plus Rewards information.

---

### 9. `add_extras`

Add optional extras to an existing reservation.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `confirmation_number` | string | Yes | Hertz confirmation number |
| `last_name` | string | Yes | Driver's last name |
| `extras` | array | Yes | Array of `{ extra_id, quantity }` objects |

**Available `extra_id` values:**

| ID | Name | Pricing |
|---|---|---|
| `gps` | Hertz NeverLost GPS | $12.99/day |
| `child_seat` | Child Safety Seat | $13.99/day |
| `booster_seat` | Booster Seat | $9.99/day |
| `additional_driver` | Additional Driver | $13.99/day |
| `rsa_plus` | Roadside Assistance Plus | $5.99/day |
| `wifi` | Wi-Fi Hotspot | $10.99/day |
| `sirius_xm` | SiriusXM Satellite Radio | $8.99 flat |
| `ski_rack` | Ski Rack | $29.99 flat |
| `prepaid_fuel` | Prepaid Fuel Option | $45.00 flat |

**Returns:** Object with updated extras list and new total cost.

---

### 10. `get_loyalty_status`

Check Hertz Gold Plus Rewards loyalty status including tier, points balance, year-to-date rentals, and free day certificates.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `member_id` | string | No | Gold Plus Rewards member ID |
| `email` | string | No | Email address on the account |
| `pin` | string | Yes | Gold Plus Rewards PIN or password |

Note: Either `member_id` or `email` must be provided along with `pin`.

**Returns:** `LoyaltyStatus` object with member ID, name, tier (Gold / Five Star / President's Circle / Platinum), points balance, rentals year-to-date, and free day certificate count.

---

## Notes on Browser Automation

- The connector launches a **headless Chromium** browser via Playwright for each tool call and closes it upon completion.
- Playwright Chromium must be installed separately with `npx playwright install chromium`.
- Each tool call makes a real network request to `hertz.com`. Response times depend on site performance (typically 5–30 seconds).
- Hertz's website uses heavy JavaScript rendering. The connector waits for `networkidle` state before extracting data.
- If the live site returns no parseable DOM data (e.g. due to a site redesign or anti-bot measures), several tools fall back to structured placeholder responses so that the calling agent can continue reasoning.
- Do not use this connector to make real reservations with real payment information without understanding the full booking flow and Hertz's terms of service.

---

## License

MIT