Super EV MCP
<p align="center">
<img src="docs/banner.png" alt="Super EV MCP" width="1280">
</p>
<h1 align="center">Super EV MCP</h1>
<p align="center">Talk to your Tesla from any AI assistant</p>
<p align="center">
<img alt="MIT license" src="https://img.shields.io/badge/license-MIT-blue">
<img alt="Node 20 or newer" src="https://img.shields.io/badge/Node-%3E%3D20-green">
<img alt="MCP" src="https://img.shields.io/badge/protocol-MCP-blue">
<img alt="Unofficial" src="https://img.shields.io/badge/status-unofficial-lightgrey">
</p>
**Unofficial, not affiliated with Tesla, Inc.**
Made by [Creek and Stream](https://creekandstream.com).
Super EV MCP is a local stdio MCP server for Tesla’s Fleet API. Use your own
Tesla developer application, your own domain, and your own virtual key to
check vehicle status and send commands through Tesla’s HTTPS command proxy.
> [!WARNING]
> This software can unlock and open your car. Unlocking and opening either
> trunk require explicit human confirmation. Review the code before use.
> Keep the private key on the computer running the proxy, back it up to a
> password manager, and revoke it by removing the virtual key in the Tesla app.
## Demo
<!-- demo GIF goes here: docs/demo.gif -->
Demo coming soon
## Quick start
1. Install Node.js 20 or newer. From the project checkout, install and build.
```sh
npm ci
npm run build
```
2. Register your Tesla developer app, set your credentials in the environment,
and generate your virtual key on the proxy computer. Publish your public key
before registering the domain. Replace `example.com` with your domain.
```sh
node dist/cli.js keygen
# Host the public key before running the next command.
node dist/cli.js partner-register --domain example.com
node dist/cli.js login
```
Start the TLS proxy and pair your key using the full setup below.
3. Add the server to your MCP client with the [stdio configuration](#mcp-client-configuration).
The client launches this command. Use your checkout’s absolute path.
```sh
node /path/to/super-ev-mcp/dist/cli.js serve
```
[Full setup for your own Tesla app, domain, and key](#bring-your-own-tesla-app-domain-and-key)
## Bring your own Tesla app, domain, and key
1. Install Node.js 20 or newer. From a checkout, run `npm ci` and `npm run build`.
The following examples use `node dist/cli.js`. The package also provides
the `super-ev-mcp` executable when installed with npm.
2. Register your application in the Tesla developer portal. Set your allowed
origin to your own domain, such as `https://example.com`, and register the
exact loopback redirect URI, by default `http://localhost:9876/callback`.
Set your app ID and secret as `TESLA_CLIENT_ID` and `TESLA_CLIENT_SECRET`
in the environment that starts the server and CLI. Set `TESLA_REGION` to
`na`, `eu`, or `cn` for your Tesla login. China needs a separate developer
application and uses `TESLA_CN_CLIENT_ID` and `TESLA_CN_CLIENT_SECRET`.
[Authentication overview](https://developer.tesla.com/docs/fleet-api/authentication/overview) ·
[Fleet regions](https://developer.tesla.com/docs/fleet-api/getting-started/regions-countries)
3. On your own computer where `tesla-http-proxy` runs, run
`node dist/cli.js keygen`. **Back up `fleet-key.pem` to a password manager
immediately**, for example as a secure note. Use the printed public key path to find the file. Host it on your own domain
at `https://<your-domain>/.well-known/appspecific/com.tesla.3p.public-key.pem`.
[Tesla virtual key setup](https://developer.tesla.com/docs/fleet-api/virtual-keys/developer-guide)
4. Preview with `node dist/cli.js partner-register --dry-run --domain example.com`.
Run the command without `--dry-run` after hosting the key to register and
verify it in NA/APAC and EU, plus China when China credentials are set.
Use `--check-only` to check existing registrations.
[Partner tokens](https://developer.tesla.com/docs/fleet-api/authentication/partner-tokens) ·
[China partner tokens](https://developer.tesla.cn/docs/fleet-api/authentication/partner-tokens) ·
[Partner endpoints](https://developer.tesla.com/docs/fleet-api/endpoints/partner-endpoints)
5. Run `node dist/cli.js login`, open the displayed URL in a local browser, and
grant the requested scopes. Clients with MCP URL elicitation can use the
`login` tool. The browser sends the callback directly to the local server.
[Third-party tokens](https://developer.tesla.com/docs/fleet-api/authentication/third-party-tokens) ·
[China third-party tokens](https://developer.tesla.cn/docs/fleet-api/authentication/third-party-tokens)
6. Run Tesla’s `tesla-http-proxy` with a TLS certificate valid for its hostname.
An always-on machine you control, such as a Raspberry Pi, can run the proxy.
For a remote proxy, use its reachable bind address and matching HTTPS hostname.
In this example the paths refer to files in an external configuration
directory. Use the Tesla proxy guide to install the proxy and provision its
TLS certificate and private key. Set `TESLA_PROXY_URL` to its HTTPS origin
and `TESLA_PROXY_CA_PATH` to the CA certificate file if using private trust.
[Tesla Vehicle Command Proxy](https://github.com/teslamotors/vehicle-command#using-the-http-proxy)
```sh
tesla-http-proxy -host localhost -port 4443 \
-tls-key /path/to/config/tls-key.pem -cert /path/to/config/tls-cert.pem \
-key-file /path/to/config/fleet-key.pem
```
7. Select the vehicle in the Tesla app and open
`https://tesla.com/_ak/<your-domain>` on your phone to pair the key. Once
the MCP client is running, call `list_vehicles` and then `fleet_status`
for the selected vehicle to verify pairing and command readiness.
[Virtual key pairing](https://developer.tesla.com/docs/fleet-api/virtual-keys/developer-guide#adding-to-a-vehicle) ·
[Fleet status](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-endpoints#fleet-status)
Run `node dist/cli.js doctor` to check local credentials and file availability.
[.env.example](.env.example) lists all settings. The CLI reads the process
environment. Load your own environment through your shell or MCP client.
Configuration and state live under `~/.config/super-ev-mcp/` by default.
`XDG_CONFIG_HOME` changes the parent and `SUPER_EV_MCP_CONFIG_DIR` overrides
the entire path. Use separate directories for separate developer apps or regions.
## Key storage and backup
Generate and store the private key on your own computer that runs
`tesla-http-proxy`. Keygen uses the config directory outside the repository
and sets directory permissions to `0700` and private key permissions to
`0600`. Keep a password manager backup and avoid keeping the only copy on
an ephemeral, cloud, or remote machine.
If you lose the private key and its backup, generate a new pair, re-host the
new public key at the same well-known URL, and re-pair the virtual key. Use
`keygen --force` to replace existing key files during recovery or rotation.
## MCP client configuration
Provide the app credentials to the MCP client through its environment or secure
configuration mechanism.
```json
{
"mcpServers": {
"super-ev-mcp": {
"command": "node",
"args": ["/path/to/super-ev-mcp/dist/cli.js", "serve"],
"env": {
"TESLA_REGION": "na",
"TESLA_PROXY_URL": "https://localhost:4443",
"TESLA_PROXY_CA_PATH": "/path/to/config/tls-cert.pem"
}
}
}
}
```
## Tools
| Tool | What it does | Wakes car? | Needs confirmation? |
| --- | --- | --- | --- |
| `list_vehicles` | List VIN suffixes and connectivity state. | No | No |
| `vehicle_status` | Read live status when online or cached status when asleep or offline. | No | No |
| `vehicle_data_live` | Read live charge, climate, and vehicle state. | With `wake: true` | No |
| `vehicle_location` | Return coordinates on explicit request with location consent. | With `wake: true` | No |
| `fleet_status` | Check virtual key pairing, signed protocol readiness, and firmware. | No | No |
| `climate_on`, `climate_off`, `set_temperature` | Control climate and set both zones in Celsius. | By default | No |
| `charge_start`, `charge_stop`, `set_charge_limit` | Control charging and set the target percentage. | By default | No |
| `lock` | Lock the vehicle. | By default | No |
| `unlock` | Unlock the vehicle. | By default | Yes |
| `open_trunk`, `open_frunk` | Actuate the rear trunk or open the frunk. | By default | Yes |
| `honk`, `flash_lights` | Signal from the vehicle. | By default | No |
| `send_navigation` | Share a destination through the proxy’s Fleet REST forwarding. | By default | No |
| `login` | Start browser authorization in clients with MCP URL elicitation. | No | No |
Vehicle tools take `vehicle` as the four-character VIN suffix. Supply the full
VIN when two vehicles share a suffix. Output uses the suffix. Cached snapshots
can be hours old. Use the block timestamps, and expect an unavailable result
when Tesla has no cache. Commands can wake the vehicle by default. Pass
`wake: false` to require an already-online vehicle. The server checks
`fleet_status` before commands and requires a paired key and a vehicle that
reports the signed protocol as required. It sends the command once and reports
uncertainty if the response is inconclusive. Sensitive commands require `confirm: true` after human approval.
Configure your MCP client to approve sensitive calls with the human.
[Tesla vehicle data](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-endpoints) ·
[Tesla commands](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands) ·
[Navigation proxy behavior](https://github.com/teslamotors/vehicle-command/blob/main/pkg/proxy/command.go) ·
[MCP tools specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools)
## Billing
**Tesla Fleet API is pay-per-use.** Failed requests with HTTP status below
500 count toward billed usage. The billing limit starts at zero and can be
raised after adding a payment method. Tesla disables API access without a
payment method or when you exceed the limit. Minimize vehicle wakes and use
cached status where possible. Wake limits are per vehicle, per server process.
[Tesla billing and limits](https://developer.tesla.com/docs/fleet-api/billing-and-limits) ·
[Tesla API best practices](https://developer.tesla.com/docs/fleet-api/getting-started/best-practices)
## OAuth scopes
- The server requests `openid` for authorization, `offline_access` for refresh,
`vehicle_device_data` for status, `vehicle_cmds` and
`vehicle_charging_cmds` for controls, and `vehicle_location` for the explicit
location tool. The configured scope list can omit unused vehicle permissions.
The tools operate on vehicles, so the OAuth flow rejects the account-profile
scope `user_data`.
## Credentials, audit, and revocation
- Login uses PKCE and state. Refresh rotates tokens and saves them atomically
in a mode-0600 file before serving the new access token. The CLI and server
coordinate through a lock in the config directory. If a crash leaves the
store locked, stop all processes using it before removing `tokens.json.lock`.
- Keep the configuration directory private and outside any git tree. The proxy
has the signing key and receives bearer credentials over verified TLS. Use a
proxy you control. Keep MCP stdio connected to a trusted client.
- The append-only `audit.jsonl` records time, tool, VIN suffix, allowed numeric
or boolean parameters, and result status. It excludes credentials, keys,
destinations, coordinates, full VINs, and upstream error bodies.
- Revoke application consent in the Tesla account and remove the virtual key
from the vehicle’s Locks screen in the Tesla app or vehicle UI. Stop the
proxy, archive or remove the old local key files, generate a new pair,
update the hosted public key and registration, then pair the new key.
[Tesla consent revocation](https://developer.tesla.com/docs/fleet-api/authentication/third-party-tokens#scope-changes) ·
[Tesla virtual key removal](https://developer.tesla.com/docs/fleet-api/virtual-keys/developer-guide#removing-key)
## Troubleshooting
- **`fleet_status` reports an unpaired key.** Confirm you selected the intended
vehicle in the Tesla app. Pair through `https://tesla.com/_ak/<your-domain>`
and check that the hosted public key matches the proxy’s signing key.
- **Billing limit is zero or Tesla returns a payment-required error (such as HTTP
402).** Check the payment method and billing limit in the Tesla developer
portal before retrying.
- **The car is asleep.** Use `vehicle_status` for cached data and check its
timestamps. Use `wake: true` on a live read only when you need fresh data.
If you hit the wake limit, wait before trying again.
## FAQ
**Do I need my own Tesla developer app and domain?** Yes. Register your app
and host your own public key on your domain so Tesla can verify and pair it.
**Does my client need to support browser login through MCP?** No. Use
`node dist/cli.js login` in a terminal with the same configuration as the server.
## Credits
The MIT-licensed tesla-mcp-server informed the navigation payload and vehicle wake
flow. Tesla’s vehicle-command project provides the HTTPS command proxy.
[tylergibbs1/tesla-mcp-server](https://github.com/tylergibbs1/tesla-mcp-server) ·
[Tesla vehicle-command](https://github.com/teslamotors/vehicle-command)
## License
Released under the [MIT License](LICENSE).
TDQS
Scored across 19 tools
Most tools map to clearly distinct vehicle actions or resources, and descriptions clarify boundaries such as cached status vs live data. The main potential confusion is among list_vehicles, fleet_status, vehicle_status, and vehicle_data_live, but the wake/cached distinctions make them usable.
All names use snake_case, but the verb/noun conventions are mixed: climate_on and charge_start are noun-first, list_vehicles and set_temperature are verb-first, and lock/unlock/honk are bare verbs. The set is readable, but the pattern is not predictable.
Nineteen tools is slightly heavy but reasonable for an EV control surface covering climate, charging, locks, trunks, alerts, navigation, and account setup. Each tool maps to a concrete user-facing action, though a few could eventually be grouped.
The surface covers core EV workflows: login, vehicle discovery/status, climate, charging, locking, trunks, horn/lights, and navigation. Minor gaps remain, such as closing trunks, per-zone climate control, or charging schedule/amperage settings, but agents can handle common tasks.