Purpose: This is a Model Context Protocol (MCP) server that reads your TeslaMate PostgreSQL database, letting MCP clients such as Claude Desktop and Cursor query Tesla vehicle data and analytics.
Main capabilities: Provides 57 tools, 11 prompts, and interactive charts. Includes 47 SQL report tools covering battery capacity and degradation, sleep and state history, daily timeline, trips, range estimates, fast-charging speed, charging costs and fuel savings, elevation, vampire drain, geofences, driving patterns, routes, and trip and charging session search. 8 interactive charts (MCP Apps): charging curve, battery degradation, trip route map and elevation profile, monthly/yearly activity dashboard, visited places map, energy consumption vs temperature relationship; clients that do not support charts return plain row data. Also includes get_database_schema and read-only run_sql, with support for declarative custom queries in .toml.
Usage: Requires an existing TeslaMate and its PostgreSQL database. Local installation requires Python 3.11+: git clone https://github.com/cobanov/teslamate-mcp.git,cd teslamate-mcp, cp env.example .env and set DATABASE_URL, uv sync; for local clients run teslamate-mcp stdio, for remote clients run teslamate-mcp http (with bearer-token authentication and a /health probe). Docker method endpoint http://localhost:8888/mcp,健康检查 http://localhost:8888/health,多架构镜像发布到 GHCR. You can add this server to the mcpServers configuration in Claude Desktop or Cursor.
Use cases: Battery health and degradation analysis, parked power drain troubleshooting, longest trip route replay, monthly comparisons, winter range estimates, vehicle sleep diagnostics, etc.
Limitations: Only reads the TeslaMate PostgreSQL database; you must deploy and configure it yourself. Optional cost writes are disabled by default and require setting ENABLE_CHARGING_WRITES=true, and require granting write permission on a single column as a security boundary; clients that support MCP elicitation will first show a confirmation; run_sql always runs in a READ ONLY transaction and always rolls back, and has time and row limits. It is recommended to use a database role with SELECT-only permissions, and not to use the teslamate superuser that comes with TeslaMate. Map tiles are fetched from Esri by the browser; MAP_TILES=false can disable this. When connecting through a Cloudflare portal, the portal rewrites the ui:// resource URI, so interactive charts cannot render. The time zone can be set with REPORT_TIMEZONE. The license is MIT. Specific pricing and further deployment details were not provided.