Skip to main content
Glama

garmin-mcp

An MCP server that gives AI assistants read-only access to your Garmin Connect health, wellness, fitness, and activity data using Garmin's official Personal API via Garmin's own Python client (garmin-connect-personal-api-python).

Run it locally over stdio, or host it remotely on Fly.io over stateless Streamable HTTP protected by an API key.

Tools

Every tool is read-only (readOnlyHint=True). All date parameters use YYYY-MM-DD in GARMIN_TIMEZONE and default to local today. Daily range arrays are sorted newest-first and automatically chunked into 28-day windows.

Composite & Analytics

Tool

Purpose

garmin_status

Local config, timezone, token/cache state, and units reference (no Garmin call by default)

garmin_get_health_summary

One-day composite snapshot (summary, sleep, HRV, Body Battery, SpO2, activities) with partial errors

garmin_get_recovery

Focused recovery check (sleep, HRV & baseline, resting HR, Body Battery, stress)

garmin_get_resting_heart_rate

Daily resting HR trend + min/max/avg over a date range

garmin_get_fitness_profile

Profile settings, HR zones, fitness age, latest VO2 Max, and latest weight & goals

garmin_get_full_snapshot

Today's summary + trailing multi-day wellness trends + recent activities + fitness profile

garmin_get_trends

Server-side weekly or monthly rollups (up to 366 days) keeping LLM context compact

garmin_get_activity_stats

Aggregated activity totals, sport breakdown, and weekly/monthly volume

Daily Wellness & Summaries

Tool

Garmin Endpoint

garmin_get_daily_summaries

Daily summaries (steps, distance, calories, RHR, stress, Body Battery, intensity minutes)

garmin_get_steps

Daily step statistics

garmin_get_stress

Daily stress statistics (0–100)

garmin_get_hydration

Daily hydration statistics (ml)

garmin_get_sleep

Single-night sleep stages, scores, SpO2, respiration (include_intraday=false by default)

garmin_get_sleep_summaries

Daily sleep summaries across a date range

garmin_get_body_battery

Daily Body Battery reports (include_intraday=false by default)

garmin_get_heart_rate

Single-day heart rate (include_intraday=false by default)

garmin_get_hrv

Single-night HRV summary & baseline (include_readings=false by default)

garmin_get_hrv_summaries

Daily HRV summaries across a date range

garmin_get_spo2

Daily SpO2 (%) and altitude acclimation

Biometrics, Nutrition, Profile & Activities

Tool

Garmin Endpoint

garmin_get_vo2_max

Daily VO2 Max (optional sport filter)

garmin_get_fitness_age

Garmin Fitness Age and contributing factors

garmin_get_heart_rate_zones

Configured heart rate zones across sports

garmin_get_profile_settings

User profile settings (units, timezone, sleep schedule)

garmin_get_weight

Weight and body composition measurements

garmin_get_weight_goals

Effective weight goals over a date range

garmin_get_food_logs

Daily nutrition food logs

garmin_get_wellness_activities

Wellness activity summaries over a date range

garmin_get_activity_types

Parent/child activity type keys (cached 48 hours)

garmin_search_activities

Search and paginate activities by date range and sport

garmin_get_activity

Full summary/details for a single activity_id

garmin_get_activity_workouts

Structured workouts attached to an activity

garmin_download_activity_file

Original ZIP (.FIT) metadata + optional bounded base64 (include_base64=false by default)

Opt-in Sensitive Tools

Off by default. Set GARMIN_ENABLE_MENSTRUAL_CYCLE=true to register:

  • garmin_get_menstrual_cycle_summary

  • garmin_get_menstrual_cycle_day_view

MCP Prompts

  • recovery_check — Assess today's recovery vs 7-day baseline

  • weekly_training_review — Review the past 7 days of volume and wellness

  • activity_analysis — Deep dive on one activity with HR zones and recovery context

  • monthly_trends_review — Multi-month rollups via garmin_get_trends and garmin_get_activity_stats

What Garmin's Personal API does not provide

Training Status / Training Load, Training Readiness, Race Predictions, Personal Records, and all write operations (sending workouts/courses, editing activities) are not exposed on Garmin's official Personal API.

Units & conventions

  • Raw distances are in meters, durations in seconds, weights in grams, hydration in milliliters, heart rate in bpm, HRV in ms, SpO2 in %, stress & Body Battery on 0–100.

  • Explicit normalized fields carry suffixes (_km, _kg, _hours, _minutes).

  • Gotcha: recoveryTime in raw Garmin payloads is in minutes, not hours.

  • Daily arrays are returned newest-first.

Related MCP server: garminconnect-js

Requirements

Run locally

git clone https://github.com/mcdscot/garmin-mcp.git
cd garmin-mcp
uv run garmin-mcp setup    # prompts for your Personal API key and stores it in the OS keychain
uv run garmin-mcp check    # exchanges the key for a bearer token and verifies profile access

Alternatively, export GARMIN_PERSONAL_API_KEY or save the key to ~/.config/garmin/connect-personal-api-key (chmod 600).

Add it to an MCP client over stdio:

claude mcp add --scope user garmin -- uv run --directory /path/to/garmin-mcp garmin-mcp

Host it remotely

garmin-mcp serve-http serves stateless Streamable HTTP on 0.0.0.0:$PORT (default 8080) at both / and /mcp, protected by $MCP_API_KEY. GET /healthz is open for health checks.

Clients authenticate with either header:

Authorization: Bearer <key>
X-API-Key: <key>

Deploy to Fly.io

cp fly.example.toml fly.toml              # set app name, region (e.g. lhr), GARMIN_TIMEZONE
fly apps create garmin-mcp
python3 -c "import secrets; print('grmcp_' + secrets.token_urlsafe(32))"   # keep safe
fly secrets set GARMIN_PERSONAL_API_KEY=<garmin-key> MCP_API_KEY=<api-key>
fly deploy

For a custom domain (e.g. garmin.mcp.scot):

fly certs add garmin.mcp.scot

If DNS is on Cloudflare, set the record to DNS only (grey cloud) so Fly can issue and renew the TLS certificate. No persistent volume is required: the 24-hour bearer token lives on the ephemeral filesystem and is re-exchanged automatically on startup and on any 401.

Configuration

Variable

Purpose

GARMIN_PERSONAL_API_KEY

Garmin Personal API key (highest precedence)

GARMIN_PERSONAL_API_KEY_FILE

Explicit path to a key file (overrides default file and keychain)

GARMIN_BEARER_TOKEN_CACHE_FILE

Override bearer-token cache file path

GARMIN_TIMEZONE

IANA time zone for local dates (e.g. Europe/London); defaults to machine zone

GARMIN_ENABLE_MENSTRUAL_CYCLE

true enables menstrual-cycle tools; default false

GARMIN_CACHE_TTL_SECONDS

In-memory response cache TTL in seconds; default 900 (300 cap for today)

GARMIN_MAX_CONCURRENCY

Max concurrent requests to Garmin; default 2 (clamped 1–6)

MCP_API_KEY

Required by serve-http; at least 32 characters

PORT

Port for serve-http; default 8080

Hardening & Security

  • Official auth only. Uses Garmin's Personal API key → 24-hour JWT exchange via PersonalApiAuthenticator. Re-exchanges on startup and automatically refreshes + retries once on 401. Never touches passwords or SSO.

  • Rate-limit protection. Caps upstream concurrency to 2, honours Retry-After on 429 with up to 2 retries, chunks long ranges in 28-day windows, and deduplicates concurrent identical calls via an in-memory single-flight cache.

  • Strict inputs & safe logs. Unknown tool arguments are rejected (extra="forbid"). One structured JSON audit line per call is written to stderr (tool, ok, duration_ms, error_kind, garmin_status, partial_errors) — never logging keys, tokens, arguments, or returned health data.

  • Keep secrets out of git. fly.toml, .env*, and key/token files are git-ignored.

Development

# Offline unit tests (no credentials or network required)
uv run pytest

# Lint
uv run ruff check .

# Opt-in live smoke tests (requires a valid Garmin Personal API key)
GARMIN_LIVE_TESTS=1 uv run pytest -m live -v

License

MIT

Available Tools

32 tools
garmin_download_activity_fileA
Read-onlyIdempotent

Download an activity's original ZIP archive (.FIT) and return its metadata (plus optional bounded base64).

Inputs: activity_id (required), include_base64. Returns: object

garmin_get_activityA
Read-onlyIdempotent

Return full summary and metadata details for one activity by activity_id.

Inputs: activity_id (required). Returns: object

garmin_get_activity_statsA
Read-onlyIdempotent

Aggregated activity totals, sport breakdown, and weekly/monthly volume over a date range (default last 90 days).

Inputs: end_date, group_by, start_date, activity_type. Returns: object

garmin_get_activity_typesA
Read-onlyIdempotent

List Garmin parent activity_type keys and child activity_sub_type keys for filtering garmin_search_activities.

Inputs: force_refresh. Returns: object

garmin_get_activity_workoutsB
Read-onlyIdempotent

Return structured workout definitions associated with an activity.

Inputs: activity_id (required). Returns: object

garmin_get_body_batteryA
Read-onlyIdempotent

Daily Body Battery reports over an inclusive date range (newest-first, auto-chunked, default 7 days).

Inputs: chunks, end_date, start_date, include_intraday. Returns: object

garmin_get_daily_summariesA
Read-onlyIdempotent

User daily summaries over an inclusive date range (newest-first, auto-chunked in 28-day windows, default 7 days).

Inputs: end_date, start_date. Returns: object

garmin_get_fitness_ageC
Read-onlyIdempotent

Garmin Fitness Age estimate and contributing biometric factors for a calendar date.

Inputs: date. Returns: object

garmin_get_fitness_profileC
Read-onlyIdempotent

Combined user profile settings, heart-rate zones, fitness age, latest VO2 Max, and latest weight & weight goals.

Inputs: date. Returns: object

garmin_get_food_logsC
Read-onlyIdempotent

Nutrition food logs for a calendar date.

Inputs: date. Returns: object

garmin_get_full_snapshotB
Read-onlyIdempotent

Comprehensive briefing: today's health summary, trailing multi-day wellness summaries, recent activities, and fitness profile.

Inputs: date, days. Returns: object

garmin_get_health_summaryA
Read-onlyIdempotent

One-day composite health snapshot: steps, RHR, stress, sleep, HRV, Body Battery, SpO2, and that day's activities.

Inputs: date. Returns: object

garmin_get_heart_rateB
Read-onlyIdempotent

Daily heart rate summary (resting, min, max, and optionally intraday HR curve) for a calendar date.

Inputs: date, include_intraday. Returns: object

garmin_get_heart_rate_zonesA
Read-onlyIdempotent

Current user's configured heart rate zones across sports (default, running, cycling, swimming).

Inputs: no named parameters. Returns: object

garmin_get_hrvA
Read-onlyIdempotent

Overnight heart rate variability (HRV) summary, baseline, status, and optionally 5-minute readings for one date.

Inputs: date, include_readings. Returns: object

garmin_get_hrv_summariesA
Read-onlyIdempotent

Daily HRV summaries over an inclusive date range (newest-first, auto-chunked in 28-day windows, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_hydrationA
Read-onlyIdempotent

Daily hydration statistics (milliliters) over an inclusive date range (newest-first, auto-chunked, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_profile_settingsA
Read-onlyIdempotent

Current user's Garmin Connect profile settings (measurement units, timezone, sleep schedule, goals).

Inputs: no named parameters. Returns: object

garmin_get_recoveryA
Read-onlyIdempotent

Recovery-focused snapshot for one day: sleep stages/score, overnight HRV & baseline, resting HR, Body Battery, and stress.

Inputs: date. Returns: object

garmin_get_resting_heart_rateA
Read-onlyIdempotent

Daily resting heart rate trend (newest-first) plus min/max/avg over a date range (default last 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_sleepA
Read-onlyIdempotent

Detailed single-night sleep data for a calendar date (stages, scores, SpO2, respiration).

Inputs: date, include_intraday. Returns: object

garmin_get_sleep_summariesA
Read-onlyIdempotent

Daily sleep summaries over an inclusive date range (newest-first, auto-chunked in 28-day windows, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_spo2B
Read-onlyIdempotent

Daily blood oxygen saturation (SpO2 %) and altitude acclimation data for a calendar date.

Inputs: date. Returns: object

garmin_get_stepsA
Read-onlyIdempotent

Daily step statistics over an inclusive date range (newest-first, auto-chunked in 28-day windows, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_stressA
Read-onlyIdempotent

Daily stress statistics (0-100 scale) over an inclusive date range (newest-first, auto-chunked, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_get_vo2_maxA
Read-onlyIdempotent

Daily VO2 Max metrics over an inclusive date range (newest-first, auto-chunked, default 28 days).

Inputs: sport, end_date, start_date. Returns: object

garmin_get_weightB
Read-onlyIdempotent

Weight and body composition measurements over an inclusive date range (raw weights are typically in grams).

Inputs: end_date, start_date. Returns: object

garmin_get_weight_goalsA
Read-onlyIdempotent

Effective weight goals over an inclusive date range (newest-first, auto-chunked, default 28 days).

Inputs: end_date, start_date. Returns: object

garmin_get_wellness_activitiesB
Read-onlyIdempotent

Wellness activity summaries over an inclusive date range (newest-first, auto-chunked, default 14 days).

Inputs: end_date, start_date. Returns: object

garmin_search_activitiesA
Read-onlyIdempotent

Search and list summarized activities (newest-first). Use garmin_get_activity_types to discover valid filter keys.

Inputs: limit, start, end_date, start_date, +2 more. Returns: object

garmin_statusA
Read-onlyIdempotent

Check server configuration, timezone, cache stats, units table, and token status without calling Garmin by default.

Inputs: verify_connection. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 32 tools

    Disambiguation3/5

    Most metric tools are clearly scoped (get_sleep vs get_sleep_summaries vs get_hrv vs get_hrv_summaries), but the overview family overlaps heavily: garmin_get_health_summary, garmin_get_recovery, garmin_get_full_snapshot, garmin_get_trends, and garmin_get_daily_summaries all return composite wellness data covering sleep, HRV, Body Battery, and stress. An agent asked for a daily briefing has five plausible entry points and must read long descriptions to choose correctly.

    Naming Consistency4/5

    Nearly all tools follow a predictable garmin_verb_noun pattern (garmin_get_*, garmin_search_activities, garmin_download_activity_file) with namespacing that makes ownership obvious. Minor deviations: garmin_status has no verb, and the singular-vs-_summaries suffix convention is a subtlety rather than a break in style.

    Tool Count2/5

    32 tools exceeds a comfortable set for a read-only health dashboard, especially since many are near-duplicate per-metric endpoint wrappers (get_steps, get_stress, get_hydration, get_body_battery, get_spo2, get_vo2_max, get_weight_goals) that share identical range/chunking semantics and could be consolidated behind a metric parameter. The surface is defensible for the domain but heavy for what an agent can realistically pick between.

    Completeness4/5

    Coverage of Garmin's health and activity domain is strong: sleep, HRV, stress, Body Battery, SpO2, VO2 Max, weight, nutrition, workouts, activity search/detail/FIT download, plus profile, zones, and status. Gaps are mostly write operations (no logging weight, food, or setting goals) and no workout/course creation, which are reasonable omissions for an intentionally read-oriented server.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Downloads all your Garmin health and fitness data into a local SQLite database and exposes 45 MCP tools for AI analysis, enabling assistants to query sleep, training load, HRV, and more.
      48
      97 PyPI
      177
      AGPL 3.0
    • A
      license
      C
      quality
      B
      maintenance
      Garmin Connect for AI assistants: sleep, HRV, training readiness, activities, workouts and weight across 193 tools. Unofficial; run it locally or use the free hosted connector.
      219
      1,654 npm
      8
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to query a user's own Garmin Connect training, health, and recovery history through Garmin's official Personal API, backed by a local cache and built-in analysis tools.
      21
      74 npm
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read Garmin Connect data — sleep, heart rate, stress, HRV, body composition, activities, steps, training status/readiness and VO2max trends — through a read-only set of 14 MCP tools. It also generates visualized daily and weekly health reports as Markdown or self-contained HTML+SVG, with credential redaction, dual auth modes, and a mock mode for testing without a real account.
      1
      MIT