69
/ 100
10 days ago
glama

TeslaMate MCP Server

Enables reading Tesla vehicle data from a TeslaMate PostgreSQL database, including status, trips, charging, efficiency, weather integration, and more, via 38 tools for MCP-compatible clients like Claude Code.

Is this your MCP?

Claim it to get a verified publisher badge, a free copy of our full audit findings, and direct contact for any high-priority issues we find.

Install from

M8ven verifies MCPs across every public registry — install directly from whichever one you prefer.

// key findings
No credential exfiltration, no sensitive file access, no obfuscation
Static analysis found nothing flowing your secrets to unexpected places.
Open source with a license and README
Anyone can audit the code, the license is declared, and the publisher documents what it does.
🔐
You'll be asked for 3 credentials: TESLAMATE_DB_PASS, AMAP_API_KEY, QWEATHER_API_KEY
These are read from process.env at runtime. Make sure you trust where they’ll be sent.
// required environment variables
This server reads these from process.env. You'll be asked to provide them before it can run.
configVERSION
configMCP_DEBUG- =false # 设为 true 开启详细日志
configTESLAMATE_DB_HOSTdatabase # PostgreSQL 主机(同一 Docker 网络下用 database)
configTESLAMATE_DB_PORT5432 # PostgreSQL 端口
configTESLAMATE_DB_USERteslamate # 数据库用户名
🔐 secretTESLAMATE_DB_PASSsecret # 数据库密码 ← 请修改
configTESLAMATE_DB_NAMEteslamate # 数据库名称
configTIMEZONEAsia/Shanghai # IANA 时区名(如 Asia/Shanghai、America/Los_Angeles)
configTESLA_CAR_ID1 # 默认车辆 ID(查看 TeslaMate 仪表盘)
configTESLA_CAR_PARAMS{"1":{"kwh":78.4,"range_km":675},"2":{"kwh":82,"range_km":751}}
configTESLA_BATTERY_KWH如只跑单车,下面的 + TESLA_BATTERY_RANGE_KM 仍生效
configTESLA_BATTERY_RANGE_KM如只跑单车,下面的 TESLA_BATTERY_KWH + 仍生效
configTESLA_ELECTRICITY_RATE_RMB0.6 # 电费(元/度)
configTESLA_ELECTRICITY_RATE_USD- =0.12 # 电费(美元/度,fallback)
configTESLA_GAS_PRICE- =3.50 # 油价(美元/加仑,用于节省计算)
configTESLA_GAS_MPG- =28 # 燃油车油耗(MPG,用于节省计算)
configUSE_METRIC_UNITStrue # true=公里/摄氏度/¥/Wh/km,false=英里/华氏度/$/Wh/mi
configTESLA_TPMS_MIN_THRESHOLD- =2.5 # 低压警告阈值(bar)
configTESLA_TPMS_MAX_THRESHOLD- =3.5 # 高压警告阈值(bar)
configTESLA_VAMPIRE_MIN_HOURS
configTESLA_VAMPIRE_MAX_HOURS
configTESLA_VAMPIRE_WEATHER_MAX
configTESLA_CAMPING_KWH_PER_HOUR🏕️ tesla_vampire_drain 露营模式(rate-based) —— 停车时间 >8 小时且平均每小时耗电速率 ≥ (默认 0.8 kWh/h)的事件自动标记为 🏕️ 露营模式。kWh 换算使用固定 75 kWh 参考电池。哨兵 / 第三方 app 不单独区分。所有露营事件保证附带停车点天气。
configTESLA_GEOCODE_CACHE_MAX
🔐 secretAMAP_API_KEY- =xxx # 你的高德 Web服务 Key
configTESLA_AMAP_TIMEOUT- =8 # 可选,请求超时(秒)
🔐 secretQWEATHER_API_KEY💡 天气功能需配置 + QWEATHER_API_HOST(需自行申请,见下方配置)。未配置时这两个工具返回友好提示,其余功能不受影响。此外,配置后 tesla_trip_cost 会按目的地实时天气自动修正电费估算(雨 +15% / 雪 +30% / 雾 +10% / 大风 +12%)。
configQWEATHER_API_HOST💡 天气功能需配置 QWEATHER_API_KEY + (需自行申请,见下方配置)。未配置时这两个工具返回友好提示,其余功能不受影响。此外,配置后 tesla_trip_cost 会按目的地实时天气自动修正电费估算(雨 +15% / 雪 +30% / 雾 +10% / 大风 +12%)。
configTESLA_QWEATHER_TIMEOUT- =8 # 可选,请求超时(秒)
configTESLA_CACHE_MAX_ENTRIES
configTESLA_MAX_LOOKBACK_DAYS
configHTTP_HOST0.0.0.0 # 绑定地址
configHTTP_PORT8080 # 容器内部端口
configMCP_TRANSPORTstreamable-http # stdio=命令行模式,streamable-http=容器模式
configTESLA_LIMIT_DRIVES- =500 # tesla_drives 最大返回条数
configTESLA_LIMIT_CHARGING- =500 # tesla_charging_history 最大返回条数
configTESLA_LIMIT_TRIP_CATEGORIES- =500 # tesla_trip_categories 分析行程数
configTESLA_LIMIT_BATTERY_HEALTH- =60 # tesla_battery_health 月度快照数
configTESLA_LIMIT_BATTERY_SAMPLES- =30 # tesla_battery_health 回退采样数
configTESLA_LIMIT_LOCATION_HISTORY- =50 # tesla_location_history 位置聚类数
configTESLA_LIMIT_STATE_HISTORY- =500 # tesla_state_history 状态转换数
configTESLA_LIMIT_SOFTWARE_UPDATES- =30 # tesla_software_updates 软件更新数
configTESLA_LIMIT_CHARGING_BY_LOCATION- =50 # tesla_charging_by_location 充电地点数
configTESLA_LIMIT_TPMS_HISTORY- =60 # tesla_tpms_history 胎压历史数
configTESLA_LIMIT_VAMPIRE_DRAIN- =50 # tesla_vampire_drain 掉电事件数
configTESLA_LIMIT_NARRATIVE
configTESLA_DB_POOL_RETRY_WINDOW_SEC
configTESLA_DB_POOL_RETRY_SLEEP_SEC
configTESLA_ROUTINE_CACHE_MAX
configTESLA_WEATHER_SAMPLE_MAX- =60 # 可选,天气能效分析采样行程数
// full audit trail
The full breakdown of what we checked, the deductions that landed, the network hosts, the dependency advisories, and concrete fix guidance is available to verified publishers.
// improvement guidance — verified publishers only
We have 5 concrete improvements we can share with the publisher of this MCP. Each comes with specific guidance to raise the trust score.
// embed badge in your README
[![M8ven Score](https://m8ven.ai/badge/mcp/6547709-teslamate-mcp-1m3w97)](https://m8ven.ai/mcp/6547709-teslamate-mcp-1m3w97)
commit: 502696ca9524626bfdecc5fafca73710d54d313b
code hash: 0f1af04aa66c2ca0dcfbcd5c6d7f649390f24136a804015d35bf3b70238d6309
verified: 7/21/2026, 9:32:01 AM
view raw JSON →