Control Your Tesla with AI

A Model Context Protocol (MCP) server that connects to the Tesla Fleet API, allowing you to control your Tesla vehicle using Claude and other AI assistants that support MCP.

View on GitHub Get Started

Features

Unlock the power of AI to control and monitor your Tesla vehicles

Wake Up Vehicles

Wake up your Tesla from sleep mode with a simple voice command to your AI assistant.

Vehicle Information

Get detailed information about your Tesla vehicles, including status, battery level, and more.

Real-time Updates

Refresh vehicle data on demand to always have the latest information about your Tesla.

Debugging Tools

Access detailed vehicle information to help with troubleshooting and development.

Getting Started

Follow these steps to set up the Tesla MCP Server

1

Clone the Repository

Get the code from GitHub to your local machine.

git clone https://github.com/scald/tesla-mcp.git
cd tesla-mcp
2

Install Dependencies

Install the required packages using pnpm or npm.

pnpm install
3

Set Up Environment Variables

Create a .env file with your Tesla API credentials.

TESLA_CLIENT_ID=your_client_id
TESLA_CLIENT_SECRET=your_client_secret
TESLA_REFRESH_TOKEN=your_refresh_token
4

Get a Refresh Token

If you don't have a refresh token, use the provided utility.

pnpm get-token
5

Register Your Application

Register with Tesla's API using the provided script.

pnpm register
6

Build and Run

Build the server and start it.

pnpm build
pnpm start

Available MCP Tools

Tools that Claude can use to interact with your Tesla

wake_up

Wakes up a Tesla vehicle from sleep mode.

Parameters: vehicle_id (required)

Returns: Current state of the vehicle

refresh_vehicles

Refreshes the list of Tesla vehicles.

Parameters: None

Returns: Updates the internal cache of vehicles

debug_vehicles

Shows detailed information about available vehicles.

Parameters: None

Returns: ID, vehicle_id, VIN, and state information

Ready to Control Your Tesla with AI?

View on GitHub