This is a Model Context Protocol (MCP) server that connects to the Tesla Fleet API, allowing you to control your Tesla vehicle through AI assistants. It provides access to vehicle information, wake-up functionality, and debugging tools.
POST requests to: https://tesla.mcp.majewscy.tech/
For MCP authentication:
x-api-key
Your server authentication key (contact us for access)
For Tesla API access:
x-tesla-client-id
Your Tesla Developer Portal Client ID
x-tesla-client-secret
Your Tesla Developer Portal Client Secret
x-tesla-refresh-token
Your Tesla OAuth refresh token
curl -X POST https://tesla.mcp.majewscy.tech/ \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SERVER_KEY" \
-H "x-tesla-client-id: YOUR_CLIENT_ID" \
-H "x-tesla-client-secret: YOUR_CLIENT_SECRET" \
-H "x-tesla-refresh-token: YOUR_REFRESH_TOKEN" \
-d '{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}'
curl -X POST https://tesla.mcp.majewscy.tech/ \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SERVER_KEY" \
-H "x-tesla-client-id: YOUR_CLIENT_ID" \
-H "x-tesla-client-secret: YOUR_CLIENT_SECRET" \
-H "x-tesla-refresh-token: YOUR_REFRESH_TOKEN" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "debug_vehicles",
"arguments": {}
},
"id": 2
}'
curl -X POST https://tesla.mcp.majewscy.tech/ \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SERVER_KEY" \
-H "x-tesla-client-id: YOUR_CLIENT_ID" \
-H "x-tesla-client-secret: YOUR_CLIENT_SECRET" \
-H "x-tesla-refresh-token: YOUR_REFRESH_TOKEN" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "wake_up",
"arguments": {
"vehicle_id": "YOUR_VEHICLE_ID"
}
},
"id": 3
}'
{
"mcpServers": {
"tesla": {
"type": "http",
"url": "https://tesla.mcp.majewscy.tech/",
"headers": {
"x-api-key": "YOUR_SERVER_KEY",
"x-tesla-client-id": "YOUR_CLIENT_ID",
"x-tesla-client-secret": "YOUR_CLIENT_SECRET",
"x-tesla-refresh-token": "YOUR_REFRESH_TOKEN"
}
}
}
}
MCP_URL=https://tesla.mcp.majewscy.tech/ MCP_API_KEY=YOUR_SERVER_KEY TESLA_CLIENT_ID=YOUR_CLIENT_ID TESLA_CLIENT_SECRET=YOUR_CLIENT_SECRET TESLA_REFRESH_TOKEN=YOUR_REFRESH_TOKEN
wake_up - Wake up your Tesla from sleep moderefresh_vehicles - Refresh the list of Tesla vehiclesdebug_vehicles - Show detailed vehicle information (ID, VIN, state)Note: As of October 2023, Tesla has deprecated many vehicle command endpoints. This server currently supports only REST API endpoints that remain functional.
Requirements: You must own a Tesla vehicle and have a Tesla account to access the API.
{"jsonrpc":"2.0","id":1,"error":{"code":-32001,"message":"Invalid API Key"}}
Solution: Check your x-api-key header value
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Tesla credentials required"}}
Solution: Provide all Tesla API headers (client-id, client-secret, refresh-token)
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Vehicle not found"}}
Solution: Use debug_vehicles to get correct vehicle IDs
GET /health - Returns server status (no authentication required)