CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Mcp Tesla

myteslamate/mcp-tesla
215 toolsHTTPregistry active
Summary

A full-featured wrapper around both the Tesla Fleet API and TeslaMate API, exposing 98 tools for Fleet and 9 for TeslaMate. You can control vehicle functions (lock, climate, charging amps, trunk), manage Powerwall and solar (backup reserve, storm mode, time-of-use settings), send navigation destinations, pull trip analytics, and query charging history. It includes a generative UI system that lets the AI author custom dashboards on the fly using Pyodide, plus pre-built skills like a drive efficiency coach that chains tools into analytical workflows. The hosted version supports OAuth SSO through Tesla's auth server, so compatible clients trigger sign-in automatically without token juggling. Useful if you want conversational access to your entire Tesla ecosystem without opening the app.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Public tool metadata for what this MCP can expose to an agent.

15 tools
vehicle_status_overviewGet a full status snapshot for one vehicle (battery range, charging, location, climate, locks, firmware, alerts). Do not use this to see if the vehicle is awake/online. Do use this for general status, 'view battery', or 'battery and range' intents.2 params

Get a full status snapshot for one vehicle (battery range, charging, location, climate, locks, firmware, alerts). Do not use this to see if the vehicle is awake/online. Do use this for general status, 'view battery', or 'battery and range' intents.

Parameters* required
actionstring
Required operation selector. Always set to `get-vehicle-status`.
vehicle_idstring
Required Tesla vehicle id from `vehicle_list` (for example `12345678901234567`). Do not guess ids.
vehicle_listList vehicles available to the authenticated Tesla account.1 params

List vehicles available to the authenticated Tesla account.

Parameters* required
actionstring
Required operation selector. Always set to `list-vehicles`.
vehicle_wake_upWakes up the selected vehicle from sleep so it becomes online and can receive further commands. *ALL* operations on the vehicle must first ensure it is awake by calling this tool.1 params

Wakes up the selected vehicle from sleep so it becomes online and can receive further commands. *ALL* operations on the vehicle must first ensure it is awake by calling this tool.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_door_lockLocks all doors on the selected vehicle. Use for explicit 'lock the car' intents.1 params

Locks all doors on the selected vehicle. Use for explicit 'lock the car' intents.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Use for explicit lock requests only.
vehicle_door_unlockUnlocks all doors on the selected vehicle. Use for explicit 'unlock the car' intents.1 params

Unlocks all doors on the selected vehicle. Use for explicit 'unlock the car' intents.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Use for explicit unlock requests only.
vehicle_flash_lightsFlashes the vehicle headlights briefly as a visual signal. Use for 'flash the lights' or 'locate my car' intents.1 params

Flashes the vehicle headlights briefly as a visual signal. Use for 'flash the lights' or 'locate my car' intents.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Use to locate/identify a parked car by light flash.
vehicle_honk_hornHonks the horn on the selected vehicle once. Use for explicit 'honk the horn' or 'sound the horn' intents, often to help locate a parked vehicle.1 params

Honks the horn on the selected vehicle once. Use for explicit 'honk the horn' or 'sound the horn' intents, often to help locate a parked vehicle.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Use for explicit horn/honk requests only. Do not guess ids.
vehicle_sun_roof_controlControls the powered sunroof. Only available on vehicles equipped with an operable sunroof. The vehicle must be stopped and in Park. Valid states include: "vent" (partially opens for ventilation) and "close" (fully closes the sunroof). Some vehicles do not support intermediate...2 params

Controls the powered sunroof. Only available on vehicles equipped with an operable sunroof. The vehicle must be stopped and in Park. Valid states include: "vent" (partially opens for ventilation) and "close" (fully closes the sunroof). Some vehicles do not support intermediate...

Parameters* required
statestring
Required sunroof target state. `vent` opens for airflow; `close` fully closes.one of vent · close
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_window_controlControls the window positions on all four doors simultaneously. Supported actions are "vent" and "close". Vent lowers the windows slightly to allow airflow; close raises them fully. Vehicle must be in Park. Regional restrictions or vehicle configuration may limit this feature.2 params

Controls the window positions on all four doors simultaneously. Supported actions are "vent" and "close". Vent lowers the windows slightly to allow airflow; close raises them fully. Vehicle must be in Park. Regional restrictions or vehicle configuration may limit this feature.

Parameters* required
commandstring
Required window command. `vent` cracks windows; `close` closes all windows.one of vent · close
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_navigation_gps_requestStarts navigation to a specific GPS coordinate. Requires latitude and longitude. An optional "order" field may define visit sequence when multiple destinations are used4 params

Starts navigation to a specific GPS coordinate. Requires latitude and longitude. An optional "order" field may define visit sequence when multiple destinations are used

Parameters* required
orderinteger
Optional waypoint order index when composing multi-stop flows.
latitudenumber
Required destination latitude in decimal degrees (for example `37.7749`).
longitudenumber
Required destination longitude in decimal degrees (for example `-122.4194`).
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_navigation_placeid_requestStarts navigation using one or more Google Maps Place IDs. The Place IDs must be provided as a comma-separated string in the format "refId:<PLACE_ID>". Multiple refIds may be included to provide alternative candidate locations. This is ideal when working with Google Places API...2 params

Starts navigation using one or more Google Maps Place IDs. The Place IDs must be provided as a comma-separated string in the format "refId:<PLACE_ID>". Multiple refIds may be included to provide alternative candidate locations. This is ideal when working with Google Places API...

Parameters* required
ref_idsstring
Required comma-separated `refId:<GOOGLE_PLACE_ID>` values (for example `refId:ChIJVTPokywQkFQRmtVEaUZlJRA`).
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_navigation_waypoints_requestSends multiple GPS waypoints to the vehicle's navigation system. Each waypoint must include latitude and longitude, and may include an "order" field to specify visit sequence. The waypoints define a multi-stop route, which the vehicle navigation system will follow in the provi...2 params

Sends multiple GPS waypoints to the vehicle's navigation system. Each waypoint must include latitude and longitude, and may include an "order" field to specify visit sequence. The waypoints define a multi-stop route, which the vehicle navigation system will follow in the provi...

Parameters* required
waypointsarray
Required ordered waypoint list for multi-stop navigation.
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_remote_boomboxPlays an external sound through the vehicle's Boombox speaker (if equipped). The sound is selected using a numeric `sound_id`. Example values include: 0 for a random Boombox sound, and 2000 for a 'locate ping'. Regional restrictions may limit Boombox functionality, and the veh...2 params

Plays an external sound through the vehicle's Boombox speaker (if equipped). The sound is selected using a numeric `sound_id`. Example values include: 0 for a random Boombox sound, and 2000 for a 'locate ping'. Regional restrictions may limit Boombox functionality, and the veh...

Parameters* required
sound_idinteger
Required boombox sound id (for example `0` random, `2000` locate ping).
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`.
vehicle_auto_conditioning_startStarts the vehicle's climate control system (HVAC). This is the correct final action for 'warm up my car', 'warm up the car', 'turn on climate', or 'start HVAC' intents.1 params

Starts the vehicle's climate control system (HVAC). This is the correct final action for 'warm up my car', 'warm up the car', 'turn on climate', or 'start HVAC' intents.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Starts HVAC for this vehicle.
vehicle_auto_conditioning_stopStops the vehicle's climate control system (HVAC). Use for 'turn off climate', 'stop HVAC', or 'turn the climate off' intents.1 params

Stops the vehicle's climate control system (HVAC). Use for 'turn off climate', 'stop HVAC', or 'turn the climate off' intents.

Parameters* required
vehicle_idstring
Required Tesla vehicle id from `vehicle_list`. Stops HVAC for this vehicle.

Tesla MCP Server: https://mcp.myteslamate.com/mcp

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.


✨ What You Can Do

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.

⚡ Energy Optimization

"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.

🚗 Smart Vehicle Management

"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."

📊 Data & Insights (with TeslaMate API)

"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?"

🔐 Security & Peace of Mind

"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."


🎨 Generative UI — Custom dashboards on demand

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.

Skills — pre-framed analytical workflows

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).

🤝 Contribute a skill

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:

  1. Specific — answers one concrete question well rather than trying to do everything (e.g. "summarize my charging cost by location for a period" beats "manage my charging").
  2. Tool-aware — names the exact MCP tools to call (teslamate_get_car_drives, energy_live_status, …) and the right arguments.
  3. Numerically anchored — the coaching/insights step quotes numbers derived from the user's own data, not generic platitudes.
  4. Visual when it helps — wraps up with a generative_generate_prefab_ui render for analytics/reports; plain text for one-shot questions.
  5. Honest about pitfalls — calls out unit ambiguities, data gaps, edge cases the LLM should handle.

Minimal layout:

tesla_mcp/skills/your-skill-name/
└── SKILL.md

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-100km
  • weekly-tesla-digest — drives + charges + battery snapshot + software updates as a Monday-morning email-style report
  • range-anxiety-checker — given a destination, cross-reference SoC, weather, elevation and recent efficiency to call out a stop or reassure
  • home-charging-window-finder — using TOU settings + recent charge sessions, find the cheapest 4-hour window to plug in tonight

Available capabilities (98 tools for Tesla Fleet API + 9 for TeslaMate API + 2 Generative UI tools + skills):

  • Vehicle control: lock/unlock, climate, trunk, windows, lights, horn
  • Charging: start/stop, set limits, schedule, charging amps, charge history
  • Powerwall & Solar: live status, energy history, backup reserve, storm mode, grid import/export, time-of-use settings
  • Navigation: send destinations, find nearby Superchargers
  • Security: Sentry mode, valet mode, speed limits, PIN to drive
  • Data & analytics: vehicle data, trip history, drive statistics (TeslaMate API)
  • Generative UI: on-demand Prefab dashboards (charts, metrics, tables) authored by the AI in a sandboxed Pyodide runtime
  • Skills: pre-framed analytical workflows (e.g. drive-efficiency-coach) the AI reads on demand to chain tools into a coherent answer

🔐 One-Click SSO — Connect with Your Tesla Account

The 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.

MCP server URL: https://mcp.myteslamate.com/mcp

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.


🤖 Setup on ChatGPT (Apps / MCP Connector)

ChatGPT supports native MCP connectors via Settings → Apps.

  1. In chat.openai.com, open Settings → Apps.
  2. Click Create app.
  3. Enter the MCP server URL:
    https://mcp.myteslamate.com/mcp
    
  4. ChatGPT will auto-discover the OAuth metadata and prompt you to Connect.
  5. Sign in with your Tesla account — the authorization is handled automatically.
  6. The connector appears in your Enabled apps list and is available in all your chats.

🧠 Setup on Claude.ai (MCP Connector)

  1. Open claude.ai → Settings → Connectors.
  2. Click Add custom connector.
  3. Enter a name (e.g. Tesla) and the MCP server URL:
    https://mcp.myteslamate.com/mcp
    
  4. Click Add — Claude will auto-discover the OAuth metadata and show a Connect button.
  5. Click Connect — you'll be redirected to Tesla's login page.
  6. After authorization, Claude will have access to all Tesla MCP tools.

Note: OAuth-based SSO requires a MyTeslaMate account. The server validates your Tesla token and links it to your MTM subscription automatically.


🤖 Claude Code Skills

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:

/tesla what is my battery level?
/tesla lock my car
/tesla how much did I charge last month?

🚀 Quick Start - Use Directly in VS Code, Claude Desktop, etc.

No installation required! Use the hosted MCP server directly. Two authentication options:

Option A — SSO (Recommended for Claude.ai & ChatGPT)

Simply provide the server URL and let the client handle the OAuth flow automatically (see sections above).

Option B — Manual Token (VS Code, Cursor, Claude Desktop)

For clients that don't support OAuth, use your MyTeslaMate API token directly in the Authorization header.

For VS Code / Cursor (with MCP Extension) and Other MCP Clients

Add both endpoints to your .vscode/mcp.json configuration to choose your preferred integration:

{
  "servers": {
    "tesla": {
      "type": "http",
      "url": "https://mcp.myteslamate.com/mcp"
    }
  }
}
  • Use tesla_fleet_api for direct access to Tesla's official Fleet API.
  • Use teslamate for integration via TeslaMate API.

For Claude Desktop

Add endpoints in the MCP Connector configuration with the same URLs and headers as above.:

claude mcp add --transport http tesla-api "https://mcp.myteslamate.com/mcp"

Select the server according to your authentication method and API preference.

🔑 Getting Your Token (Manual Mode Only)

  1. Visit MyTeslaMate.com
  2. Sign in with your Tesla account
  3. Navigate to the API section in your dashboard
  4. Copy your personal API token
  5. Use it in your MCP configuration

🔧 Self-Hosting (Advanced)

If you prefer to run your own instance, this repository also support TeslaMate API and Tesla Fleet API (Requires Tesla Developer Account and proper Fleet API registration).

Features

  • Modular package under tesla_mcp with a reusable TeslaClient.
  • Vehicle endpoints (29 read-only endpoints):
    • Core Vehicle Info:
      • GET /api/1/vehicles - List vehicles
      • GET /api/1/vehicles/{vehicle_tag} - Get vehicle metadata
      • GET /api/1/vehicles/{vehicle_tag}/vehicle_data - Get live vehicle data
      • POST /api/1/vehicles/{vehicle_tag}/wake_up - Wake sleeping vehicle
      • POST /api/1/vehicles/fleet_status - Fleet status
      • GET /api/1/vehicles/{vehicle_tag}/mobile_enabled - Check mobile access
      • GET /api/1/vehicles/{vehicle_tag}/nearby_charging_sites - Nearby charging
      • GET /api/1/vehicles/{vehicle_tag}/service_data - Service data
      • GET /api/1/vehicles/{vehicle_tag}/release_notes - Firmware release notes
      • GET /api/1/vehicles/{vehicle_tag}/recent_alerts - Recent alerts
      • GET /api/1/dx/vehicles/options?vin={vin} - Vehicle options
      • GET /api/1/dx/vehicles/upgrades/eligibility?vin={vin} - Eligible upgrades
      • GET /api/1/dx/vehicles/subscriptions/eligibility?vin={vin} - Eligible subscriptions
    • Drivers & Sharing (6 endpoints):
      • GET /api/1/vehicles/{vehicle_tag}/drivers - List allowed drivers (owner only)
      • DELETE /api/1/vehicles/{vehicle_tag}/drivers - Remove driver access
      • GET /api/1/vehicles/{vehicle_tag}/invitations - List active share invites (paginated)
      • POST /api/1/vehicles/{vehicle_tag}/invitations - Create share invite (24hr expiry, single-use)
      • POST /api/1/invitations/redeem - Redeem share invite
      • POST /api/1/vehicles/{vehicle_tag}/invitations/{id}/revoke - Revoke share invite
    • Fleet Telemetry (4 endpoints):
      • GET /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config - Get fleet telemetry config
      • POST /api/1/vehicles/fleet_telemetry_config - Configure self-hosted fleet-telemetry server
      • DELETE /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config - Remove fleet telemetry config
      • GET /api/1/vehicles/{vehicle_tag}/fleet_telemetry_errors - Recent fleet telemetry errors
    • Push Notification Subscriptions (4 endpoints):
      • GET /api/1/subscriptions - Get subscriptions for mobile device
      • POST /api/1/subscriptions - Set subscriptions for mobile device
      • GET /api/1/vehicle_subscriptions - Get vehicle subscriptions
      • POST /api/1/vehicle_subscriptions - Set vehicle subscriptions
    • Warranty & Signed Commands (2 endpoints):
      • GET /api/1/dx/warranty/details?vin={vin} - Get warranty information
      • POST /api/1/vehicles/{vehicle_tag}/signed_command - Execute signed command (Tesla Vehicle Command Protocol)
  • Vehicle commands (64 control endpoints):
    • Doors & Access: door_lock, door_unlock, actuate_trunk
    • Climate: auto_conditioning_start/stop, set_temps, set_climate_keeper_mode, set_bioweapon_mode, set_cabin_overheat_protection, set_cop_temp, set_preconditioning_max
    • Seat & Steering: remote_seat_heater_request, remote_seat_cooler_request, remote_auto_seat_climate_request, remote_steering_wheel_heater_request, remote_steering_wheel_heat_level_request, remote_auto_steering_wheel_heat_climate_request
    • Charging: charge_start, charge_stop, charge_port_door_open/close, set_charge_limit, charge_standard, charge_max_range, set_charging_amps, set_scheduled_charging, add/remove_charge_schedule, add/remove_precondition_schedule
    • Windows & Sunroof: window_control, sun_roof_control
    • Lights & Horn: flash_lights, honk_horn
    • Media: adjust_volume, media_toggle_playback, media_next/prev_track, media_next/prev_fav, media_volume_down
    • Navigation: navigation_request, navigation_gps_request, navigation_sc_request
    • Security: set_sentry_mode, set_valet_mode, reset_valet_pin, speed_limit_set_limit, speed_limit_activate/deactivate/clear_pin, speed_limit_clear_pin_admin, set_pin_to_drive, reset_pin_to_drive_pin, clear_pin_to_drive_admin
    • Software: schedule_software_update, cancel_software_update
    • Misc: remote_start_drive, trigger_homelink, remote_boombox, set_vehicle_name, guest_mode, erase_user_data
  • Energy endpoints (12 endpoints for Powerwall/Solar control):
    • Information: energy_products (list all products), energy_site_info (site configuration), energy_live_status (real-time power/energy data)
    • History: energy_history (energy measurements over time), energy_backup_history (off-grid events), energy_charge_history (wall connector usage)
    • Control: energy_operation (set mode: autonomous/self_consumption), energy_backup (set backup reserve %), energy_off_grid_vehicle_charging_reserve (reserve for EV charging during outage)
    • Grid Settings: energy_storm_mode (enable/disable storm watch), energy_grid_import_export (control grid charging/exporting), energy_time_of_use_settings (configure utility rate plans)
  • Charging endpoints (3 endpoints for charging history and invoices):
    • charging_history (paginated charging history with filters)
    • charging_invoice (download PDF invoice for a charging event)
    • charging_sessions (session information with pricing and energy data - business accounts only)
  • Centralised error handling and basic logging so MCP clients surface useful diagnostics.

Configuration

API Endpoint Configuration

Configure the Tesla API base URL using the TESLA_BASE_URL environment variable:

For MyTeslaMate API (Default)

# No configuration needed - uses default
# Or explicitly set:
export TESLA_BASE_URL=https://api.myteslamate.com

For Tesla Fleet API (Official)

Choose your regional endpoint:

# North America, Asia-Pacific (excluding China)
export TESLA_BASE_URL=https://fleet-api.prd.na.vn.cloud.tesla.com

# Europe, Middle East, Africa  
export TESLA_BASE_URL=https://fleet-api.prd.eu.vn.cloud.tesla.com

# China
export TESLA_BASE_URL=https://fleet-api.prd.cn.vn.cloud.tesla.cn

Note: When using the official Tesla Fleet API, ensure you have:

  • A registered Tesla Developer Account
  • Proper Fleet API access permissions
  • Valid OAuth 2.0 bearer tokens

Installation

Install the Python dependencies once:

pip install -r requirements.txt

Running the MCP server

You can start the server in multiple ways:

Option 1: Using uvicorn (Recommended)

uvicorn tesla_mcp.app:app --host 0.0.0.0 --port 8000 --reload

Option 2: Docker compose method

make up

Option 3: Legacy method

python server.py

The server will start using HTTP Streaming on http://0.0.0.0:8084. Connect your MCP-compatible client (such as Cursor or VS Code with the MCP extension) and configure a server entry that points to this endpoint.

Usage Examples

Quick Start with MyTeslaMate

# 1. Start the server (uses MyTeslaMate API by default)
uvicorn tesla_mcp.app:app --host 0.0.0.0 --port 8000

# 2. Configure your MCP client with:
# URL: http://localhost:8000/sse
# Authorization: Bearer YOUR_MYTESLAMATE_TOKEN

Using Tesla Fleet API (Official)

# 1. Set your regional endpoint
export TESLA_BASE_URL=https://fleet-api.prd.na.vn.cloud.tesla.com

# 2. Start the server
uvicorn tesla_mcp.app:app --host 0.0.0.0 --port 8000

# 3. Configure your MCP client with:
# URL: http://localhost:8000/sse  
# Authorization: Bearer YOUR_TESLA_FLEET_TOKEN

Docker Usage

# Build the image
docker build -t tesla-mcp .

# Run with MyTeslaMate (default)
docker run -p 8000:8000 tesla-mcp

# Run with Tesla Fleet API
docker run -p 8000:8000 -e TESLA_BASE_URL=https://fleet-api.prd.na.vn.cloud.tesla.com tesla-mcp

Adding new modules

  • Create a file under tesla_mcp/modules/ inheriting from TeslaModule.
  • Register the module in tesla_mcp/modules/__init__.py.
  • Expose new MCP tools inside server.py that delegate to the module methods.

This structure keeps the MCP layer thin while centralising all Tesla Fleet API and TeslaMate API logic in the tesla_mcp package.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Registryactive
TransportHTTP
UpdatedApr 14, 2026
View on GitHub