MCP server wrapping the Tesla Fleet API and TeslaMate API
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
This repository provides a Model Context Protocol server that wraps both the Tesla Fleet API and the TeslaMate API. It includes vehicle endpoints, vehicle commands, energy endpoints (Powerwall/Solar), and charging endpoints. The implementation is modular and fully featured, exposing 98 MCP tools for the Tesla Fleet API and 9 MCP tools for the TeslaMate API.
This isn't just remote control โ it's a conversational interface to your entire Tesla ecosystem. Express your use cases directly to your AI โ describe what you want in plain language and let it figure out which tools to call, in what order, and with what parameters. No app to open, no menu to navigate.
"My Powerwall is at 40%. Should I charge my car now or wait for solar production this afternoon?"
"Analyze my last 30 days of energy data โ am I losing money by exporting to the grid while paying to charge at night?"
"Set the Powerwall backup reserve to 20% and schedule the car to charge from 2am to 6am at 16A."
The AI can cross-reference your solar production, Powerwall state, grid rates, and vehicle battery level to give you a recommendation โ and act on it immediately.
"I have a road trip to Lyon next Thursday. Based on my usual efficiency, will I need to stop for charging? Find the best Supercharger on the route."
"Compare my energy consumption this month vs last month. What changed?"
"Pre-condition the car at 7:45am every weekday and set the charge limit back to 80% โ it's currently at 100% from the trip."
"What's my average km/kWh over the last 3 months? Is it getting worse?"
"Show me my most expensive charging sessions this year and where they happened."
"How many hours per week is the car sitting with climate running? What's the energy cost?"
"Is my car locked and is Sentry mode on? I forgot to check before my flight."
"My car is parked downtown. Turn on Sentry mode and send me the current location."
Beyond pre-built widgets, the server exposes a Generative UI capability so the AI can build interactive Prefab UI components on the fly to answer with charts, tables and metric cards โ not just text.
"Show me a bar chart of my charging cost per location for last month."
"Build a dashboard for this car: current SoC, last 7 drives, and battery health degradation."
"Compare my efficiency this winter vs last summer with two side-by-side metric cards."
The AI uses generative_generate_prefab_ui to author Python code in a sandbox (Pyodide + Deno on the server); the resulting widget is rendered directly in your chat through a Skybridge-mime iframe โ no template authoring on your side, no extra round-trip. The companion generative_search_prefab_components lookup tool keeps the LLM honest about component signatures.
It works equally well for Tesla Fleet API and TeslaMate users โ the same generative tool is gated by either subscription.
The server also ships MCP Skills: markdown workflows the LLM reads on demand to chain tools into a coherent answer. The first one available is drive-efficiency-coach:
"Run the drive efficiency coach for the last 30 days and show it as a report."
The skill walks the AI through fetching your TeslaMate drives, computing Wh/km percentiles, identifying outliers, cross-referencing speed/temperature/trip-length, and rendering a Generative UI report (metric cards + outliers table + 1โ3 actionable coaching insights anchored in your own numbers).
Skills are the easiest way to extend this server without touching Python. Pull requests welcome โ drop a new directory under tesla_mcp/skills/ and SkillsDirectoryProvider picks it up automatically.
A good skill is:
teslamate_get_car_drives, energy_live_status, โฆ) and the right arguments.generative_generate_prefab_ui render for analytics/reports; plain text for one-shot questions.Minimal layout:
SKILL.md starts with YAML frontmatter (name, description) followed by the workflow. See drive-efficiency-coach/SKILL.md as a reference.
Ideas waiting for an author:
charging-cost-breakdown โ group last month's charges by location, surface cost-per-100kmweekly-tesla-digest โ drives + charges + battery snapshot + software updates as a Monday-morning email-style reportrange-anxiety-checker โ given a destination, cross-reference SoC, weather, elevation and recent efficiency to call out a stop or reassurehome-charging-window-finder โ using TOU settings + recent charge sessions, find the cheapest 4-hour window to plug in tonightAvailable capabilities (98 tools for Tesla Fleet API + 9 for TeslaMate API + 2 Generative UI tools + skills):
drive-efficiency-coach) the AI reads on demand to chain tools into a coherent answerThe hosted server supports OAuth 2.0 Single Sign-On via Tesla's official authorization server. Compatible clients (ChatGPT, Claude.ai, VS Codeโฆ) trigger an automatic sign-in flow โ no token copy-paste required.
The server proxies the OAuth flow to
auth.tesla.com, then exchanges your Tesla token for a MyTeslaMate token transparently. Your Tesla credentials never touch this server.
ChatGPT supports native MCP connectors via Settings โ Apps.
Tesla) and the MCP server URL:
Note: OAuth-based SSO requires a MyTeslaMate account. The server validates your Tesla token and links it to your MTM subscription automatically.
Ready-to-use Claude Code skills for this MCP server are available in myteslamate/tesla-skills.
Install the /tesla slash command in one step:
Then in Claude Code:
No installation required! Use the hosted MCP server directly. Two authentication options:
Simply provide the server URL and let the client handle the OAuth flow automatically (see sections above).
For clients that don't support OAuth, use your MyTeslaMate API token directly in the Authorization header.
Add both endpoints to your .vscode/mcp.json configuration to choose your preferred integration:
tesla_fleet_api for direct access to Tesla's official Fleet API.teslamate for integration via TeslaMate API.Add endpoints in the MCP Connector configuration with the same URLs and headers as above.:
Select the server according to your authentication method and API preference.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-tesla)<a href="https://allmcps.com/mcp/mcp-tesla"><img src="https://allmcps.com/api/badge/mcp-tesla?style=directory" alt="MCP Tesla on AllMCPs" /></a>