Tesla Integration
Manage Tesla list vehicles, get vehicle, wake vehicle, send vehicle command, list energy sites
The Tesla integration provides access to manage Tesla list vehicles, get vehicle, wake vehicle, send vehicle command, list energy sites through the Integrate MCP server.
Installation
The Tesla integration is included with the SDK:
import { teslaIntegration } from "integrate-sdk/server";Setup
1. Create a Tesla OAuth App
- Create an OAuth application for Tesla
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Tesla integration to your server configuration. The integration automatically reads TESLA_CLIENT_ID and TESLA_CLIENT_SECRET from your environment variables:
import { createMCPServer, teslaIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
teslaIntegration({
scopes: ["openid", "offline_access", "vehicle_device_data", "vehicle_cmds", "energy_device_data", "energy_cmds"], // Optional
}),
],
});You can override the environment variables by passing explicit values:
teslaIntegration({
clientId: process.env.CUSTOM_TESLA_ID,
clientSecret: process.env.CUSTOM_TESLA_SECRET,
scopes: ["openid", "offline_access", "vehicle_device_data", "vehicle_cmds", "energy_device_data", "energy_cmds"], // Optional
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("tesla");
const result = await client.tesla.listVehicles({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, teslaIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [teslaIntegration()],
});Configuration Options
Prop
Type
Default Scopes
These defaults are applied unless you override scopes in the integration config:
openidoffline_accessvehicle_device_datavehicle_cmdsenergy_device_dataenergy_cmds
Tools
tesla_list_vehicles
List vehicles
No parameters.
tesla_get_vehicle
Get vehicle
Prop
Type
tesla_wake_vehicle
Wake vehicle
Prop
Type
tesla_send_vehicle_command
Send vehicle command
Prop
Type
tesla_list_energy_sites
List energy sites
No parameters.
Notes
- Category: Lifestyle
- Authentication mode: OAuth