Skip to main content
Glama
garmin-connect-mcp

garmin-connect-mcp

by knowkhelan

garmin-connect-mcp: a Garmin + food-log coach for Claude

A personal MCP server that turns a Claude Project into a marathon coach and sports dietitian:

  • Live Garmin Connect data: workouts, laps and HR zones, sleep, HRV, resting HR, training readiness, training status, race predictions, and your Garmin Coach plan.

  • A food log that persists across chats, with itemised calories, protein, carbs, fat, fiber and sodium. Workout electrolytes are tracked separately from the food sodium cap.

  • Saved foods: store exact label numbers for foods you eat often, so they're never re-estimated.

  • Calorie targets from your real Garmin burn: a deficit on normal days, maintenance on long-run days.

  • Treadmill corrections: enter the real distance once, and pace and weekly totals use it everywhere.

  • A weekly review in one call: mileage, long run, nutrition averages, days over the sodium cap, recovery trend, weight change.

It runs on Google Cloud Run + Firestore free tiers, with a $0 billing hard cap.

Claude Project ──HTTPS──▶ Cloud Run (scale-to-zero, max 1 instance) ──▶ Garmin Connect
                                   │
                                   └──▶ Firestore (food log, targets, saved foods, tokens)

Budget $1/mo (credits excluded) ─▶ Pub/Sub ─▶ billing-cap function: unlinks billing if cost > $0
emails at $0.01 and $0.50

Docs

Related MCP server: Garmin Nutrition Coach

Quick start

git clone https://github.com/knowkhelan/garmin-connect-mcp.git && cd garmin-connect-mcp
gcloud auth login                                            # needs a GCP project with an OPEN billing account
uv run --with garminconnect python scripts/garmin_login.py   # one-time Garmin login
cp .deploy.env.example .deploy.env                           # fill in project + billing account
bash scripts/deploy.sh all                                   # billing guard, then Firestore + server
bash scripts/deploy.sh test-cap                              # proves the $0 cap can fire

Then add the printed URL as a custom connector at claude.ai/customize/connectors (with No sign-in). Details are in the setup guide.

Tools Claude gets

Tool

What it does

daily_check

Start here. One day's workouts, burn, recovery, day type, targets, food and flags

log_food / update_food_entry / delete_food_entry

Itemised meal logging; meal="workout_fuel" for electrolytes

get_food_log

Food history with per-day totals

save_food / list_saved_foods / delete_saved_food

Exact label figures for regular foods

get_targets / set_targets

Protein, fiber, sodium cap, deficit, carbs by day type

get_activities / get_activity_detail

Workouts, laps, HR zones

correct_activity_distance

Fix treadmill distance and pace

get_recovery

Sleep, HRV, resting HR, readiness trend

get_training_status / get_training_plan

Load, VO2 max, race predictions, Garmin Coach schedule

log_weight / get_weight_trend

Weigh-ins (manual + Garmin scale)

weekly_review

The weekly check-in in one call

Cost

Normal use (a few logs and checks a day) is under 5% of the Cloud Run and Firestore free tiers. The billing guard emails you at $0.01 and $0.50, and unlinks billing as soon as any real charge appears. See the setup guide for what that means and how to recover.

Local development

pip install -r requirements.txt pytest
LOCAL_DEV=1 GARMIN_MOCK=1 python -m app.server               # http://localhost:8080/mcp with fake Garmin + JSON-file storage
python -m pytest tests -q                                    # unit, storage-contract and billing-cap tests
rm -rf data && python tests/smoke_test.py http://localhost:8080/mcp   # 26 end-to-end checks (needs an empty store)

Caveats

  • Garmin access uses the unofficial python-garminconnect with your own login. Garmin can change things at any time.

  • The connector URL's random path is the only auth. Keep it private and rotate it if it leaks.

  • Targets and flags are generic heuristics, not medical advice.

  • Built for one athlete. It isn't a multi-user service.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Connects Claude to Garmin Connect data for personalized running coaching, including morning readiness checks, post-run analysis, weekly reviews, and goal tracking.
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Lets Claude read a runner's recent activities and wellness signals — sleep, HRV, resting heart rate — and then design, schedule, edit, or delete structured workouts. Planned sessions are written to an intervals.icu calendar that syncs through Garmin Connect onto the user's watch, without exposing Garmin credentials.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets Claude read recent Garmin training activities and wellness signals such as sleep, HRV, and resting heart rate, then design and push structured workouts onto the user's calendar for syncing to their watch. Workouts can also be listed, edited, and deleted through natural language.
      MIT