Skip to content

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.

Terminal window
mkdir bluelink-mcp && cd bluelink-mcp
curl -fsSLO https://raw.githubusercontent.com/mattoddie/bluelink-mcp/main/compose.yaml
curl -fsSL https://raw.githubusercontent.com/mattoddie/bluelink-mcp/main/example.env -o .env
# Edit .env
docker compose up -d
docker compose logs -f

The 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 /mcp for MCP and /health for health checks
  • has a Docker HEALTHCHECK on /health
  • is built for linux/amd64 and linux/arm64, so it runs on a Raspberry Pi or NAS too

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.

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.

Terminal window
docker compose pull
docker compose up -d

Check the changelog first. Because the HTTP endpoint is stateless, clients carry on after a restart without reconnecting.

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.

  • Keep BLUELINK_ALLOW_UNLOCK off unless you really need it. See Security.
  • Publish the port only on the interface you need, for example 127.0.0.1:8080:8080 behind a local proxy.
  • Pass secrets as files rather than environment variables, with Compose secrets: and BLUELINK_PASSWORD_FILE, BLUELINK_PIN_FILE and MCP_AUTH_TOKEN_FILE.
  • Add read_only: true and cap_drop: [ALL] to the Compose service. The server writes only to /data.
  • Keep .env readable only by you: chmod 600 .env.

Outside Docker, the login token is cached in ~/.config/bluelink-mcp/tokens.json (see BLUELINK_TOKEN_FILE in Configuration).

On macOS or Linux:

Terminal window
brew install mattoddie/tap/bluelink-mcp

This 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.

Each release has a wheel and a requirements.txt that pins every dependency with its hash. With Python 3.12 or later:

Terminal window
VERSION=1.2.3 # the latest release, without the v
base=https://github.com/mattoddie/bluelink-mcp/releases/download/v$VERSION
curl -fsSLO $base/bluelink_mcp-$VERSION-py3-none-any.whl
curl -fsSLO $base/bluelink-mcp-$VERSION-requirements.txt
python3 -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 version

The release’s SHA256SUMS file and build provenance attestations cover both files (gh attestation verify <file> -R mattoddie/bluelink-mcp).

You need Python 3.12+ and uv:

Terminal window
git clone https://github.com/mattoddie/bluelink-mcp && cd bluelink-mcp
uv sync --no-dev
MCP_TRANSPORT=http MCP_AUTH_TOKEN=... BLUELINK_USERNAME=... BLUELINK_PASSWORD=... uv run bluelink-mcp

However 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.