Security
bluelink-mcp can find, lock, unlock and pre-condition a real car. This page explains the risks and how the server limits them, so you can choose a setup you’re comfortable with.
What’s at stake
Section titled “What’s at stake”| Asset | Risk if exposed |
|---|---|
| Your Bluelink or Kia Connect password and PIN | Full control of the car through the official app, from anywhere |
The token cache (tokens.json) |
A working Bluelink session until it expires (it doesn’t hold your password or PIN) |
| The car’s location | Where you live, work and park |
| Remote commands | Unlocking the car; draining the battery with climate; stopping a charge you needed |
MCP_AUTH_TOKEN |
Whatever tools the server has registered |
Layers of protection
Section titled “Layers of protection”- Read-only by default. Command tools aren’t registered unless
BLUELINK_ALLOW_WRITES=true. A tool that isn’t registered can’t be called, whatever the model is told. - Location is off by default.
bluelink_get_vehicle_locationisn’t registered unlessBLUELINK_ALLOW_LOCATION=true, and no other tool returns the car’s position. When it’s on, coordinates are rounded toBLUELINK_LOCATION_PRECISIONdecimal places (4, about 10 m). - Unlock has its own switch.
bluelink_unlock_vehiclealso needsBLUELINK_ALLOW_UNLOCK=true. Locking, climate and charging are useful day to day, and unlocking rarely is, so most people should leave it off. - Tool annotations. Reads are marked read-only, commands and
bluelink_refresh_vehicle_status(which wakes the car) as not read-only, and unlock as destructive, so clients that support annotations, such as Claude Code, ask before running commands unless you’ve allowed them. - Bearer token for HTTP. The server won’t start in HTTP mode without an
MCP_AUTH_TOKENof at least 16 characters, and the token is compared in constant time. Only/healthis open. Secrets can come from files (_FILEvariables) instead of the environment. - DNS rebinding protection. Requests with unexpected
Hostheaders are rejected: those inMCP_ALLOWED_HOSTS, or only loopback names when the server listens on loopback. On another address withoutMCP_ALLOWED_HOSTS, anyHostis accepted (the bearer token still applies) and the server warns at startup, so set it. Browser origins must be on an allowed host or inMCP_ALLOWED_ORIGINS; other origins, including empty andnullones, are always rejected./mcptakes onlyPOSTrequests with a JSON body of up to 4 MiB, and the server limits concurrent connections. - Rate-limited wake-ups.
bluelink_refresh_vehicle_statuscan’t be called in a loop to drain the 12V battery. - Secrets stay out of output. Tools never return the password, PIN or tokens, and configuration is redacted when printed. Errors from Bluelink are reported as fixed messages with the error type, not the raw response; details go to the log at debug level. The Bluelink library logs whole responses, some at error level, so its logging is shown only with
LOG_LEVEL=debug. The token cache is written with mode0600and doesn’t contain the password or PIN. - No login loops. After Bluelink rejects a login or asks for a one-time passcode, the server discards the token cache and doesn’t try again for
BLUELINK_LOGIN_RETRY_MINUTES, so a wrong or changed password can’t get the account locked. - Unlock picks the car exactly. With several cars on the account,
bluelink_unlock_vehicleneeds the exact name, VIN or ID; part of a name isn’t enough. - Unlock asks you, on the server side. Clients that support MCP elicitation show you a question from the server, and nothing is unlocked unless you say yes. With other clients, the assistant has to call again with the car’s name or VIN ending in
confirm, after checking with you. That second step can’t stop a model that ignores its instructions, so keep your client’s approval prompt on as well. See Unlocking. - Audit log. With
BLUELINK_AUDIT_LOGset, every command and live refresh, including failed and refused ones (an unlock refused before the user is even asked, too), is appended to a JSON Lines file (mode0600) with its arguments and outcome. The unlock confirmation is redacted, VINs are shortened (in error messages too), and nothing from the car’s status or location is written. See Audit log. - Rate-limited commands. The same command can’t be sent to the same car again within
BLUELINK_MIN_COMMAND_SECONDS(60), so a looping assistant can’t flood the car or the account’s daily API quota. - Windows only close. There’s a tool to close the windows but deliberately none to open them, since an open window is as good as an unlocked door.
Prompt injection
Section titled “Prompt injection”An AI assistant can be tricked by text it reads, such as a web page, an email or a file, into calling tools you didn’t ask for. bluelink-mcp’s tools return only data from Bluelink (and OpenStreetMap, with geocoding on), but your assistant may have other tools that read untrusted content in the same conversation.
Some of what the tools return comes from people or services other than you, so treat it as untrusted text, not instructions:
- Car names come from the nickname set in the app, which anyone with access to the account can change.
- Addresses from
BLUELINK_GEOCODEcome from OpenStreetMap’s Nominatim, whose place names are edited by the public. - Warning and fault descriptions come from Bluelink.
A well-behaved assistant won’t follow instructions found in tool results, but this is one more reason to keep confirmations on for commands.
To limit the impact:
- Keep commands off if you only want to ask questions.
- Keep unlock off.
- Don’t auto-approve command tools in your client. Let it ask each time.
- Use a separate Bluelink or Kia Connect account shared from the app, so you can revoke its access without changing your own password.
Recommended setups
Section titled “Recommended setups”| You want to | Settings |
|---|---|
| Ask about the car | Defaults. Nothing else needed. |
| Also ask where it is | BLUELINK_ALLOW_LOCATION=true (and lower BLUELINK_LOCATION_PRECISION if you don’t need it to the street) |
| Pre-heat and manage charging | BLUELINK_ALLOW_WRITES=true |
| Everything, including unlock | BLUELINK_ALLOW_WRITES=true, BLUELINK_ALLOW_UNLOCK=true, stdio or a VPN only, and approve each call |
Checklist
Section titled “Checklist”-
.envandtokens.json(which holds your session tokens) are readable only by you -
MCP_AUTH_TOKENis long and random (openssl rand -hex 32) - The HTTP port isn’t reachable from the internet, or is behind TLS
-
BLUELINK_ALLOW_UNLOCKis off unless you need it -
BLUELINK_ALLOW_LOCATIONis off unless you need it - With commands on,
BLUELINK_AUDIT_LOGrecords what the assistant did - Your client asks before running command tools
- You know how to change your Bluelink or Kia Connect password if something leaks
To report a vulnerability in bluelink-mcp, see the security policy.