Skip to main content
Glama
Renault MCP server

Renault MCP server

by Quinus
README.md
# Renault MCP server

Ask your AI assistant where your car is or get the cabin ready before you leave. This unofficial [Model Context Protocol](https://modelcontextprotocol.io/) server connects an MCP client to a My Renault account.

> **Unofficial project:** This server uses private Renault APIs and is not affiliated with Renault. API behavior may change without notice.

## What you can do

| Tool | What it does | Example request |
| --- | --- | --- |
| `list_vehicles` | List linked vehicles and VINs. | “Which vehicles are on my account?” |
| `get_vehicle_location` | Get the last reported location and a map link. | “Where is my car?” |
| `get_battery_status` | Get battery, electric range and charging status. | “Is my car charging?” |
| `get_vehicle_cockpit` | Get mileage and, where available, fuel level and range. | “What is my mileage?” |
| `get_lock_status`, `get_tyre_pressure` | Read reported door, lock and tyre information. | “Is the car locked?” |
| `get_preheat_status`, `get_climate_schedule` | Read climate status and schedules. | “When is the car set to warm up?” |
| `get_charging_settings`, `get_charging_history` | Read charging settings, schedules and recorded sessions. | “When did the car last charge?” |
| `get_vehicle_contracts`, `get_vehicle_capabilities` | Check contracts and known model compatibility. | “Which features does my car support?” |
| `preheat_vehicle`, `stop_preheating` | Start or stop cabin preconditioning. | “Warm the car to 22°C.” |
| `set_climate_schedule` | Replace recurring preconditioning schedules. | “Set a weekday climate schedule.” |
| `start_charging`, `stop_charging` | Start or stop charging, where supported. | “Start charging the car.” |
| `set_charging_schedule`, `set_charging_mode`, `set_charge_limits` | Change charging programs, mode or battery limits. | “Set a charging target.” |
| `flash_vehicle_lights`, `sound_vehicle_horn` | Flash the lights or sound the horn. | “Flash the car’s lights.” |
| `refresh_vehicle_location` | Request a new position from the car. | “Refresh the car’s location.” |

Features and returned fields depend on the model, account and active connected services. Data may be stale. `get_vehicle_capabilities` reports upstream model information: “unknown” means unverified, while “supported” does not guarantee a live service is available. A command accepted by Renault is not confirmation that the vehicle completed it.

Schedule tools replace the complete schedule and require `confirm: true` after the user has reviewed it. Supply every day for each program, using `null` for inactive days; times use Renault’s UTC format, such as `T07:30Z`, and charging duration is in minutes. A recurring UTC time can shift in local time when daylight saving changes. On some models `start_charging` disables existing charging programs; the tool requires the user’s confirmation through `allowScheduleChanges: true` before doing so.

## Get started on your VPS

You need Docker with the Compose plugin and a My Renault account with a connected vehicle. Features depend on the model, connected services, and Renault's API. The defaults are set for Belgium (`nl_BE`).

Clone this repository on the VPS, then create your configuration:

```bash
cd /path/to/renault-mcp
cp .env.example .env
openssl rand -hex 32
```

Set `RENAULT_IMAGE` in `.env` to `ghcr.io/quinus/renault-mcp:latest`, and put the generated token in `MCP_HTTP_TOKEN`. Adjust the Renault country and locale if needed. Keep `.env` private. Pull the image and sign in interactively:

```bash
docker compose pull
docker compose run --rm renault-mcp node dist/cli/login.js
docker compose run --rm renault-mcp node dist/cli/status.js
```

The login supports email verification codes. It stores a Renault refresh token in the named Docker volume `renault-data`, not your password. If your account has several vehicles, set `RENAULT_VIN` in `.env` or supply a VIN to each tool call.

Start the service:

```bash
docker compose up -d
docker compose logs -f renault-mcp
```

Docker restarts the service automatically. Preserve the `renault-data` volume when updating or moving the service; deleting it signs you out. To update after a new image is published, run `docker compose pull` followed by `docker compose up -d`. See [Host on a VPS](#host-on-a-vps) for HTTPS and client access.

## Publishing the image

A push or merge into `main` runs the GitHub Actions workflow, which builds and tests the project before publishing Linux AMD64 and ARM64 images to `ghcr.io/<owner>/<repository>`. It publishes `latest` and `sha-<full-commit-sha>` tags. The image name is lowercase. You can also run the workflow manually from the Actions tab with `main` selected.

The workflow uses the repository's `GITHUB_TOKEN` with package write permission; no separate publishing secret is needed. The package may initially be private. Make it public in GitHub Packages if the VPS should pull without credentials; otherwise sign in on the VPS with `docker login ghcr.io` using a GitHub token that can read the package. For a repeatable deployment, set `RENAULT_IMAGE` to a specific SHA tag instead of `latest`.

## Configuration

Docker Compose passes values from `.env` to the container. When running Node commands directly, they also load `.env` from the current working directory. Existing environment variables take priority over values in the file.

| Variable | Default | Purpose |
| --- | --- | --- |
| `MCP_HTTP_TOKEN` | Required for HTTP | Bearer token used to protect the MCP endpoint. |
| `HOST` | `0.0.0.0` in Docker | Listen address inside the container; Compose publishes the port only on the VPS loopback interface. |
| `PORT` | `3000` | HTTP listen port. |
| `RENAULT_COUNTRY` | Locale country, normally `BE` | Country associated with the My Renault account. |
| `RENAULT_LOCALE` | `nl_BE` | My Renault locale. Belgian French can use `fr_BE`. |
| `RENAULT_ACCOUNT_ID` | Discovered | Optional account ID from `npm run status`. |
| `RENAULT_VIN` | Discovered when there is one vehicle | Optional 17-character vehicle VIN. |
| `RENAULT_TOKEN_FILE` | `/data/tokens.json` in Docker | Stored refresh token and device identifiers, in the persistent Docker volume. |
| `RENAULT_LOGIN_TOKEN` | Unset | Optional existing Gigya login token, used when no token file exists. |
| `RENAULT_GIGYA_URL` | Renault EU Gigya URL | Authentication endpoint override. |
| `RENAULT_GIGYA_API_KEY` | Built-in EU application key | Authentication application key override. |
| `RENAULT_KAMEREON_URL` | Renault EU Kamereon URL | Vehicle API endpoint override. |
| `RENAULT_KAMEREON_API_KEY` | Built-in EU application key | Vehicle API application key override. |

Copy `.env.example` if you want a configuration template. Export the values you need before running a command.

## Host on a VPS

The container is published only at `http://127.0.0.1:3000/mcp` on the VPS. Every request requires `Authorization: Bearer <token>`. Anyone with the token can access vehicle data and send preconditioning commands, so keep it private.

Put a TLS reverse proxy on the VPS in front of the container. For example, with Caddy installed on the VPS and a domain pointing to it:

```caddyfile
renault.example.com {
    reverse_proxy 127.0.0.1:3000
}
```

Configure DNS and HTTPS for your domain, and allow HTTPS through your firewall. Do not send the token over plain HTTP across the internet. The server implements stateless Streamable HTTP at `/mcp`; clients must support Streamable HTTP and custom authorization headers. OAuth and the older SSE transport are not provided.

## Connect your MCP client

Configure your client with the HTTPS URL `https://renault.example.com/mcp` and an HTTP header:

```text
Authorization: Bearer your-generated-token
```

The exact configuration format depends on the client. Some clients do not support custom headers; they cannot use this token-based endpoint directly. The original stdio transport is still available with `npm start` for local clients.

## Tool call examples

Get the last known position.

```json
{
  "name": "get_vehicle_location",
  "arguments": {}
}
```

Start heating to 21°C now.

```json
{
  "name": "preheat_vehicle",
  "arguments": {
    "temperature": 21
  }
}
```

Schedule heating to 22°C for 07:30 in Brussels time.

```json
{
  "name": "preheat_vehicle",
  "arguments": {
    "temperature": 22,
    "startAt": "2026-12-01T07:30:00+01:00"
  }
}
```

`startAt` must be a future ISO 8601 timestamp with a timezone. Renault receives it in UTC with second precision. Temperatures from 16°C to 30°C are accepted.

## Authentication and token storage

The token file contains a plaintext Gigya refresh token and remembered device identifiers. Treat it like a password. The server creates parent directories with mode `0700`, writes token files with mode `0600`, and replaces files atomically. Back up the Docker volume securely if you need to migrate it.

If authentication expires, run `docker compose run --rm renault-mcp node dist/cli/login.js` again. To sign out, remove the token file from the Docker volume.

## Limitations

- Renault's My Renault and Kamereon APIs are private and unofficial. They can change without notice.
- Location is the last position reported by Renault. It can be stale, especially while the car is parked. A short drive may be needed before a position becomes available.
- A successful preconditioning response means Renault accepted the request. The vehicle still needs connectivity and enough battery charge to carry it out.
- The same preconditioning command heats in cold weather and cools in hot weather. Availability, temperature control, scheduling, and stopping behavior vary by vehicle.
- Support for stopping preconditioning and charging differs between models.
- Known unsupported endpoints follow the [upstream model compatibility data](https://github.com/hacf-fr/renault-api/blob/main/src/renault_api/kamereon/models.py). Unknown models use its default endpoints; Renault may reject unsupported features. This server exposes a selection of the operations in the Python library.
- Automated tests use mocked Renault responses; they do not verify live login or vehicle commands.

## Development

```bash
npm test
npm run build
```

### Source structure

```text
src/
  renault/       Renault authentication, HTTP, accounts, model compatibility and vehicle selection.
  renault/vehicle-operations/  Vehicle reads and commands, grouped by operation.
  mcp/tools/     One registration module per MCP tool, plus shared schemas and JSON results.
  storage/       Token file loading and secure atomic storage.
  cli/           Interactive login, password prompts, and vehicle status commands.
  server.ts      Creates the MCP server and connects its stdio transport with Effect.
  server-runtime.ts  Builds the Effect runtime layers for the MCP server.
  config.ts      Environment configuration and defaults.
  types.ts       Shared public TypeScript data shapes.
  errors.ts      Application error type.
  index.ts       Stdio server entry point.
  http.ts        Authenticated Streamable HTTP endpoint.
  http-index.ts  HTTP server entry point.
test/            Mocked Renault API and MCP protocol tests.
```

The protocol behavior is based on the Python [hacf-fr/renault-api](https://github.com/hacf-fr/renault-api) project. Vehicle capabilities depend on the model and its connected services.

## License and acknowledgements

This project is licensed under the [MIT License](LICENSE). Its Renault API implementation and compatibility data draw on [hacf-fr/renault-api](https://github.com/hacf-fr/renault-api); see the [upstream license and attribution](third-party/renault-api/README.md).

TDQS

B3.3/5.0

Scored across 23 tools

Disambiguation4/5

Most tools target distinct resources and actions, with clear separation between reads, writes, and vehicle commands. The main ambiguity is among charging-related commands such as start_charging, set_charging_mode, and set_charging_schedule, plus stored versus refreshed location, though descriptions largely disambiguate them.

Naming Consistency5/5

All tools use consistent snake_case imperative verb_noun naming with a stable vocabulary. Minor variation between preheat/preheating forms is readable and does not undermine predictability.

Tool Count3/5

23 tools is on the heavy side for a single server, even for a broad vehicle-control domain. Most tools are distinct, but several charging and status reads could potentially be consolidated.

Completeness3/5

The surface covers vehicle listing, status reads, charging and climate controls, schedules, contracts, and capabilities. However, there is no remote lock/unlock command despite get_lock_status explicitly noting that it does not lock or unlock the vehicle, leaving a notable gap.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues