I almost bought a sleep ring. My watch already had the data; I just couldn’t ask it anything.

My watch knew I was running on empty before I did.
I wear a Garmin Forerunner 255. Every night it records heart-rate variability (HRV), sleep stages, resting heart rate and a “Body Battery”. It’s a good sensor.
What it can’t do is answer questions. The app shows tiles. It won’t tell me why my sleep score dropped, whether this week is unusual for me, or what to do about it before a long trip.
So I built something that can. My watch data now syncs every hour to a small server at home. Claude can read it, read-only, when I ask.
Built from a phone, between flights
I built it during a long-haul, multi-leg trip, using only my phone. I don’t mean I typed the code on a phone. I gave instructions to Claude running as a coding agent, through Orca, a tool I use to dispatch AI coding workers from my phone.
By mid-morning, the agent had:
- written a sync job on my desktop
- moved it to my always-on home server, with an hourly timer
- added a Grafana dashboard
- given Claude a read-only way to query the data
The one real bug was the login. Garmin accepted my password, then emailed a one-time code, but the page had no clear place to type it. Every reload started a new login and sent a new code. The fix was a two-step page that remembers where it is and shows each step.
What it does
- Every hour, it pulls the last three days from Garmin Connect: sleep, overnight HRV and Garmin’s baseline for it, Body Battery, stress, resting heart rate, training status and load, VO2 max and activities.
- It stores everything in one SQLite file on your machine: Garmin’s raw responses plus tidy tables.
- One command answers questions about it.
watch-health contextprints a compact JSON snapshot: today, the last week, and anything unusual. Any AI agent that can run a command can use it: Claude Code, Codex, Gemini CLI, or a script. - A read-only MCP server offers the same views to Claude Desktop and the Claude mobile apps.
- Optionally, it mirrors to InfluxDB for a Grafana dashboard, and sends a push when Garmin’s login needs you.
The read side can’t change anything. It reads the database and never touches the network.
The baseline comparison does the quiet, useful work. It compares your last 7 days with the 4 weeks before. It reports the change and how unusual it is against your normal day-to-day spread, and only calls a metric “better” or “worse” once it’s outside that spread. That keeps the assistant from overreacting to one bad night.

Set it up yourself (about 30 minutes)
The code is MIT-licensed and open source as watch-health: github.com/ovidiul/watch-health. The README has the details. This is the short version.
You’ll need:
- a Mac or 64-bit Linux machine that stays on (a Raspberry Pi with a 64-bit OS works)
- Docker with Compose v2 and git, or git and uv
- an AI agent: Claude Code, Codex, Gemini CLI, or Claude Desktop
- a Garmin password. If you sign in with Apple or Google, set one first. If you use two-step verification, have your email, phone or authenticator app ready.
With Docker (sync, dashboard and the read-only reader):
git clone --branch v0.1.0 https://github.com/ovidiul/watch-health.git && cd watch-health
./scripts/init-env.sh # random passwords + your time zone
docker compose up -d # sync job, InfluxDB, Grafana
docker compose run --rm sync login # email, password, then Garmin's code
docker compose run --rm -T mcp context # ask your data (offline, read-only)
Grafana is at http://localhost:3000, with the dashboard already set up.
Without Docker (no dashboard, unless you bring your own InfluxDB and Grafana):
git clone --branch v0.1.0 https://github.com/ovidiul/watch-health.git && cd watch-health
uv sync --frozen && ln -s "$PWD/.venv/bin/watch-health" ~/.local/bin/
watch-health login
watch-health context
Then schedule watch-health sync hourly with cron, systemd or launchd. The repo has examples.
Some tips:
- Tell your agent it exists. One line in its instructions is enough: “run
watch-health contextfor my sleep and training data”. For Claude Desktop, add the MCP server instead (one line, in the README). - Backfill gently.
sync --days 30is paced to about one request a second. Wait a day before going further back. - Data on a home server, agent on your laptop? Use a dedicated SSH key locked to
watch-health agent. It can then run the read commands and nothing else (the README shows the setup). - Reaching Grafana remotely:
ssh -N -L 3000:localhost:3000 your-server, then openlocalhost:3000. Or use a VPN like Tailscale. Don’t expose it to the internet. - First questions to try: “How does my last week compare to my normal?”, “Show my HRV against my baseline for the last month”, or “Plan my training around a trip next week.”
- Not ready to connect your account?
docker compose run --rm sync demo-dataloads synthetic numbers, so you can try everything first.
What I learned from my own data

I asked Claude: “Look at my last 30 days. How am I doing, and what should I change before this trip?” It pulled the summaries, ran the baseline comparison and came back with this:

- HRV slipped below my normal range. My 7-day average sat at 43–45 ms against Garmin’s band for me of 46–61 ms. Garmin flagged it “unbalanced” for 8 days running.
- I was sleeping about an hour less. Sleep went from 7.9 to 6.8 hours a night, and my sleep score from the high 80s to about 81. My bedtimes had also drifted later. That’s a correlation, not proof, but it’s an easy thing to fix.
- I had overdone it mid-month. Training load spiked to 1.7–1.9× my usual, and the watch called it “Strained”.
- My fitness was fine. VO2 max held at 48.
Every one of those numbers was already in the Garmin app. What changed was seeing them side by side, against my normal, in one paragraph.
Then I asked for a plan for flying west across time zones. It suggested:
- easy runs only for the first three days
- afternoon and evening light to shift my body clock later, and no bright light early in the morning
- bed around 23:00 local time, with no hard sessions until HRV is back in its band
- a short check-in with it each morning
That’s sensible, unglamorous advice, tied to my numbers and updated as they change.
Why I didn’t buy the Oura ring
I’d been eyeing a sleep ring, on the theory that I needed better recovery data.
I didn’t. My watch already measures overnight HRV, sleep and resting heart rate every night. A ring would have given me a second app with a second set of tiles.
The gap was never the sensor. It was being able to ask questions.
(If you don’t like sleeping in a watch, a ring is a different story.)
Privacy and caveats
- It’s unofficial, and Garmin’s terms prohibit automated access. The community
garminconnectlibrary logs in the way Garmin’s own app does. Garmin could rate-limit or suspend your account, and that risk is yours. The official routes are Garmin’s developer program (for businesses) and the data export in your account settings. - It’s new, and it will break. When Garmin changes something, the sync stops until the library catches up. Your already-synced data stays safe in SQLite.
- Self-hosted isn’t fully private. Garmin holds all of this data in the first place. Anything your agent reads goes to its AI provider (for me, Anthropic) as part of the conversation. If you use ntfy.sh for pushes, that’s another third party (the messages never contain health data).
- Your data is more revealing than you’d think. Garmin names activities after cities, and the raw data includes start coordinates. The read commands return activity names, not coordinates.
- “Read-only” only holds if the key is locked down. The read commands can’t change anything. But if an agent reaches your server through an ordinary SSH key, the same key opens a shell. Use the restricted
agentkey, and treat activity names as untrusted text. - It’s not medical advice. A watch estimates and an AI summarises. If something feels wrong, see a doctor.
What’s next
- A short morning summary pushed to my phone after the watch’s Morning Report.
- Alerts on streaks, like “HRV below your band three nights running”, not single bad nights.
- Marking travel days, so a night on a plane doesn’t look like a trend.
The data your devices collect should be yours to question, with tools you choose. With the repo above, it should take you about half an hour.