Skip to main content
Glama
bank3005-jpg

Garmin Nutrition Coach

by bank3005-jpg

Turn Claude into your personal, data-driven health coach โ€” self-hosted, private, ~$0/month.

License: MIT MCP Cloud Run Python

Why LeanLoop?

Losing weight is a calorie deficit โ€” but a deficit run blind burns muscle, not just fat. Lose muscle and your daily burn (TDEE) drops, so you have to eat even less to keep losing. That's the slow-starvation spiral that makes most diets miserable and short-lived.

LeanLoop keeps you on the healthy side of that line by giving Claude three things at once:

  • ๐Ÿฝ๏ธ What you eat โ€” snap a photo or just type it; calories and macros land in Notion, and every meal is kept with its time so you can see your real eating habits, not just a daily number.

  • ๐Ÿ”ฅ What you actually burn โ€” your Garmin measures it live, every day (workouts, steps, all-day movement), so your deficit is based on your real body โ€” not a one-size-fits-all formula that's wrong for you.

  • ๐ŸŒ™ How you're recovering โ€” sleep, HRV, stress and body battery feed the coaching, so "train hard or rest today?" fits the day you're actually having.

Because all of it already flows to Claude, there's no more screenshotting dashboards into chat. Just ask.

"Coach me today" ยท "How did I sleep?" ยท "Why did my run feel bad?" ยท "What are my eating patterns this week?" ยท ๐Ÿ“ธ [photo of lunch]

โœจ Features

Feature

What it does

๐Ÿ“ธ

Photo (or text) food logging

Snap a meal or type it โ†’ calories & macros estimated and auto-saved to Notion, with the full per-meal history (time + item) kept on the day's page for habit analysis

๐ŸŒ™

Automatic day close

Every night your server pulls the finished day's true TDEE from Garmin and writes TDEE + workouts into your log (your deficit column recalculates itself instantly โ€” it's a Notion formula) โ€” self-heals 3 days back, colored sync tags show status at a glance

๐Ÿ”ฅ

Progress you can see

Cumulative deficit (โ‰ˆ kg of fat) updated nightly right on your Notion food log

๐Ÿƒ

Coaching on real data

One-call readiness verdicts, post-workout analysis (splits, HR zones, sleep context), weekly reviews, injury pattern tracking

๐Ÿ“ˆ

Second-by-second analysis

FIT-file parsing: HR/pace/cadence streams + aerobic decoupling โ€” the endurance metric real coaches use

โš–๏ธ

Calibration loop

Every 2 weeks: logged deficit vs. actual weight change reveals your personal estimation bias, which corrects all future estimates

๐Ÿ”„

Live-updating brain

Coaching rules live in playbook.md, fetched by your server at runtime โ€” improvements reach every user instantly, no reinstall

Related MCP server: Garmin Health MCP Server

๐Ÿš€ Install (no coding needed)

  1. In Claude, create a Project and name it LeanLoop (this is where your coach will live).

  2. In that Project, enable the Notion connector (Claude needs it to build your databases).

  3. Open a chat inside the Project โ€” set the model to Sonnet at Medium effort for setup (lots of IDs to track; switch to Low for everyday use afterward) โ€” and paste:

Read https://github.com/bank3005-jpg/LeanLoop-for-Garmin/blob/stable/SETUP.md and set this up for me

Claude interviews you (goals, body stats), creates your Notion databases, walks you through the cloud steps, then adds your server as a second connector and loads the coaching rules into the Project. 45โ€“60 minutes, one time. After setup, everyday food logging runs fine on Sonnet Low.

โš ๏ธ Requires Claude Pro (or Max/Team/Enterprise). LeanLoop runs on two custom connectors at once โ€” Notion (your food/training/body logs) and your Garmin server (live wearable data). The Free plan allows only one custom connector, which isn't enough for the full loop. Pro also gives the usage headroom for daily photo food-logging. You do not need any paid Notion or Garmin plan โ€” their free tiers are fine.

Prerequisites: a Garmin watch ยท Notion account (free) ยท Google account with billing enabled (stays within free tier) ยท Claude Pro (or Max/Team โ€” needs two custom connectors at once; Free allows only one) ยท Windows or macOS computer for one step.

๐Ÿ—๏ธ Architecture

Claude (any device, incl. phone)
   โ””โ”€โ”€ your Cloud Run server  โ† this repo, deployed to YOUR Google account
         โ”œโ”€โ”€ Garmin Connect   โ† your token, created on your own computer
         โ”œโ”€โ”€ your Notion      โ† food / training / body logs
         โ””โ”€โ”€ playbook.md      โ† coaching rules, served live from GitHub
   Cloud Scheduler โ†’ nightly close-day job + keep-warm pings

Privacy by design: everything runs in your accounts. No third party โ€” including this repo's author โ€” ever sees your data. The server is protected by a long random secret; Garmin credentials never pass through chat.

๐Ÿงฐ What's inside (16 lean MCP tools)

Health get_wellness(metric) โ€” sleep, HRV, stress, body battery, heart rate, SpO2, respiration, intensity minutes, hydration, blood pressure, body composition, training readiness/status ยท get_daily_summary Training get_activities (recent or date range) ยท get_activity(id, view) โ€” summary, splits, HR zones, FIT streams, aerobic decoupling ยท get_fitness(metric) โ€” VO2max, race predictions, endurance/hill scores, lactate threshold, PRs, fitness age ยท get_coach_snapshot (one-call verdict data) ยท analyze_activity (one-call post-workout bundle) ยท weekly_report / calibrate_report (pre-computed reviews) Body get_weight_history ยท add_body_composition (write InBody/DEXA scans into Garmin) System foodlog_read / foodlog_upsert (direct Notion food log, meal-by-meal history) ยท get_config / foodlib_find (fast server-side Notion reads) ยท get_playbook (live coaching rules)

Few tools by design: a lean tool list keeps every chat's context small โ€” grouped tools with a metric/view parameter carry the same 35 capabilities at ~half the token overhead.

๐Ÿ”„ Updating

  • Coaching rules โ€” update automatically (served live from this repo)

  • Server code โ€” git pull + one deploy command, or enable a Cloud Build trigger on stable for fully automatic deploys

  • Want to customize the code? Fork the repo and point your deployment at your fork

โ“ FAQ

Is it really free? Yes โ€” Cloud Run free tier covers personal use many times over. The setup guide includes guardrails so you stay in it. Does my data go anywhere? No. Your server, your Garmin token, your Notion. Self-hosted means self-owned. What if Garmin changes their API? The community library this builds on (python-garminconnect) gets patched quickly; update with one git pull + deploy. Garmin China accounts? Not supported (separate system). No watch some days? The nightly job falls back to your formula baseline and tags the day estimated.

๐Ÿ’ฌ Why this exists

I'm not a programmer. I built LeanLoop together with Claude because I wanted to lose weight, get my confidence back, and just feel better โ€” and I couldn't find a tracker that coached me on my real data instead of generic formulas. It worked for me, so I'm sharing it.

I use LeanLoop every single day and keep refining it as I go. If you hit a problem or want a feature, open a thread in Discussions โ€” I read everything.

๐Ÿ™ Credits

Built on python-garminconnect by cyberjunky ยท fitdecode ยท MCP by Anthropic.

โš ๏ธ Disclaimer

This is a personal tracking and coaching tool, not medical advice or a medical device. Calorie and macro estimates are approximations. Consult a healthcare professional for medical decisions, and stop training and seek care for any concerning symptoms.

๐Ÿ“„ License

MIT โ€” use it, fork it, share it.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.

  • Garmin data in Claude: 135 tools โ€” activities, sleep, HRV, training, workouts. Free, open source.

  • WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.

View all MCP Connectors

Latest Blog Posts

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/bank3005-jpg/LeanLoop-for-Garmin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server