tesla-fleet-api

14
0
Source

Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.

Install

mkdir -p .claude/skills/tesla-fleet-api && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4334" && unzip -o skill.zip -d .claude/skills/tesla-fleet-api && rm skill.zip

Installs to .claude/skills/tesla-fleet-api

About this skill

Tesla Fleet API

Control Tesla vehicles via the official Fleet API.

Scripts Overview

ScriptPurpose
command.pyVehicle commands (climate, charging, locks, etc.)
vehicle_data.pyRead vehicle data (battery, climate, location, etc.)
vehicles.pyList vehicles + refresh cache
auth.pyAuthentication and configuration
tesla_oauth_local.pyOAuth helper with local callback server
start_proxy.shStart the signing proxy (for vehicle commands)
stop_proxy.shStop the signing proxy

Setup / Configuration

Setup is documented in SETUP.md:

State directory: {workspace}/tesla-fleet-api/

  • config.json (provider creds + non-token config)
  • auth.json (tokens)
  • vehicles.json (cached vehicle list)
  • places.json (named locations)
  • proxy/ (TLS material for signing proxy)

No .env file loading — credentials in config.json or environment variables.


command.py - Vehicle Commands

Execute commands on your Tesla. Vehicle is auto-selected if you only have one.

Usage

command.py [VEHICLE] <command> [options]
  • VEHICLE - Vehicle name or VIN (optional if single vehicle)
  • Commands can be run without specifying vehicle: command.py honk
  • Or with vehicle name: command.py flash honk (vehicle "flash", command "honk")

Climate Control

Start/Stop Climate

command.py climate start
command.py climate stop
command.py flash climate start          # specific vehicle

Set Temperature

command.py climate temps <driver_temp> [passenger_temp]
command.py climate temps 21             # both seats 21°C
command.py climate temps 22 20          # driver 22°C, passenger 20°C

Climate Keeper Mode

command.py climate keeper <mode>

Modes: off, keep, dog, camp


Seat Heater

command.py seat-heater --level <level> [--position <position>]
command.py seat-heater -l <level> [-p <position>]

Levels:

ValueName
0off
1low
2medium
3high

Positions:

ValueNames
0driver, front_left, fl
1passenger, front_right, fr
2rear_left, rl
3rear_left_back
4rear_center, rc
5rear_right, rr
6rear_right_back
7third_left
8third_right

Examples:

command.py seat-heater -l high                    # driver (default)
command.py seat-heater -l medium -p passenger
command.py seat-heater --level low --position rear_left
command.py seat-heater -l 2 -p 4                  # medium, rear center
command.py seat-heater -l off -p driver           # turn off

Seat Cooler (Ventilation)

command.py seat-cooler --level <level> [--position <position>]
command.py seat-cooler -l <level> [-p <position>]

Same levels and positions as seat heater.

Examples:

command.py seat-cooler -l medium -p driver
command.py seat-cooler -l high -p passenger

Seat Auto Climate

command.py seat-climate [--position <position>] <mode>
command.py seat-climate [-p <position>] <mode>

Modes: auto, on, off

Examples:

command.py seat-climate auto                      # driver auto
command.py seat-climate -p passenger auto
command.py seat-climate -p driver off             # disable auto

Steering Wheel Heater

command.py steering-heater <on|off>

Examples:

command.py steering-heater on
command.py steering-heater off

Precondition Schedules

Modern API for scheduling departure preconditioning (replaces deprecated set_scheduled_departure).

Add Schedule

command.py precondition add --time <HH:MM> [--days <days>] [--id <id>] [--one-time] [--disabled]
command.py precondition add -t <HH:MM> [-d <days>] [--id <id>]

Days options:

ValueDescription
allEvery day (default)
weekdaysMonday through Friday
weekendsSaturday and Sunday
mon,tue,wed,...Specific days (comma-separated)

Day names: sun, mon, tue, wed, thu, fri, sat (or full names)

Examples:

command.py precondition add -t 08:00              # every day at 8am
command.py precondition add -t 08:00 -d weekdays  # Mon-Fri
command.py precondition add -t 07:30 -d mon,wed,fri
command.py precondition add -t 09:00 --one-time   # one-time only
command.py precondition add -t 08:30 --id 123     # modify existing schedule
command.py precondition add -t 08:00 --disabled   # create but disabled

Remove Schedule

command.py precondition remove --id <id>

Examples:

command.py precondition remove --id 123
command.py precondition remove --id 1

Charging Control

Start/Stop Charging

command.py charge start
command.py charge stop

Set Charge Limit

command.py charge limit <percent>

Percent must be 50-100.

Examples:

command.py charge limit 80
command.py charge limit 90
command.py flash charge limit 70                  # specific vehicle

Doors & Security

command.py lock                   # lock all doors
command.py unlock                 # unlock all doors
command.py honk                   # honk the horn
command.py flash                  # flash the lights
command.py wake                   # wake vehicle from sleep

With vehicle name:

command.py flash wake             # wake vehicle named "flash"
command.py flash flash            # flash lights on vehicle "flash"

vehicle_data.py - Read Vehicle Data

Fetch vehicle data with human-readable output by default.

Usage

vehicle_data.py [VEHICLE] [flags] [--json]
  • VEHICLE - Vehicle name or VIN (optional if single vehicle)
  • No flags = all data
  • --json = raw JSON output

Flags

FlagLongData
-c--chargeBattery level, charge limit, charging status
-t--climateInterior/exterior temp, HVAC status
-d--driveGear, speed, power, heading
-l--locationGPS coordinates
-s--stateLocks, doors, windows, odometer, software
-g--guiGUI settings (units, 24h time)
--config-dataVehicle config (model, color, wheels)

Examples

# All data
vehicle_data.py
vehicle_data.py flash

# Specific data
vehicle_data.py -c                        # charge only
vehicle_data.py -c -t                     # charge + climate
vehicle_data.py flash -c -l               # charge + location

# Raw JSON
vehicle_data.py --json
vehicle_data.py -c --json

Sample Output

🚗 My Tesla (online)
   VIN: 5YJ... (redacted)

⚡ Charge State
────────────────────────────────────────
  Battery:    [███████████████░░░░░] 78%
  Limit:      80%
  State:      Charging
  Power:      11 kW (16A × 234V × 3φ)
  Added:      37.2 kWh
  Remaining:  10m
  Range:      438 km (272 mi)
  Cable:      IEC

🌡️  Climate State
────────────────────────────────────────
  Inside:     11.9°C
  Outside:    6.0°C
  Set to:     20.5°C
  Climate:    Off

auth.py - Authentication

Manage OAuth tokens and configuration.

Usage

auth.py <command> [options]

Commands

Login (OAuth Flow)

auth.py login

Interactive: generates auth URL, prompts for code, exchanges for tokens.

Exchange Code

auth.py exchange <code>

Exchange authorization code for tokens (non-interactive).

Refresh Tokens

auth.py refresh

Refresh access token. Note: refresh tokens rotate - the new one is saved automatically.

Register Domain

auth.py register --domain <domain>

Register your app domain with Tesla (required for signed commands).

After registration, enroll your virtual key:

https://tesla.com/_ak/<domain>

Show Config

auth.py config

Display current configuration (secrets redacted).

Set Config

auth.py config set [options]

Options:

  • --client-id <id>
  • --client-secret <secret>
  • --redirect-uri <uri>
  • --audience <url>
  • --base-url <url>
  • --ca-cert <path>
  • --domain <domain>

Examples:

# Initial setup
auth.py config set \
  --client-id "abc123" \
  --client-secret "secret" \
  --redirect-uri "http://localhost:18080/callback"

# Configure proxy
auth.py config set \
  --base-url "https://localhost:4443" \
  --ca-cert "/path/to/tls-cert.pem"

tesla_fleet.py - List Vehicles

List vehicles with human-readable output.

python3 scripts/tesla_fleet.py vehicles
python3 scripts/tesla_fleet.py vehicles --json

Sample Output

🚗 Name:   My Tesla
🔖 VIN:    5YJ... (redacted)
🟢 Status: Online
👤 Access: Owner

Configuration / Proxy / File layout

All setup + configuration is documented in SETUP.md.


Regional Base URLs

RegionAudience URL
Europehttps://fleet-api.prd.eu.vn.cloud.tesla.com
North Americahttps://fleet-api.prd.na.vn.cloud.tesla.com
Chinahttps://fleet-api.prd.cn.vn.cloud.tesla.cn

OAuth token endpoint (all regions):

https://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token

Troubleshooting

"vehicle unavailable: vehicle is offline or asleep"

Wake the vehicle first:

command.py wake

"command not signed" / "vehicle rejected"

Ensure the signing proxy is running and configured. See SETUP.md § Proxy Setup.

Token expired

auth.py refresh

Multiple vehicles

Specify vehicle by name or VIN:

command.py flash climate start
command.py 5YJ... honk

Complete Command Reference

command.py

climate start|stop
climate temps <driver> [passenger]
climate keeper off|keep|dog|camp

seat-heater -l <level> [-p <position>]
seat-cooler 

---

*Content truncated.*

seedream-image-gen

openclaw

Generate images via Seedream API (doubao-seedream models). Synchronous generation.

2259

ffmpeg-cli

openclaw

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

6623

context-optimizer

openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs optimization events to chat.

3622

a-stock-analysis

openclaw

A股实时行情与分时量能分析。获取沪深股票实时价格、涨跌、成交量,分析分时量能分布(早盘/尾盘放量)、主力动向(抢筹/出货信号)、涨停封单。支持持仓管理和盈亏分析。Use when: (1) 查询A股实时行情, (2) 分析主力资金动向, (3) 查看分时成交量分布, (4) 管理股票持仓, (5) 分析持仓盈亏。

9121

himalaya

openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

7821

garmin-connect

openclaw

Syncs daily health and fitness data from Garmin Connect into markdown files. Provides sleep, activity, heart rate, stress, body battery, HRV, SpO2, and weight data.

7321

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

641968

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

590705

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318395

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

450339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.