Deployment
This page covers running bluelink-mcp as a long-running Docker service, which suits a server shared by several clients. For a single machine, Homebrew or another install from Running without Docker is simpler: your MCP client starts the server over stdio, and it opens no port.
Docker Compose
Section titled “Docker Compose”mkdir bluelink-mcp && cd bluelink-mcpcurl -fsSLO https://raw.githubusercontent.com/mattoddie/bluelink-mcp/main/compose.yamlcurl -fsSL https://raw.githubusercontent.com/mattoddie/bluelink-mcp/main/example.env -o .env# Edit .envdocker compose up -ddocker compose logs -fThe compose.yaml runs the image from GHCR with restart: unless-stopped, publishes port 8080 and mounts a named volume at /data. To build from source instead, clone the repository and replace image: with build: ..
The image:
- runs as an unprivileged user (UID 1000)
- serves Streamable HTTP on port 8080, with
/mcpfor MCP and/healthfor health checks - has a Docker
HEALTHCHECKon/health - is built for
linux/amd64andlinux/arm64, so it runs on a Raspberry Pi or NAS too
The data volume
Section titled “The data volume”The volume at /data holds tokens.json, the cached Bluelink login. Keep it: without it, every restart logs in again, and frequent logins can get a Bluelink account temporarily blocked.
The file contains your session tokens, which work like a login until they expire, but not your password or PIN. Don’t back it up anywhere less safe than your .env.
Image tags
Section titled “Image tags”| Tag | What it is |
|---|---|
X.Y.Z |
An exact release. Never changes. |
X.Y |
The latest patch of a minor version |
X |
The latest release of a major version (from 1.0.0) |
latest |
The latest stable release |
Pin X.Y.Z or X.Y for predictable upgrades. Pre-releases (1.2.0-rc.1) are only published under their exact version.
Upgrading
Section titled “Upgrading”docker compose pulldocker compose up -dCheck the changelog first. Because the HTTP endpoint is stateless, clients carry on after a restart without reconnecting.
Reverse proxy with TLS
Section titled “Reverse proxy with TLS”Bearer tokens and car commands shouldn’t cross a network in plain text. If clients connect from other machines, put a TLS-terminating proxy in front and set MCP_ALLOWED_HOSTS to the public host name.
Caddy:
bluelink.example.com { reverse_proxy bluelink-mcp:8080}nginx:
location / { proxy_pass http://bluelink-mcp:8080; proxy_http_version 1.1; proxy_set_header Host $host; proxy_buffering off; # MCP responses can stream proxy_read_timeout 120s; # commands can wait ~60 s for the car}Then point clients at https://bluelink.example.com/mcp.
Hardening
Section titled “Hardening”- Keep
BLUELINK_ALLOW_UNLOCKoff unless you really need it. See Security. - Publish the port only on the interface you need, for example
127.0.0.1:8080:8080behind a local proxy. - Pass secrets as files rather than environment variables, with Compose
secrets:andBLUELINK_PASSWORD_FILE,BLUELINK_PIN_FILEandMCP_AUTH_TOKEN_FILE. - Add
read_only: trueandcap_drop: [ALL]to the Compose service. The server writes only to/data. - Keep
.envreadable only by you:chmod 600 .env.
Running without Docker
Section titled “Running without Docker”Outside Docker, the login token is cached in ~/.config/bluelink-mcp/tokens.json (see BLUELINK_TOKEN_FILE in Configuration).
With Homebrew
Section titled “With Homebrew”On macOS or Linux:
brew install mattoddie/tap/bluelink-mcpThis installs bluelink-mcp and its dependencies into a private virtualenv with Homebrew’s Python, from the release’s wheel and hash-locked requirements file. brew upgrade picks up new versions. See the tap for details.
With pip
Section titled “With pip”Each release has a wheel and a requirements.txt that pins every dependency with its hash. With Python 3.12 or later:
VERSION=1.2.3 # the latest release, without the vbase=https://github.com/mattoddie/bluelink-mcp/releases/download/v$VERSIONcurl -fsSLO $base/bluelink_mcp-$VERSION-py3-none-any.whlcurl -fsSLO $base/bluelink-mcp-$VERSION-requirements.txtpython3 -m venv ~/.local/share/bluelink-mcp~/.local/share/bluelink-mcp/bin/pip install --require-hashes -r bluelink-mcp-$VERSION-requirements.txt~/.local/share/bluelink-mcp/bin/pip install --no-deps bluelink_mcp-$VERSION-py3-none-any.whl~/.local/share/bluelink-mcp/bin/bluelink-mcp versionThe release’s SHA256SUMS file and build provenance attestations cover both files (gh attestation verify <file> -R mattoddie/bluelink-mcp).
From a clone
Section titled “From a clone”You need Python 3.12+ and uv:
git clone https://github.com/mattoddie/bluelink-mcp && cd bluelink-mcpuv sync --no-devMCP_TRANSPORT=http MCP_AUTH_TOKEN=... BLUELINK_USERNAME=... BLUELINK_PASSWORD=... uv run bluelink-mcpHowever you install it, run it under systemd or another supervisor to keep it running in HTTP mode, or let your MCP client start it over stdio.