# cobanov/teslamate-mcp [Health: Active]

**Category:** 🚆 Travel & Transportation  
**Repository:** https://github.com/cobanov/teslamate-mcp  
**GitHub Stars:** 139  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/cobanov-teslamate-mcp

## Description
A Model Context Protocol (MCP) server that provides access to your TeslaMate database, allowing AI assistants to query Tesla vehicle data and analytics.

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "teslamate-mcp": {
    "command": "npx",
    "args": ["-y","cobanov-teslamate-mcp"],
    "env": {
      "DATABASE_URL": "",
      "AUTH_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `DATABASE_URL`, `AUTH_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What cobanov/teslamate-mcp MCP server does

The cobanov/teslamate-mcp MCP server lets an MCP-compatible AI client query a TeslaMate PostgreSQL database. TeslaMate records vehicle activity, and this server makes that history available through natural-language requests translated into MCP tool calls. It is suited to questions about charging sessions, battery capacity, driving efficiency, routes, costs, temperature effects, and other data TeslaMate stores.

The project advertises 35 tools. Most are analytics or search queries, while one general SQL tool covers questions outside the predefined reports. The server also provides schema introspection, so an agent can inspect the database structure before forming a query. Query tools support optional filters including `car_name`, `days`, `limit`, and threshold values.

## How it works

A local deployment communicates over stdio, which is the documented approach for Claude Desktop and Cursor. A remote deployment runs over streamable HTTP and exposes the MCP endpoint at `/mcp`; bearer authentication is used for that mode. `/health` is available as a probe endpoint.

The normal query path is read-only. `run_sql` runs inside a read-only transaction that is rolled back, so it is intended for investigation rather than changing TeslaMate records. A separate write capability is disabled by default and is restricted to one column for the documented charging-cost workflow.

Three tools can render self-contained SVG charts in clients that support MCP Apps: `show_charging_curve`, `show_battery_degradation`, and `show_drive_route`. Clients without MCP Apps support receive the corresponding rows instead of an embedded chart. The cobanov/teslamate-mcp MCP server therefore remains usable across clients, but chart presentation depends on client capabilities.

## Setup and configuration

A running TeslaMate installation with PostgreSQL is required. The local setup requires Python 3.11 or newer, unless Docker is used. The repository instructions use `uv`: clone the project, copy `env.example` to `.env`, set `DATABASE_URL`, and run `uv sync`. A client can then launch the server with `uv --directory <checkout> run teslamate-mcp stdio`; the checkout path must be replaced with the actual local path.

For remote use, the documented Docker image is `ghcr.io/cobanov/teslamate-mcp:latest`. Pass the TeslaMate PostgreSQL connection through `DATABASE_URL` and provide an `AUTH_TOKEN`; the container listens on port 8888 in the example deployment. The image supports `amd64` and `arm64`. Because TeslaMate data can include location history, the documentation recommends keeping the service on a private network, such as one protected by a VPN or Tailscale.

## Tools and capabilities

The cobanov/teslamate-mcp MCP server supports:

- Analytics and search queries across TeslaMate records.
- Custom SQL through `run_sql` within a read-only transaction.
- Database schema introspection for query planning.
- Optional report filters for vehicle, time period, result count, and thresholds.
- Charging, battery degradation, and drive-route chart tools.
- An opt-in, limited write path for charging-cost data.

The repository also documents a way to add query tools with a SQL file and TOML sidecar, without writing Python. This is relevant when the built-in reports do not cover a particular TeslaMate question.

## Limitations and notes

This server does not collect Tesla data itself; TeslaMate must already be running and writing to PostgreSQL. Its answers are limited to the data available in that database and the queries exposed by the server or supplied through `run_sql`.

Local stdio mode and remote HTTP mode have different deployment requirements. Remote mode needs bearer authentication configuration, while local mode requires a usable database connection. Chart rendering also depends on MCP Apps support in the selected client. The default query behavior is read-only, and the write capability must be explicitly enabled before it can be used.

_Full upstream README: https://allmcps.com/mcp/cobanov-teslamate-mcp/readme_

