Configuration
bluelink-mcp is configured entirely with environment variables. With Docker Compose, put them in .env (start from example.env). With uv, pass them from your MCP client’s config. The Claude Desktop extension sets them from its settings form.
Your account
Section titled “Your account”The variables all start with BLUELINK_, whatever the brand. For a Kia, use your Kia Connect login and set BLUELINK_BRAND=kia.
| Variable | Default | Description |
|---|---|---|
BLUELINK_USERNAME |
(required) | The email address you log in to the Bluelink, Kia Connect or Genesis Connect app with |
BLUELINK_PASSWORD |
(required) | Your app password. Or put it in a file and set BLUELINK_PASSWORD_FILE to its path. |
BLUELINK_PIN |
Your 4-digit app PIN. Europe and Canada need it for remote commands. Reads work without it. Or use BLUELINK_PIN_FILE. |
|
BLUELINK_REGION |
europe |
Which regional service to use. See Choosing a region. |
BLUELINK_BRAND |
hyundai |
Which car maker’s service to use: hyundai (Bluelink), kia (Kia Connect, formerly UVO) or genesis (Genesis Connect) |
BLUELINK_LANGUAGE |
en |
Language for the service’s responses (Europe only), such as en, de, fr, nl |
BLUELINK_GEOCODE |
false |
Look up a street address for the car’s location with OpenStreetMap. This sends the car’s full coordinates to OpenStreetMap’s Nominatim service. Needs BLUELINK_ALLOW_LOCATION=true; the server refuses to start otherwise. |
Choosing a region
Section titled “Choosing a region”BLUELINK_REGION |
Service |
|---|---|
europe |
Bluelink, Kia Connect and Genesis Connect Europe, including the UK. Start here in Europe. |
europe-cci |
Hyundai’s and Kia’s newer EU backend, used by the newer apps on some recent cars. Try this if europe fails. |
usa |
USA |
canada |
Canada |
australia |
Australia |
nz |
New Zealand (Kia only) |
india |
India |
china |
China |
brazil |
Brazil (Hyundai only) |
The region must match where your account was created, not where the car is now. A brand the region doesn’t support (such as hyundai with nz or kia with brazil) stops the server at startup. See Compatibility for what each region supports.
Access levels
Section titled “Access levels”| Variable | Default | Description |
|---|---|---|
BLUELINK_ALLOW_WRITES |
false |
Register the command tools: lock, climate, charging, horn and lights and the others in the tool reference (all but unlock) |
BLUELINK_ALLOW_LOCATION |
false |
Register bluelink_get_vehicle_location, which tells the assistant where the car is. Off by default, because the location reveals where you live, work and park. Other tools never return the location. |
BLUELINK_LOCATION_PRECISION |
4 |
How many decimal places of latitude and longitude bluelink_get_vehicle_location returns, from 0 to 15. 4 is about 10 m, enough to find the car; 3 is about 100 m, 2 about 1 km. The street address from BLUELINK_GEOCODE isn’t rounded. |
BLUELINK_ALLOW_UNLOCK |
false |
Also register bluelink_unlock_vehicle. Needs BLUELINK_ALLOW_WRITES=true; the server refuses to start otherwise. Each unlock also needs your confirmation; see Unlocking. |
Tools that aren’t allowed are not registered at all, so the assistant can’t see them, let alone call them. The tool reference shows which setting each tool needs.
Keeping the tool list small
Section titled “Keeping the tool list small”Most clients load every registered tool’s definition into the model’s context. bluelink-mcp is small, and the switches above decide how much of it is registered:
| Settings | Tools | tools/list size |
|---|---|---|
| Defaults (read-only) | 6 | 4.2 KB |
BLUELINK_ALLOW_LOCATION=true |
7 | 4.7 KB |
BLUELINK_ALLOW_WRITES=true |
13 | 11.8 KB |
| Writes, unlock and location all on | 15 | 13.9 KB |
Sizes are of the tools/list result, measured with the server over stdio. Turn on only what you use: besides keeping the context small, a tool that isn’t registered can’t be misused.
Audit log
Section titled “Audit log”| Variable | Default | Description |
|---|---|---|
BLUELINK_AUDIT_LOG |
(off) | Record every call of a tool that acts on the car. A file path appends JSON Lines to that file, which is created with mode 0600 if it doesn’t exist (~ is expanded). stderr writes the lines to standard error, next to the server’s other logs. |
Each line is one call of a command tool (bluelink_lock_vehicle, bluelink_unlock_vehicle, bluelink_start_climate, bluelink_stop_climate, bluelink_start_charging, bluelink_stop_charging, bluelink_set_charge_limits, bluelink_flash_hazard_lights, bluelink_sound_horn_and_flash_lights and the others marked write in the tool reference) or of bluelink_refresh_vehicle_status, which wakes the car. Calls that failed or were refused, such as an unlock the user didn’t confirm or a command sent again too soon, are logged too. Reads aren’t logged.
{"time":"2026-10-22T07:41:09.512Z","tool":"bluelink_start_climate","arguments":{"vehicle":null,"temperature":21,"duration_minutes":10,"defrost":false,"heated_rear_window_and_mirrors":false,"heated_steering_wheel":false,"front_left_seat":null,"front_right_seat":null,"rear_left_seat":null,"rear_right_seat":null,"wait":true},"result":{"vehicle":"Santa Fe","action_id":"5c1f…","status":"success"},"outcome":"ok"}| Field | Meaning |
|---|---|
time |
When the call finished, in UTC (RFC 3339). |
tool |
The tool name. |
arguments |
The arguments, with defaults filled in. confirm (unlock’s confirmation) is [redacted], and a VIN given as vehicle is cut to its last 6 characters. |
result |
For a successful call: the car’s name, the command’s action_id and its status. Nothing else from the result is logged, so the log never holds the car’s location, VIN or status. |
outcome |
ok or error. |
error |
The error message, when outcome is error. |
The server checks at startup that it can write to the file, and refuses to start if the directory doesn’t exist or isn’t writable. A write that fails later doesn’t stop the tool call: the server logs one warning and carries on. The file is opened for each entry, so it can be rotated by moving it away; the next entry creates a new one.
In Docker, put the log on the data volume, for example BLUELINK_AUDIT_LOG=/data/audit.jsonl, or use BLUELINK_AUDIT_LOG=stderr to see the lines in docker compose logs.
Data freshness
Section titled “Data freshness”| Variable | Default | Description |
|---|---|---|
BLUELINK_CACHE_SECONDS |
60 |
How long a status read from Bluelink is reused before asking again. This saves API calls when the assistant asks for status and location one after the other. |
BLUELINK_MIN_REFRESH_MINUTES |
10 |
Minimum time between bluelink_refresh_vehicle_status calls for each car. Waking the car uses its 12V battery and counts against the daily API limit. At least 1. |
BLUELINK_MIN_COMMAND_SECONDS |
60 |
Minimum time before the same command (such as bluelink_lock_vehicle) can be sent to the same car again. A failed attempt counts too. 0 turns it off. |
See Cached and live data for what these mean in practice.
Token cache
Section titled “Token cache”| Variable | Default | Description |
|---|---|---|
BLUELINK_TOKEN_FILE |
$XDG_CONFIG_HOME/bluelink-mcp/tokens.json (usually ~/.config/bluelink-mcp/tokens.json); /data/tokens.json in the Docker image |
Where to cache the Bluelink login. Set it to an empty value to turn caching off. |
BLUELINK_LOGIN_RETRY_MINUTES |
5 |
After Bluelink rejects a login (or asks for a one-time passcode), how long to wait before trying again. Network errors don’t start the wait. Until then, tools return an error without contacting Bluelink. 0 turns the wait off. |
Bluelink can temporarily block accounts that log in too often, so the server saves its session and reuses it until it expires, then refreshes it. The file is written with mode 0600. It contains session tokens (but not your password or PIN), which are enough to use your Bluelink account until they expire, so protect it like a password. A cache written for a different username, or one that can’t be read, is ignored.
The server always uses the password and PIN you configured, so after changing your password you only need to update BLUELINK_PASSWORD and restart. A cache written by an older version that still holds the password and PIN is rewritten without them. If a login is rejected, the server deletes the cache and waits BLUELINK_LOGIN_RETRY_MINUTES before logging in again, so a wrong password can’t lock the account by retrying on every request.
MCP transport
Section titled “MCP transport”| Variable | Default | Description |
|---|---|---|
MCP_TRANSPORT |
stdio; http in the Docker image |
stdio or http (Streamable HTTP) |
LOG_LEVEL |
info |
debug, info, warning or error. Logs go to stderr. debug also shows the Bluelink library’s logging, which includes tokens, the VIN and the location; see Troubleshooting. |
MCP_HTTP_HOST |
127.0.0.1; 0.0.0.0 in the Docker image |
Address to listen on |
MCP_HTTP_PORT |
8080 |
Port to listen on |
MCP_AUTH_TOKEN |
Bearer token clients must send. Required for http, and at least 16 characters; the server refuses to start otherwise. Generate one with openssl rand -hex 32. Or use MCP_AUTH_TOKEN_FILE. |
|
MCP_ALLOWED_HOSTS |
localhost, 127.0.0.1 and [::1] when listening on loopback |
Comma-separated allow-list of Host header values, for DNS rebinding protection, such as bluelink.example.com,192.168.1.20:8080. An entry without a port matches any port. Set it whenever the server listens on another address, as in the Docker image. |
MCP_ALLOWED_ORIGINS |
Optional comma-separated list of extra Origin values browsers may call from, such as https://claude.ai. Needs MCP_ALLOWED_HOSTS. |
The HTTP server serves the MCP endpoint at /mcp (POST only, with a JSON body of up to 4 MiB) and an unauthenticated health check at /health. bluelink-mcp healthcheck exits 0 when /health answers, for Docker’s HEALTHCHECK. bluelink-mcp version prints the version.
An empty variable counts as not set. So does a variable whose whole value is a placeholder such as ${user_config.pin}, which MCP Bundle hosts like Claude Desktop pass on unchanged when an optional setting is left empty.
BLUELINK_PASSWORD, BLUELINK_PIN and MCP_AUTH_TOKEN can each be read from a file instead, such as a Docker secret: set BLUELINK_PASSWORD_FILE, BLUELINK_PIN_FILE or MCP_AUTH_TOKEN_FILE to its path. Set the variable or its _FILE version, not both.
Requests whose Host header isn’t on the allowed list are rejected with 421. Without MCP_ALLOWED_HOSTS, the list is localhost, 127.0.0.1 and [::1] (any port) when MCP_HTTP_HOST is a loopback address. On any other address, such as 0.0.0.0 in the Docker image, there’s no list to check against: any Host is accepted (the bearer token still guards every request), browser requests are refused, and the server logs a warning at startup. Requests that carry an Origin header (browser-based clients do; command-line and desktop clients usually don’t) are rejected with 403 unless the origin is on an allowed host or listed in MCP_ALLOWED_ORIGINS. For origins, a host entry without a port allows only the default port (https://bluelink.example.com); list host:port for others. Entries in MCP_ALLOWED_ORIGINS may give the default port or leave it out (https://claude.ai:443 and https://claude.ai are the same). An empty or null origin is always rejected. A port wildcard such as localhost:* or http://localhost:* is allowed in both lists.
The server accepts at most 32 connections at a time (more get 503) and closes idle keep-alive connections after 5 seconds.
Example configs
Section titled “Example configs”Read-only, UK Hyundai, Docker (the defaults):
BLUELINK_PASSWORD=your-passwordBLUELINK_PIN=1234MCP_AUTH_TOKEN=3f9c... # openssl rand -hex 32Commands on, US Hyundai, with location and addresses:
BLUELINK_PASSWORD=your-passwordBLUELINK_PIN=1234BLUELINK_REGION=usaBLUELINK_ALLOW_LOCATION=trueBLUELINK_GEOCODE=trueBLUELINK_ALLOW_WRITES=trueKia in the UK or Europe, with commands:
BLUELINK_PASSWORD=your-passwordBLUELINK_PIN=1234BLUELINK_BRAND=kiaBLUELINK_REGION=europe # or europe-cci if login failsBLUELINK_ALLOW_WRITES=trueKia in the USA:
BLUELINK_PASSWORD=your-passwordBLUELINK_PIN=1234BLUELINK_BRAND=kiaBLUELINK_REGION=usa