All notable changes to this project are documented in this file. The format follows Keep a Changelog and this project adheres to Semantic Versioning.
- FastMCP exposed the internal
Contextparameter (ctx) as a required client-facing tool argument on every tool, so MCP clients failed every call withctx Field required.from __future__ import annotationsmade FastMCP see the annotation as a string and miss the Context-detection branch; the fix patches__annotations__["ctx"]back to the realContextclass before registering each tool. (#7)
- Regression test that constructs the server and asserts
ctxis absent from every tool's MCP-facinginputSchemawhilerun_sqlstill requiresquery.
- Single
teslamate-mcpconsole script withstdio,http,gen-token, andlist-toolssubcommands. src/teslamate_mcppackage using a proper src-layout, distributable via hatchling.- Six MCP prompts for common analyses: battery health, driving summary, charging behaviour, anomalies, weather efficiency, and a quick status report.
- Two MCP resources:
teslamate://queries(index) andteslamate://queries/{name}(raw SQL per tool). Context.info/Context.warningstreaming from every tool, including elapsed time onrun_sql./healthliveness route and DockerHEALTHCHECK.- Multi-stage Dockerfile producing a slim runtime image with OCI labels.
- Release workflow: pushing a
v*tag builds and publishes a multi-arch image to GHCR and opens a GitHub release. - GitHub Actions CI: ruff lint/format check, pytest on Python 3.11/3.12/3.13, Docker build smoke test.
- pytest suite with testcontainers-backed Postgres for end-to-end coverage of the read-only execution path.
run_sqlnow runs inside a PostgreSQLREAD ONLYtransaction withstatement_timeout,lock_timeout, andidle_in_transaction_session_timeoutenforced viaSET LOCAL. When the user omitsLIMIT, the query is wrapped in a capped subselect.get_database_schemareadsinformation_schemaat runtime instead of a checked-in JSON snapshot.- Decimal column values are serialised as
floatso language models can do arithmetic on them. - Bearer-token comparison switched to
hmac.compare_digest(timing-safe). - Configuration moved to
pydantic-settingswith full.envsupport.
main.pyandmain_remote.py(replaced by the CLI subcommands).utils/generate_token.py(replaced byteslamate-mcp gen-token).data/all_db_info.json(replaced by live introspection).- Direct dependency on the standalone
fastmcpPyPI package; the project now uses only the officialmcp[cli]SDK.
Previous baseline. See git history for details.