TeslaMate MCP Server
Provides tools to interact with TeslaMate, a self-hosted data logger for Tesla vehicles, enabling health checks, logging suspension/resume, and GPX data retrieval.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TeslaMate MCP Servercheck health of TeslaMate"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
teslamate-mcp
MCP server built from skeleton-mcp that exposes TeslaMate HTTP APIs.
What This Server Exposes
TeslaMate endpoints covered by dedicated tools:
GET /health_checkPUT /api/car/:id/logging/suspendPUT /api/car/:id/logging/resumeGET /drive/:id/gpx
Additional MCP tools:
teslamate_connection_infoteslamate_scope_infoteslamate_list_endpointsteslamate_api_request(generic passthrough to support all currently available TeslaMate routes)
Related MCP server: Tesla MCP Server
Tool Catalog
teslamate_connection_infoReturns MCP and TeslaMate connection/auth configuration status (without leaking secrets).
teslamate_list_endpointsReturns the currently known TeslaMate routes from TeslaMate docs/source.
teslamate_scope_infoReturns the effective user scope used to resolve TeslaMate connection settings.
teslamate_health_checkCalls
GET /health_check.Optional
userIdroutes the call to a specific TeslaMate user profile.
teslamate_suspend_loggingCalls
PUT /api/car/:id/logging/suspend.Optional
userIdroutes the call to a specific TeslaMate user profile.Requires
authorizationKeywhenMCP_ADMIN_AUTH_KEYis configured.
teslamate_resume_loggingCalls
PUT /api/car/:id/logging/resume.Optional
userIdroutes the call to a specific TeslaMate user profile.Requires
authorizationKeywhenMCP_ADMIN_AUTH_KEYis configured.
teslamate_get_drive_gpxCalls
GET /drive/:id/gpx.Optional
userIdroutes the call to a specific TeslaMate user profile.
teslamate_api_requestGeneric TeslaMate request tool with method/path/query/body/headers support.
Optional
userIdroutes the call to a specific TeslaMate user profile.Uses the configured TeslaMate base URL and auth mode.
Mutating methods (
POST,PUT,PATCH,DELETE) requireauthorizationKeywhenMCP_ADMIN_AUTH_KEYis configured.
Environment
Copy .env.example to .env and set at least:
TESLAMATE_BASE_URL(defaulthttp://127.0.0.1:4000)TESLAMATE_AUTH_MODE(none,bearer, orbasic)TESLAMATE_BEARER_TOKENif using bearer authTESLAMATE_BASIC_USERNAMEandTESLAMATE_BASIC_PASSWORDif using basic auth
Optional security control for mutating MCP operations:
MCP_ADMIN_AUTH_KEY
Multi-user TeslaMate routing:
MCP_CONFIG_DEFAULT_USER_IDsets the default profile (defaultwhen unset).TESLAMATE_USER_OVERRIDES_JSONis a JSON object keyed by user id with per-user TeslaMate overrides.For HTTP mode with Vault token auth, authenticated token metadata
userIdis used as request scope automatically.
Example TESLAMATE_USER_OVERRIDES_JSON:
{
"default": {
"baseUrl": "http://teslamate-default:4000",
"authMode": "none"
},
"user-123": {
"baseUrl": "http://teslamate-user-123:4000",
"authMode": "bearer",
"bearerToken": "token-for-user-123"
}
}HTTP auth modes and sources:
MCP_HTTP_AUTH_MODEsupportstoken,oauth2, orboth.MCP_HTTP_TOKEN_SOURCE=envkeeps static tokens fromMCP_HTTP_AUTH_TOKENS.MCP_HTTP_TOKEN_SOURCE=vaultvalidates bearer tokens from Vault token index and can resolve authenticateduserId.MCP_HTTP_VAULT_TOKEN_INDEX_PATH,MCP_HTTP_VAULT_TOKEN_DEFAULT_USER_ID,MCP_HTTP_VAULT_TOKEN_REQUIRED_SCOPES,MCP_HTTP_VAULT_TOKEN_REQUIRED_AUDIENCE,MCP_HTTP_VAULT_TOKEN_CACHE_TTL_MSconfigure Vault token verification.MCP_HTTP_OAUTH2_INTROSPECTION_URL,MCP_HTTP_OAUTH2_CLIENT_ID,MCP_HTTP_OAUTH2_CLIENT_SECRET,MCP_HTTP_OAUTH2_REQUIRED_SCOPES,MCP_HTTP_OAUTH2_REQUIRED_AUDIENCE,MCP_HTTP_OAUTH2_TIMEOUT_MS,MCP_HTTP_OAUTH2_CACHE_TTL_MSconfigure OAuth2 introspection.
Run
Install dependencies:
npm installStart stdio MCP server:
npm run start:stdioStart HTTP MCP server:
npm run start:httpExternal Services Mode
This project still includes docker-compose.external.yml for app-only runs that point to external services. If you use that mode, configure at least POSTGRES_HOST and VAULT_ADDR in your environment before launching the compose file.
Notes On TeslaMate API Coverage
TeslaMate's native JSON API surface is intentionally small. This MCP includes dedicated tools for all known API-style endpoints and adds teslamate_api_request so new/instance-specific routes can be accessed without waiting for a code change.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LesterAJohn/TeslaMate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server