Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

mcp-teslamate-fleet](https://glama.ai/mcp/servers/lodordev/mcp-teslamate-fleet/badges/score.svg)](https://glama.ai/mcp/servers/lodordev/mcp-teslamate-fleet) 🐍 🏠 - Combined TeslaMate analytics + Fleet API commands β€” 29 tools for vehicle telemetry, driving...

README.md

TeslaMate + Fleet API MCP Server

![mcp-teslamate-fleet MCP server](https://glama.ai/mcp/servers/lodordev/mcp-teslamate-fleet)

MCP server combining TeslaMate historical analytics with Fleet API live data and commands. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.

The first MCP server to bring both data sources together β€” use TeslaMate for deep analytics and Fleet API for real-time control, or configure just one.

Features

29 tools across four categories:

| Category | Tools | Backend | |----------|-------|---------| | Status & History | tesla_status, tesla_drives, tesla_charging_history, tesla_battery_health, tesla_efficiency, tesla_location_history, tesla_state_history, tesla_software_updates | TeslaMate | | Analytics | tesla_savings, tesla_trip_cost, tesla_efficiency_by_temp, tesla_charging_by_location, tesla_top_destinations, tesla_longest_trips, tesla_monthly_summary, tesla_vampire_drain | TeslaMate | | Live Data | tesla_live | Fleet API | | Commands | tesla_climate_on/off, tesla_set_temp, tesla_charge_start/stop, tesla_set_charge_limit, tesla_lock, tesla_unlock, tesla_honk, tesla_flash, tesla_trunk, tesla_sentry | Fleet API |

Safety: unlock and trunk commands require confirm=True. All commands are rate-limited to 40/day.

Quick Start

Claude Code (.mcp.json)

{
  "mcpServers": {
    "tesla": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/lodordev/mcp-teslamate-fleet", "mcp-teslamate-fleet"],
      "env": {
        "TESLAMATE_DB_HOST": "localhost",
        "TESLAMATE_DB_PASS": "your_password",
        "TESLA_VIN": "your_vin",
        "TESLA_TOKEN_FILE": "/path/to/tokens.json",
        "TESLA_CLIENT_ID": "your_client_id",
        "TESLA_CLIENT_SECRET": "your_client_secret",
        "TESLA_PROXY_URL": "https://localhost:4443",
        "TESLA_VERIFY_SSL": "false"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

Same structure β€” add under mcpServers.

Local install

git clone https://github.com/lodordev/mcp-teslamate-fleet
cd tesla-mcp
pip install -e .

Prerequisites

You need at least one of these backends configured. Both is ideal.

TeslaMate (analytics + history)

TeslaMate is an open-source Tesla data logger. It records driving, charging, and vehicle state to a Postgres database.

If you already run TeslaMate, you just need the database connection details. If not, see the TeslaMate installation guide.

Fleet API (live data + commands)

Tesla's Fleet API provides real-time vehicle data and remote commands. Setup requires:

  1. Register an app at developer.tesla.com
  2. Generate OAuth tokens β€” use Tesla's token generation flow
  3. Set up the HTTP proxy β€” commands must be signed using the Tesla Vehicle Command Protocol. Deploy the tesla-http-proxy from that repo

The proxy is only needed for commands (tesla_climate_on, tesla_lock, etc.). tesla_live works with just a token.

Tesla provides a $10/month free credit for Fleet API, which is more than enough for personal MCP use.

Configuration

All configuration is via environment variables.

TeslaMate Database

| Variable | Default | Description | |----------|---------|-------------| | TESLAMATE_DB_HOST | (required) | Postgres host | | TESLAMATE_DB_PORT | 5432 | Postgres port | | TESLAMATE_DB_USER | teslamate | Postgres user | | TESLAMATE_DB_PASS | (required) | Postgres password | | TESLAMATE_DB_NAME | teslamate | Database name |

Fleet API

| Variable | Default | Description | |----------|---------|-------------| | TESLA_VIN | (required) | Vehicle VIN | | TESLA_TOKEN_FILE | (required) | Path to tokens.json with OAuth tokens | | TESLA_CLIENT_ID | | Fleet API client ID (for token refresh) | | TESLA_CLIENT_SECRET | | Fleet API client secret (for token refresh) | | TESLA_PROXY_URL | | HTTP proxy URL for commands | | TESLA_FLEET_URL | NA region | Fleet API endpoint (regional options) | | TESLA_VERIFY_SSL | true | Set false for self-signed proxy certs |

Vehicle Configuration

| Variable | Default | Description | |----------|---------|-------------| | TESLA_CAR_ID | 1 | TeslaMate car ID (for multi-car instances) | | TESLA_BATTERY_KWH | 75 | Usable battery capacity in kWh | | TESLA_BATTERY_RANGE_KM | 525 | EPA range at 100% in km |

Energy consumption is estimated from ideal range deltas using these values. Adjust for your vehicle:

| Vehicle | Battery (kWh) | Range (km) | |---------|--------------|------------| | Model 3 Standard Range | 54 | 350 | | Model 3 Long Range | 75 | 500 | | Model Y Long Range | 75 | 525 | | Model S Long Range | 100 | 650 | | Model X Long Range | 100 | 560 |

Cost Defaults

These are defaults β€” tesla_savings and tesla_trip_cost accept per-call overrides.

| Variable | Default | Description | |----------|---------|-------------| | TESLA_ELECTRICITY_RATE | 0.12 | Electricity cost in $/kWh | | TESLA_GAS_PRICE | 3.50 | Gas price in $/gallon (for comparison) | | TESLA_GAS_MPG | 28 | Comparable gas vehicle MPG |

Architecture

Single-file Python server (~1400 lines) using FastMCP. Two data paths:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TeslaMate   │────▢│   Postgres   │──┐
β”‚  (logger)    β”‚     β”‚  (telemetry) β”‚  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                       β”œβ”€β”€β–Άβ”‚ tesla.py  │────▢│ MCP Client β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   β”‚ (server)  β”‚     β”‚ (Claude,   β”‚
β”‚  Tesla       │────▢│ HTTP Proxy   β”‚β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  Cursor)   β”‚
β”‚  Fleet API   β”‚     β”‚ (commands)   β”‚                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Limitations

  • Single vehicle β€” queries use a configurable car_id but tools don't accept it as a parameter. Multi-car users should run separate server instances.
  • Imperial units β€” output is in miles, Β°F, and PSI. Metric support is planned.
  • Estimated kWh β€” TeslaMate's drives table doesn't include energy consumed directly. We estimate from ideal range deltas using your configured battery capacity. Accuracy is ~90-95%.

Credits

Inspired by cobanov/teslamate-mcp. Built with FastMCP and TeslaMate.

License

MIT

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.