TeslaMate
🐍 🏠 - A Model Context Protocol (MCP) server that provides access to your TeslaMate database, allowing AI assistants to query Tesla vehicle data and analytics.
What is TeslaMate?
TeslaMate is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 🐍 🏠 - a model context protocol (mcp) server that provides access to your teslamate database, allowing ai assistants to query tesla vehicle data and analytics.
🐍 🏠 - A Model Context Protocol (MCP) server that provides access to your TeslaMate database, allowing AI assistants to query Tesla vehicle data and analytics.
This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 🐍 🏠 - A Model Context Protocol (MCP) server that provides ac
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx teslamateConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use TeslaMate
TeslaMate MCP Server connects your TeslaMate PostgreSQL database to AI assistants, exposing 20 specialized tools that surface Tesla vehicle analytics without writing SQL by hand. It covers battery health and degradation trends, charging session summaries, driving efficiency metrics, visited locations, and tire pressure patterns. A hardened `run_sql` tool lets you execute arbitrary read-only queries against your own TeslaMate schema, making it practical for both casual owners and data-driven enthusiasts who want natural-language access to their fleet data.
Prerequisites
- TeslaMate already running and logging data to a PostgreSQL database
- Python 3.11+ (for local setup) or Docker with Docker Compose (for containerized deployment)
- PostgreSQL connection string (DATABASE_URL) for the TeslaMate database
- An MCP-compatible client such as Claude Desktop or Claude Code
- uv package manager installed (for local Python setup)
Clone the repository
Clone the teslamate-mcp repository and enter the project directory.
git clone https://github.com/cobanov/teslamate-mcp.git
cd teslamate-mcpConfigure environment variables
Copy the example environment file and edit it to point to your TeslaMate PostgreSQL database. The DATABASE_URL is required; all other variables have sensible defaults.
cp env.example .env
# Edit .env and set:
# DATABASE_URL=postgresql://user:password@host:5432/teslamate
# AUTH_TOKEN= (optional bearer token for HTTP mode)
# PORT=8888 (HTTP bind port, default 8888)
# QUERY_TIMEOUT_MS=5000Install dependencies and run locally
Use uv to sync the Python environment and start the server in stdio mode for local MCP client use.
uv sync
teslamate-mcp stdioOr deploy via Docker
For a persistent remote deployment, start the server with Docker Compose. The prebuilt image is available from the GitHub Container Registry.
docker compose up -d
# Or use the prebuilt image directly:
# docker run -e DATABASE_URL=... ghcr.io/cobanov/teslamate-mcp:latestConfigure your MCP client
Add the server entry to your Claude Desktop or Claude Code configuration file so the client can launch and connect to it.
Verify available tools
List all 20 exposed tools to confirm the server is connected and can reach the TeslaMate database.
teslamate-mcp list-toolsTeslaMate Examples
Client configuration
Add this block to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) to connect Claude Desktop to your local TeslaMate MCP server.
{
"mcpServers": {
"teslamate": {
"command": "teslamate-mcp",
"args": ["stdio"],
"env": {
"DATABASE_URL": "postgresql://user:password@localhost:5432/teslamate"
}
}
}
}Prompts to try
Natural-language queries you can send once the server is connected.
- "Show me my battery degradation over the past 6 months"
- "What were my top 5 longest drives this year?"
- "Summarize my charging sessions at home vs public chargers"
- "What is my average driving efficiency in Wh/km by month?"
- "List the locations I visit most frequently"Troubleshooting TeslaMate
Server fails to start with 'could not connect to server' error
Verify DATABASE_URL is correct and that the PostgreSQL server is reachable. If TeslaMate runs in Docker, use the container's service name (e.g., postgresql://teslamate:password@db:5432/teslamate) and ensure the MCP server is on the same Docker network.
run_sql returns a timeout error for complex queries
Increase QUERY_TIMEOUT_MS in your .env file (default is 5000 ms). For large datasets also consider lowering CUSTOM_SQL_ROW_LIMIT to reduce the result set size.
Claude cannot find the teslamate-mcp command
Ensure uv sync completed without errors and that the virtualenv's bin directory is in PATH, or specify the full path to the teslamate-mcp binary in the MCP client config's "command" field.
Frequently Asked Questions about TeslaMate
What is TeslaMate?
TeslaMate is a Model Context Protocol (MCP) server that 🐍 🏠 - a model context protocol (mcp) server that provides access to your teslamate database, allowing ai assistants to query tesla vehicle data and analytics. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install TeslaMate?
Follow the installation instructions on the TeslaMate GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with TeslaMate?
TeslaMate works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is TeslaMate free to use?
Yes, TeslaMate is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
TeslaMate Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to TeslaMate? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
Browse More Monitoring & Observability MCP Servers
Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up TeslaMate in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use TeslaMate?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.