Vitals

SRJT-006

Recovery, strain and sleep metrics from a cheap watch, on your own machine.

Status
Active
Package
Python CLI, MCP server
Source
github.com/DevSrijit/vitals

Recovery, strain and sleep metrics from Health Connect exports

Features

  • Whoop-style recovery, strain and sleep metrics from raw Android Health Connect exports
  • Works with any watch whose app writes heart rate, sleep and SpO2 to Health Connect
  • Published formulas: Banister TRIMP, Karvonen zones, Keytel calories, the impulse-response model
  • Every number reproducible from the raw tables; every constant in one file
  • Output: a SQLite database, CSV, Markdown reports and a web dashboard
  • An MCP server, so Claude Code or any other agent can query your data
  • Idempotent sync: the same export ingested twice changes nothing
  • No cloud account, no subscription, no AI inference
  • A synthetic 35-day demo, so you can try it without a watch

Pin configuration and functions

1DOCTOR2INGEST3COMPUTE4SYNC5REPORT6SQL7MCP8WEB

Q package, 8-pin, top view

PinNameI/ODescription
1DOCTORIInventory of an export and the local database, sample gaps, last sync vitals doctor
2INGESTILoad a Health Connect zip or database, or a Takeout Fit export vitals ingest
3COMPUTEI/ORecompute the daily and workout_metrics tables vitals compute
4SYNCI/Orclone pull, ingest, compute and report vitals sync
5REPORTOMarkdown report with daily and workout tables vitals report
6SQLORead-only SQL, CSV to stdout vitals sql
7MCPI/Ostdio MCP server with eight tools, run_sql read-only vitals-mcp
8WEBONext.js dashboard over the same database, read-only web/

Electrical characteristics

Ranges and constants as the README states them. Every constant lives in vitals/metrics.py. The README gives no timings, so this table has none.

ParameterTest conditionsMinTypMaxUnit
Outputs
RecoveryResting HR, sleep and SpO2; HRV when the watch gives itResting HR, sleep and SpO2; HRV when the watch gives it0–0 to 100100–
Recovery, green bandYellow 34 to 66, red below 34Yellow 34 to 66, red below 3467–≥ 67––
Strain21 × (1 − e^(−L / 155)), L = Edwards TRIMP21 × (1 − e^(−L / 155)), L = Edwards TRIMP0–0 to 2121–
Strain, 60 min in zone 5The last points are the hardest to earnThe last points are the hardest to earn–1818(1)––
MCP toolsstdio serverstdio server–88–tools
Model constants
τCTLFitness windowExponential average of TRIMPExponential average of TRIMP–4242–days
τATLFatigue windowExponential average of TRIMPExponential average of TRIMP–77–days
ACWR risk zone7-day mean over 28-day mean7-day mean over 28-day mean1.5–≥ 1.5––
SpO2 componentOvernight minimum, mapped to 0 and 100Overnight minimum, mapped to 0 and 10088–88 to 9595%
HR sample cap, backgroundGap to the next sample, defaultGap to the next sample, default–1010–min
HR sample cap, workoutGap to the next sampleGap to the next sample–6060–s
Supply
PythonWith uvWith uv3.12–≥ 3.12––
AndroidScheduled Health Connect exportScheduled Health Connect export15–≥ 15––
Background synclaunchd agent, default intervallaunchd agent, default interval–66–h
Demo exportSynthetic, writes only to .demo/Synthetic, writes only to .demo/–3535–days
Cloud accountRuns on your own machineRuns on your own machine–NoneNone––

(1) The source states this value as “about”.

Every value on this page is from the project README. The recovery score is a trend instrument, not a diagnosis.

Application circuit

U1VITALSIngestComputeSQLite databaseJ1HC EXPORTZIPCLKSYNC, 6 h8 toolsread-onlyMarkdown, CSVMCPDASHBOARDREPORTSJ1HEALTH CONNECT EXPORTDaily zip, synced every 6 hU1VITALSIngest, computeSQLite databasedaily, workout_metricsJ2MCP · DASHBOARD · REPORTS

Figure 2. SRJT-006 Typical Application: export in, metrics out

Ordering information

Orderable partSRJT-006 VITALS
StatusActive
PackagePython CLI, MCP server
Sourcegithub.com/DevSrijit/vitals
LicenseMIT
BuildPython 3.12 with uv, and SQLite. The dashboard is Next.js on Bun.
Works withAny watch whose app writes heart rate, sleep and SpO2 to Health Connect.