TeslaMate MCP Server

A Model Context Protocol server that exposes your TeslaMate PostgreSQL database to MCP-aware AI clients (Claude Desktop, Cursor, etc.) over either stdio or streamable HTTP.
Features
- 20 tools — 18 predefined analytics queries (battery, charging, driving, efficiency, locations) plus
run_sqlandget_database_schema - 6 prompts — one-click workflows for battery health, driving summary, charging behaviour, anomaly hunting, weather efficiency, and a quick status report
- 2 resources —
teslamate://queriesandteslamate://queries/{name}for catalog browsing without invoking a tool - Hardened
run_sql— runs inside a PostgreSQLREAD ONLYtransaction withstatement_timeout,lock_timeout, and an automatic row cap - Live schema introspection —
get_database_schemareadsinformation_schemaat runtime; no stale JSON checked into the repo - Two transports, one binary —
teslamate-mcp stdiofor local clients,teslamate-mcp httpfor remote - Bearer-token auth with timing-safe comparison;
/healthprobe for liveness checks Decimal → floatJSON serialization so language models see numbers, not strings






