subaru-mcp
Reads cached telematics from MySubaru Connected Services (status, fuel, tire pressure, odometer, locks, location, maintenance, software updates, remote activity, valet/alerts), can wake the car for refresh/locate and remote start/stop, and optionally controls locks, horn, lights, and climate presets for one Subaru.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@subaru-mcp what's my car's fuel level and odometer reading?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
subaru-mcp
An MCP server that lets an AI assistant read,
and carefully control, one Subaru through MySubaru Connected Services. It is
built on subarulink and
FastMCP.
Reads by default. Fuel, odometer, tires, doors, locks, location, maintenance and more, from the copy cached on Subaru's servers. The car is not woken.
Wakes are rationed. Asking the car for fresh data drains its 12V battery, so it sits behind a budget.
Controls are opt-in. Lock, unlock, remote start and the rest do not exist until you turn them on, and unlock needs a second flag.
Never open to the internet without sign-in. Over HTTP, one GitHub account is allowed and nothing else.
Unofficial, and it acts on a real car. This project is not affiliated with or endorsed by Subaru. Subaru publishes no API, so it can break without notice, and using it may be against the MySubaru terms. It can unlock doors and start an engine: read Controls before enabling them. You use it at your own risk.
Status
Built for and run against one car: a 2026 Outback (g4 telematics, USA, Companion+ plan).
Run live | Every read tool, |
Mocks only so far |
|
Untested | Any other model, year or country. Other cars |
An account with more than one vehicle is refused: no tool takes or returns a VIN.
Related MCP server: bluelink-mcp
Requirements
Linux (or WSL) with Python 3.14 and
uv.A MySubaru account with one vehicle. Remote commands and waking the car need a plan with remote services (Companion+) and the account PIN.
Optional: the 1Password CLI for secrets. For HTTP mode: a GitHub account and a tunnel that provides public HTTPS, such as Tailscale Funnel.
Setup
git clone https://github.com/thatapplefreak/subaru-mcp
cd subaru-mcp
uv sync1. Secrets
The server needs SUBARU_USERNAME, SUBARU_PASSWORD and SUBARU_PIN when it
first connects. The recommended home for them is 1Password, fetched with
op read through a service account so the server can start unattended.
Copy deploy/secrets.env.example to
~/.config/subaru-mcp/secrets.env (or the path in SUBARU_MCP_ENV_FILE). It
holds the service account token and references, never the MySubaru values:
OP_SERVICE_ACCOUNT_TOKEN=ops_...
SUBARU_USERNAME=op://Automation/MySubaru/username
SUBARU_PASSWORD=op://Automation/MySubaru/password
SUBARU_PIN=op://Automation/MySubaru/pinThe file must be mode 0600, owned by you, and outside any git repository, or
the server refuses to read it. The token is passed to op through its
environment, never on the command line.
One-time 1Password setup:
Put the MySubaru login in a vault a service account can read. Service accounts cannot read Private/Personal vaults, so use a dedicated one.
Create a service account at 1password.com (Developer > Service Accounts) with read-only access to that vault only.
Paste its token into
secrets.envand fix the references if your names differ.
Other ways to supply the values:
Variables already in the process environment win over the file, so
op run --env-file <refs> -- uv run subaru-mcpalso works.Plain values instead of
op://references work too, without 1Password.
SUBARU_PIN is optional. Without it cached reads work; waking the car and
commands do not.
2. Log in once (2FA)
uv run subaru-mcp-loginInteractive. It creates a device ID in ~/.local/state/subaru-mcp/device_id
(mode 0600), logs in, walks through MySubaru's emailed or texted code, and
prints what the account supports (telematics generation, remote services,
remote engine start). It sends nothing to the car and does not test the PIN,
because Subaru's PIN check is a locate command that wakes the car.
Keep the device ID file. A new one forces 2FA again.
3. Use it locally (stdio)
.mcp.json registers the stdio server as subaru for Claude Code: start
Claude Code in this directory and approve the server. Any other MCP client
that launches a command can run uv run subaru-mcp the same way.
4. Use it remotely (HTTP mode)
MCP client ──https──> tunnel (Tailscale Funnel) ──http──> 127.0.0.1:8765 (this server)
└─ sign-in ──> GitHub OAuth appThe server always listens on 127.0.0.1; that is not configurable. It refuses
to start in HTTP mode unless the public URL, the allowed GitHub account and the
OAuth app secrets are all present.
Who gets in. One GitHub account, matched by numeric ID and login, checked at sign-in and again on every request. A signed-in client can only be sent back to an address on a fixed list (Claude's callback URLs and loopback ports by default), so a crafted sign-in link cannot deliver a token elsewhere.
Settings go in ~/.config/subaru-mcp/server.env, copied from
deploy/server.env.example. No secrets belong there.
Variable | |
| The tunnel's public URL, |
| Loopback port. Default |
| The allowed account. |
Secrets (in secrets.env, as op:// references or plain values):
SUBARU_MCP_GITHUB_CLIENT_ID, SUBARU_MCP_GITHUB_CLIENT_SECRET. The key that
signs this server's own tokens is generated on first start in
~/.local/state/subaru-mcp/oauth_signing_key.
Steps:
GitHub OAuth app. github.com > Settings > Developer settings > OAuth Apps > New. Homepage URL: the base URL. Authorization callback URL:
<base URL>/auth/callback. Store the client ID and a new client secret where the two references point.Service.
deploy/subaru-mcp.serviceis a systemd user unit. It assumes the repository is at~/code/subaru-mcpand thatopis on thePATHit sets; edit both if yours differ. Link it, so the copy in the repository stays the one in use, and start it:systemctl --user link ~/code/subaru-mcp/deploy/subaru-mcp.service systemctl --user enable --now subaru-mcp curl -i -X POST http://127.0.0.1:8765/mcp # must answer 401After editing the unit file:
systemctl --user daemon-reload && systemctl --user restart subaru-mcp. After changing the code orserver.env:systemctl --user restart subaru-mcp. Logs:journalctl --user -u subaru-mcp -f.Tunnel. With Tailscale: enable HTTPS certificates and Funnel for the machine in the admin console, then run
tailscale funnel --bg 8765(on Windows itself if the server runs in WSL with mirrored networking). Do this last: it is the step that makes the server reachable from the internet.Client. In Claude: Settings > Connectors > Add custom connector, URL
<base URL>/mcp. Sign in with GitHub when prompted.
To cut off access at once: tailscale funnel reset, or stop the service.
Expect internet scanners to probe the public URL within hours. They get 401
or 404.
Other clients (Grok Bot and others)
Who may sign in never changes: the one GitHub account. What differs per client is the address sign-in returns to, and only listed addresses are accepted.
Setting (in | Effect |
| Accepts Grok Bot's two callback addresses. |
| Exact callback URLs for any other client, comma-separated. Wildcards, credentials and non-local |
Restart the service after changing either.
Grok Bot: add a custom MCP server with the same URL, <base URL>/mcp, then sign
in with GitHub when it asks. Three things to know:
xAI publishes no list of Grok Bot's callback addresses. The two used here come from Grok Bot forum threads. If sign-in is refused with a "redirect URI is not allowed" message, put the address from that message in
SUBARU_MCP_EXTRA_REDIRECT_URIS.Finish the sign-in within about 15 minutes of starting it, or Grok Bot rejects the result as expired.
Whether Grok Bot asks for confirmation before running a tool marked destructive has not been checked. Find out before enabling controls on a server Grok Bot can reach; the flags apply to every connected client.
Tools
Tool | Wakes the car? | Notes |
| No | Full cached snapshot. The default for every question. |
| No | Slices of the same snapshot. |
| No |
|
| No | What the car and plan support. |
| No | Next services with miles remaining, and dealer service history. |
| No | Over-the-air update campaigns and install status. |
| No | This month's remote actions on the car, from any device. |
| No | Valet mode, boundary, speed and curfew alert settings. |
| Yes | Drain the 12V battery. Share one wake budget. |
Every snapshot carries data_freshness: when the car last reported and how old
that is. Errors are [CODE] message, for example [UNSUPPORTED],
[WAKE_BUDGET], [DEVICE_2FA_REQUIRED], [AUTH_FAILURE].
No tool takes or returns a VIN.
Controls (off by default)
Flag | Effect |
| Adds |
| With the flag above, also adds |
Only the literal word true enables a flag. Without it the tools are not
registered at all, so clients cannot see or call them. The flags apply to every
client connected to the server.
Every control is marked destructive, which asks clients to confirm before running it. Whether a client does is up to that client: check yours.
Success is reported only when the car confirms. Otherwise the result is
[UNCONFIRMED]and the command is never retried.remote_start(preset_name)needs an exact preset name (case ignored). On a mismatch nothing is sent and the real names are listed.2026 Outback quirk: remote start can start the engine while MySubaru reports failure. The error says so and tells the client not to resend. Treat
[UNCONFIRMED]as "the engine may be running".Never remote start in an enclosed space. If you automate it, do not let the automation close a garage door after a start it could not confirm.
Commands have their own budget:
SUBARU_COMMAND_COOLDOWN_SECONDS(default 30, minimum 10) andSUBARU_COMMAND_DAILY_CAP(default 20), logged in~/.local/state/subaru-mcp/command_log.json.Preset edits change the MySubaru account only. They do not wake the car. Seat cooling can only be set in the MySubaru app.
Not implemented: valet mode, boundary/speed/curfew alerts, send-destination and trip logging.
subarulinkhas no code for them and their request formats are unverified. Seedocs/mysubaru-api.md.
Wake budget
Defaults: at most one wake every 2 hours and 3 per rolling 24 hours, stored in
~/.local/state/subaru-mcp/wake_log.json so restarts do not reset it. An attempt
is charged when it is sent, even if the car never answers.
Variable | Default | |
|
| Minimum 5. |
|
|
|
Safety properties
Exception text from
subarulinkis never forwarded: it can contain raw API responses, the VIN and the PIN. Clients get a fixed message per error code.Every log record is scrubbed (VIN, PIN, credentials, tokens, cookies), and
subarulinklogging is held at WARNING because its DEBUG output prints the PIN.Each tool call and its outcome is logged, without arguments, as an audit trail.
A rejected password is not retried until restart, to avoid locking the account.
2FA only happens in
subaru-mcp-login, never inside a tool call.There is no generic "send this request" tool, and extra reads go through a fixed allowlist of GET paths.
To report a security problem, see SECURITY.md.
Development
uv run subaru-mcp # stdio
uv run subaru-mcp --transport http # loopback HTTP; needs the settings above
uv run pytest # mocks only; a fixture blocks real network connections
uv run ruff check . && uv run ruff format --check .tests/test_subarulink_contract.py runs the real subarulink package against
canned JSON and asserts that a cached status read requests read endpoints only.
subarulink is pinned below 0.8 because the extra reads use its private
connection object; that test fails if an upgrade changes it.
Never run live lock, unlock, remote start, horn or lights from tests or
automation. Live smoke tests are cached status only. In tests the fake
controller fails any test that reaches a command without opting in.
Never put a VIN, a login, a PIN, a token or a cookie in an issue, a pull request or a test. Test data uses made-up values.
API notes
docs/mysubaru-api.md records what the MySubaru API
returns for a 2026 Outback: feature codes, every endpoint checked, what is not
available, and the command paths.
g4 caveats
subarulink 0.7.21 is the first release with g4 support and upstream says some
g4 behaviour is still being characterized. If Subaru's reply is missing a field
subarulink expects, status returns what it could read and sets
data_freshness.partial.
Acknowledgements
G-Two/subarulink, which does the real work of talking to MySubaru, and the Home Assistant Subaru integration issue tracker for 2026 Outback reports.alex-savin/go-mysubarufor endpoint paths.elderibeiro/subaru-starlink-mcp-grokbotfor safety patterns.
Subaru, MySubaru and STARLINK are trademarks of Subaru Corporation.
License
MIT.
Available Tools
13 toolscapabilitiesCapabilitiesARead-onlyIdempotent
What this car and its MySubaru plan support: remote start, climate and seat options, valet mode, lock and window reporting. Does not wake the car.
Inputs: no named parameters. Returns: object
fuelFuelARead-onlyIdempotent
Cached fuel level, range and average MPG. Does not wake the car.
Inputs: no named parameters. Returns: object
list_climate_presetsList Climate PresetsARead-onlyIdempotent
List remote-start climate presets by exact name. Does not wake the car. Returns UNSUPPORTED if the plan has no remote engine start.
Inputs: no named parameters. Returns: object
locateLocateA
WAKES THE CAR and drains its 12V battery. Returns its current location.
For the last known location without waking the car, use status. Limited
by a wake budget; can take a few minutes.
Inputs: no named parameters. Returns: object
lock_statusLock StatusARead-onlyIdempotent
Cached door lock state as of the car's last report. Does not wake the
car, so it can be stale: check data_freshness before calling it locked.
Inputs: no named parameters. Returns: object
maintenanceMaintenanceARead-onlyIdempotent
Next scheduled services with miles remaining and the work each includes, plus the dealer service history. Does not wake the car.
Inputs: no named parameters. Returns: object
odometerOdometerARead-onlyIdempotent
Cached odometer reading in miles. Does not wake the car.
Inputs: no named parameters. Returns: object
refresh_statusRefresh StatusA
WAKES THE CAR and drains its 12V battery. Asks the car to report fresh status, then returns the full snapshot. Only use when the user explicitly asks for fresh data. Limited by a wake budget; can take a few minutes.
Inputs: no named parameters. Returns: object
remote_activityRemote ActivityARead-onlyIdempotent
Log of remote actions on the car this month (lock, unlock, engine start, locate, alerts), from any app or device on the account. Use it to audit what was done remotely. Does not wake the car.
Inputs: no named parameters. Returns: object
software_updatesSoftware UpdatesARead-onlyIdempotent
Over-the-air software update campaigns for the car and whether each is installed. Does not wake the car.
Inputs: no named parameters. Returns: object
statusStatusARead-onlyIdempotent
Full cached snapshot of the car: fuel, odometer, tires, doors, windows, locks, last known location, warning lights, and when the car last reported. Does not wake the car. Use this by default.
Inputs: no named parameters. Returns: object
tire_pressureTire PressureARead-onlyIdempotent
Cached tire pressures in PSI with the recommended values. Does not wake the car. Pressures only update while the car is moving.
Inputs: no named parameters. Returns: object
valet_and_alertsValet And AlertsARead-onlyIdempotent
Valet mode status and settings, and the boundary, speed and curfew alerts configured for the car. Read-only. Does not wake the car.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
The aggregate `status` tool overlaps with `fuel`, `odometer`, `tire_pressure`, and `lock_status`, but the descriptions clearly position `status` as the default and the others as targeted cached reads. The two wake actions, `refresh_status` and `locate`, are also clearly distinguished from their cached equivalents.
All names use snake_case and are readable, with most being noun/resource names and a few action names (`list_climate_presets`, `refresh_status`, `locate`). This is mostly predictable, though it is not a strict verb_noun convention throughout.
The 13 tools sit comfortably in the appropriate range and each maps to a distinct vehicle data domain or wake action. The aggregate `status` tool does not make the targeted readers redundant, since they support narrower queries without waking the car.
The server covers a broad read-only surface: fuel, tires, locks, maintenance, software updates, valet mode, alerts, remote activity, and location. However, there are no remote command tools for locking, unlocking, remote start, or climate activation, so capabilities and climate presets can be listed but not acted upon, leaving notable gaps.
Maintenance
Related MCP Connectors
Control your Tesla from your AI assistant - climate, charging, access, and security.
Tesla data for your AI: battery, range, charging, tires, alerts, history. Controls off by default.
AI for your car: check charge, start climate, lock/unlock, open trunk via Tesla Fleet API. OAuth.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables a local Grok Bot to talk to the unofficial MySubaru API over stdio, supporting vehicle status, locate, tire pressure, fuel, odometer, climate presets, and explicit lock/unlock/remote start actions without exposing secrets.1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to monitor a Hyundai, Kia, or Genesis vehicle's charge, fuel, range, locks, and location, and optionally pre-heat the cabin, lock or unlock doors, and start or stop charging. Reads come from cached Bluelink data with rate-limited refreshes, and all write commands are disabled by default.233MIT
- AlicenseNot gradedqualityBmaintenanceEnables chat agents and automation tools to query Tesla vehicle status and, when explicitly enabled, send signed vehicle commands via MCP over Streamable HTTP or local stdio.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read and control Hyundai, Kia, or Genesis vehicles, including locking and unlocking, remote climate, charging, status, location, trips, and other supported remote commands.MIT