Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TESLA_VIN | No | Vehicle VIN for Fleet API | |
| TESLA_CAR_ID | No | TeslaMate car ID (for multi-car instances) | 1 |
| TESLA_GAS_MPG | No | Comparable gas vehicle MPG | 28 |
| TESLA_CLIENT_ID | No | Fleet API client ID (for token refresh) | |
| TESLA_FLEET_URL | No | Fleet API endpoint (regional options) | |
| TESLA_GAS_PRICE | No | Gas price in $/gallon (for comparison) | 3.50 |
| TESLA_PROXY_URL | No | HTTP proxy URL for commands | |
| TESLA_TOKEN_FILE | No | Path to tokens.json with OAuth tokens | |
| TESLA_VERIFY_SSL | No | Set false for self-signed proxy certs | true |
| TESLAMATE_DB_HOST | No | Postgres host for TeslaMate database | |
| TESLAMATE_DB_NAME | No | Database name for TeslaMate | teslamate |
| TESLAMATE_DB_PASS | No | Postgres password for TeslaMate database | |
| TESLAMATE_DB_PORT | No | Postgres port for TeslaMate database | 5432 |
| TESLAMATE_DB_USER | No | Postgres user for TeslaMate database | teslamate |
| TESLA_BATTERY_KWH | No | Usable battery capacity in kWh | 75 |
| TESLA_CLIENT_SECRET | No | Fleet API client secret (for token refresh) | |
| TESLA_BATTERY_RANGE_KM | No | EPA range at 100% in km | 525 |
| TESLA_ELECTRICITY_RATE | No | Electricity cost in $/kWh | 0.12 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tesla_status | Current vehicle state — battery, range, location, climate, odometer. Returns the latest position snapshot and vehicle info from TeslaMate. |
| tesla_charging_history | Charging sessions over the last N days. Shows energy added, duration, battery range, and location for each session. |
| tesla_drives | Recent drives — distance, duration, efficiency, start/end locations. Shows the last N days of driving activity with energy consumption. |
| tesla_battery_health | Battery degradation trend — range at 100% charge over time. Shows monthly snapshots of ideal range when battery is at 100%. |
| tesla_efficiency | Energy consumption trends — Wh/mi over time. Shows weekly average efficiency from driving data. |
| tesla_location_history | Where the car has been — top locations by time spent. Groups positions by proximity and shows time at each cluster. |
| tesla_state_history | Vehicle state transitions — online, asleep, offline. Shows when the car was awake vs sleeping, useful for vampire drain analysis. |
| tesla_software_updates | Firmware version history — all recorded software versions and install dates. |
| tesla_live | Live vehicle data from Fleet API — real-time battery, charging, climate, locks, sentry. More current than TeslaMate (which polls on intervals). Use this when you need the latest state right now. |
| tesla_climate_on | Start climate preconditioning — heats or cools cabin to target temp. |
| tesla_climate_off | Stop climate preconditioning. |
| tesla_set_temp | Set cabin temperature target (Fahrenheit). Both driver and passenger. Args: temp_f: Target temperature in Fahrenheit (60-85 reasonable range) |
| tesla_charge_start | Start charging (vehicle must be plugged in). |
| tesla_charge_stop | Stop charging. |
| tesla_set_charge_limit | Set charge limit percentage (50-100). Args: percent: Charge limit as percentage. 80% is recommended for daily use. |
| tesla_lock | Lock all doors. |
| tesla_unlock | Unlock all doors. Requires confirm=True for safety. Args: confirm: Must be True to execute. Prevents accidental unlocks. |
| tesla_honk | Honk the horn. |
| tesla_flash | Flash the headlights. |
| tesla_trunk | Open or close the trunk or frunk. Requires confirm=True. Args: which: "rear" for trunk, "front" for frunk confirm: Must be True to execute. |
| tesla_sentry | Toggle sentry mode on or off. Args: on: True to enable, False to disable sentry mode. |
| tesla_savings | Gas savings scorecard — how much you've saved vs a gas car. Args: gas_price: Gas price per gallon (default from TESLA_GAS_PRICE env, or $3.50) mpg_equivalent: Comparable gas vehicle MPG (default from TESLA_GAS_MPG env, or 28) |
| tesla_trip_cost | Estimate trip cost to a destination — kWh, cost, range check. Uses your personal 30-day average efficiency and current battery level. Args: destination: City, address, or place name (e.g. "Atlanta, GA") gas_price: Gas price per gallon (default from TESLA_GAS_PRICE env) mpg_equivalent: Comparable gas vehicle MPG (default from TESLA_GAS_MPG env) |
| tesla_efficiency_by_temp | Efficiency curve by temperature — Wh/mi at different temps. Shows how outside temperature affects energy consumption. |
| tesla_charging_by_location | Charging patterns by location — where you charge and how much. |
| tesla_top_destinations | Most visited locations ranked by number of visits. Args: limit: Number of destinations to show (default: 15) |
| tesla_longest_trips | Top drives ranked by distance — your epic road trips. Args: limit: Number of trips to show (default: 10) |
| tesla_monthly_summary | Monthly driving summary — miles, kWh, cost, efficiency. Args: months: Number of months to show (default: 6) |
| tesla_vampire_drain | Vampire drain analysis — battery loss while parked overnight. Checks for periods where the car was parked (no drives) for 8+ hours and measures battery drop. Args: days: Number of days to analyze (default: 14) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |