MCP server exposing VehicleAI per-vehicle baselines, trip history, AI narratives, and live OBD reads to Claude Desktop / OpenClaw / Cursor
Project description
VehicleAI MCP Server
An MCP (Model Context Protocol) server that exposes the iOS app's per-vehicle baselines, trip history, AI narratives, and live OBD readings to any MCP-aware client — Claude Desktop, Cursor, or OpenClaw.
Two paths, same tool surface
VehicleAI ships a dual-path server. Each tool call tries the live bridge first, then falls back to a disk snapshot when the phone is offline.
- Live bridge — when the iOS app's
Settings → MCP bridgetoggle is on and your Mac can reach the phone (same Wi-Fi or Tailscale), every tool routes through an HTTP server hosted inside the VehicleAI app. This unlocks live PID reads, on-demand DTC scans, freeze-frame pulls, Mode 09 VIN reads — the complete OBD surface. - Snapshot fallback — when the bridge is unreachable, historical
tools (
recent_trips,baselines,daily_rollups, etc.) continue working against the JSON file the phone auto-exports after every trip. Live-only tools return a clear "phone is offline" message.
The phone is always authoritative — the snapshot is just what the phone last wrote down. There is no server, no cloud, no account.
Install
Python 3.10+:
pip install vehicleai-mcp
Or, from source (for development):
cd mcp-server
pip install -e .
Either path registers a vehicleai-mcp console script.
Configure
Live bridge (preferred)
On the phone: Settings → MCP bridge → enable, copy the token.
On the Mac (or wherever the MCP client runs), set two env vars:
export VEHICLEAI_BRIDGE_URL=http://<phone-ip>:50501
export VEHICLEAI_BRIDGE_TOKEN=<token from the app>
# Optional — default 6 seconds, raise if you're over a slow tailnet
export VEHICLEAI_BRIDGE_TIMEOUT=8
The phone's Settings UI lists every address it's reachable at (LAN IP, Tailscale IP, etc.). Pick whichever your MCP client can reach.
Snapshot fallback (recommended for offline resilience)
Even with the bridge configured, set one of the snapshot paths so historical queries work when the phone is asleep:
VEHICLEAI_SNAPSHOT_PATH— full path to the JSON fileVEHICLEAI_SNAPSHOT_DIR— directory containingVehicleAI-Latest.json- Default:
~/Library/Mobile Documents/com~apple~CloudDocs/VehicleAI-Latest.json(macOS iCloud Drive)
Point the iOS app's auto-export folder at the same location.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vehicleai": {
"command": "vehicleai-mcp",
"env": {
"VEHICLEAI_BRIDGE_URL": "http://100.64.1.2:50501",
"VEHICLEAI_BRIDGE_TOKEN": "REPLACE_WITH_TOKEN_FROM_APP",
"VEHICLEAI_SNAPSHOT_PATH": "/Users/you/Library/Mobile Documents/com~apple~CloudDocs/VehicleAI-Latest.json"
}
}
}
}
Restart Claude Desktop. The tools below appear in the MCP picker.
OpenClaw
{
"mcp": {
"vehicleai": {
"transport": "stdio",
"command": "vehicleai-mcp",
"env": {
"VEHICLEAI_BRIDGE_URL": "http://100.64.1.2:50501",
"VEHICLEAI_BRIDGE_TOKEN": "REPLACE_WITH_TOKEN_FROM_APP",
"VEHICLEAI_SNAPSHOT_DIR": "/Users/you/Dropbox/VehicleAI"
}
}
}
}
Tools
Live (bridge-only)
| Tool | Description |
|---|---|
connection_status |
Is the phone online? Is the OBD transport ready? |
read_pid |
Force-read a single PID from the ECU right now |
read_pids |
Force-read multiple PIDs in one pass |
read_vin |
Pull the VIN via Mode 09 |
read_dtcs |
Active Diagnostic Trouble Codes (Mode 03) |
read_pending_dtcs |
Pending DTCs (Mode 07) |
freeze_frame |
Mode 02 freeze frame for the most recent DTC |
Historical (bridge or snapshot)
| Tool | Description |
|---|---|
vehicle_status |
Active vehicle identity + health verdict + live samples (when live) |
recent_trips |
Most recent finalized trips (newest first) |
trip_narratives |
AI-written 2-3 sentence trip summaries |
baselines |
Per-PID Welford stats — "what's normal for your car" |
daily_rollups |
Per-day aggregated driving stats |
vehicles |
Every VIN VehicleAI has seen |
Security notes
- The bridge binds to non-cellular interfaces only — LAN + Tailscale, never over your mobile data plan.
- Every authenticated request must carry a matching
X-VehicleAI-Tokenheader. Constant-time compare on the phone side. /healthis unauth'd so clients can tell "phone is asleep" from "token is wrong" without leaking whether a token is provisioned.- Rotate the token any time from the iOS app — invalidates every client config in one tap.
Running manually
VEHICLEAI_BRIDGE_URL=http://phone.tailnet:50501 \
VEHICLEAI_BRIDGE_TOKEN=... \
VEHICLEAI_SNAPSHOT_PATH=/path/to/VehicleAI-Latest.json \
vehicleai-mcp
The server speaks stdio — you'll only see output when a client connects and calls a tool. Use the MCP Inspector for local smoke testing:
npx @modelcontextprotocol/inspector vehicleai-mcp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vehicleai_mcp-0.1.0.tar.gz.
File metadata
- Download URL: vehicleai_mcp-0.1.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd904b6265369bddc442bb6942fc82e8952c387cc1922397d876a5af78376232
|
|
| MD5 |
15f6468f4e392e4bfbd4b14a72ea7763
|
|
| BLAKE2b-256 |
f7b8567bd0bd580c91ebd29e05607e5f59a99cf43ce22344088172e5a187d3d8
|
File details
Details for the file vehicleai_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vehicleai_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
132e6369c24c267ed2460c636e538fa87d1d218b96af96d114daa022f85ac015
|
|
| MD5 |
4e4a791e49547875dbf0c4d6d955bafb
|
|
| BLAKE2b-256 |
e9d679fb683b413b51a2f0179df20faf74e53b20eb85ad24695c028e77f22cac
|