Skip to main content
Glama
garmin-connect-mcp-server

garmin-connect-mcp-server

by echocharlie

garmin-connect-mcp-server

A read-only Model Context Protocol (MCP) server that gives Claude Desktop access to your Garmin Connect data — daily health metrics, sleep, activities, training status, and body composition.

Non-technical? Follow the step-by-step QUICKSTART — or, if you use Claude Cowork/Claude Code, paste the one-shot prompt in SETUP-PROMPT.md and let Claude do the setup for you.

Why this exists

Garmin's official APIs (Health API, Activity API) are only available through the Garmin Connect Developer Program, which is gated to approved businesses. This server instead uses the well-established unofficial garminconnect Python library, which signs in with your own Garmin account using the same OAuth flow as the official Garmin Connect mobile app. No developer program membership, no API keys — you log in once and the long-lived tokens refresh themselves on use.

Unlike most Garmin MCP servers (which expose 60–110 thin endpoint wrappers), this one follows Anthropic's tool-design guidance: six consolidated, purpose-built tools that return compact tables designed for an LLM's context window.

Related MCP server: DkwtMCP

Tools

Tool

What it returns

garmin_get_daily_summary

Per-day steps, resting HR, overnight HRV + status, Body Battery high/low, stress, intensity minutes, active calories (≤31 days/call)

garmin_get_sleep

Per-night sleep score, quality, stage durations (deep/light/REM/awake), overnight HRV, SpO2, resting HR (≤31 days/call)

garmin_list_activities

Activity list with IDs, distance, duration, HR, pace/speed, elevation, training effect; filterable by type (≤90 days/call)

garmin_get_activity_detail

One activity in depth: pace/power/cadence/calories, plus lap splits and HR-zone breakdown in detailed mode

garmin_get_training_status

Training readiness, training status, acute load, VO2max, HRV status, and 5K/10K/half/marathon race predictions in one call

garmin_get_body_composition

Weight, body fat %, muscle mass, body water, BMI from a Garmin Index scale or manual entries (≤90 days/call)

All tools are read-only and marked with readOnlyHint — nothing is ever written to your Garmin account. Tools degrade gracefully: an account with no watch data returns clearly-empty tables rather than errors (activity-only accounts, e.g. from a Tacx trainer, still get full activity data).

Requirements

  • Python 3.12+ (required by garminconnect 0.3.x)

  • A free Garmin Connect account (no device required to test auth; data appears once a device or app syncs to the account)

  • Claude Desktop to use the tools (optional for development)

Install

With uv (recommended):

uv sync

Without uv (plain venv + pip) — macOS/Linux:

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Windows (PowerShell):

py -m venv .venv
.venv\Scripts\pip install -r requirements.txt

Both paths create the environment in .venv/, so the Claude Desktop config below is identical either way.

Authenticate (one time)

uv run python login.py            # or: .venv/bin/python login.py

Enter your Garmin email and password (plus MFA code if enabled). OAuth tokens are saved to ~/.garminconnect and refresh themselves on use. Your password is never stored — only the tokens are. Re-run the same command whenever tokens expire, or with --force to switch to a different Garmin account.

To store tokens somewhere else, set the GARMINTOKENS env var — but note it must then be set in both places: in your shell when running login.py, and in the Claude Desktop config's env block (GUI apps don't inherit your shell environment):

"garmin": {
  "command": "...",
  "args": ["..."],
  "env": { "GARMINTOKENS": "/path/to/tokens" }
}

Test locally (optional)

uv run fastmcp dev inspector server.py      # or: .venv/bin/fastmcp dev inspector server.py

This opens the MCP Inspector in your browser to exercise each tool by hand.

Install in Claude Desktop

Prefer not to hand-edit JSON? The QUICKSTART has a copy-paste prompt that asks Claude (Claude Code, or Claude Desktop with file access) to write this config for you.

Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

(Claude Desktop → Settings → Developer → Edit Config opens it for you.) Add:

{
  "mcpServers": {
    "garmin": {
      "command": "/ABSOLUTE/PATH/TO/garmin-connect-mcp-server/.venv/bin/python",
      "args": ["/ABSOLUTE/PATH/TO/garmin-connect-mcp-server/server.py"]
    }
  }
}

On Windows, command is C:\\...\\garmin-connect-mcp-server\\.venv\\Scripts\\python.exe. No env block or secrets are needed — auth comes from the token store. Fully quit and reopen Claude Desktop (it reads the config only on launch), then try: "What were my Garmin workouts this month?"

Troubleshooting

  • 429 / rate limited during login — Garmin rate-limits its SSO endpoint by IP. Don't retry in a loop; wait 30–60 minutes or switch networks (a phone hotspot changes your IP) and run login.py again.

  • Authentication failed / token errors — re-run the login script (uv run python login.py or .venv/bin/python login.py); tokens die if you change your Garmin password or Garmin revokes them. The running server picks up fresh tokens on the next tool call — no restart needed.

  • Tools return empty tables / all - — the account has no synced data for that range. Health metrics (sleep, HRV, Body Battery, training status) require a Garmin watch; activities can come from any source that syncs to Garmin Connect (trainer, Zwift, phone app).

  • Login suddenly breaks for everyone — Garmin occasionally changes their SSO flow, which temporarily breaks the unofficial library until it's patched. Update with uv sync --upgrade (or .venv/bin/pip install -U garminconnect) and retry.

  • Claude Desktop doesn't show the tools — check the config file for JSON errors (a trailing comma breaks the whole file), verify both paths are absolute and the .venv exists, then fully quit and reopen the app.

How it works

Claude Desktop ──stdio──> server.py (FastMCP, 6 read-only tools)
                              │
                              ├── reads OAuth tokens from ~/.garminconnect
                              │      (written once by login.py; auto-refreshed)
                              │
                              └── garminconnect (unofficial lib, >= 0.3.6)
                                     └── Garmin Connect private web API
  • server.py — the MCP server; never sees your password, only reads tokens.

  • login.py — one-time interactive sign-in (handles MFA); saves tokens.

Fair warning

This uses Garmin Connect's private web API via your personal account — technically a gray area under Garmin's ToS, though it's the same approach used for years by Home Assistant integrations and many other community projects without issue. Use reasonable request volumes and your own account. This project is not affiliated with or endorsed by Garmin.

Development

uv run python -m compileall server.py login.py   # syntax check
uv run fastmcp dev inspector server.py           # manual tool testing

Tool design notes: tools are namespaced garmin_* to compose cleanly with sibling health MCP servers (Oura, Strava, …); outputs are compact markdown tables (roughly 40 tokens/day-row); date ranges are capped per call with actionable error messages.

License

MIT

Available Tools

6 tools
garmin_get_activity_detailA
Read-only

Deep-dive a single Garmin activity: distance, time, HR, pace/speed, cadence, power, elevation, calories, training effect — plus lap splits and heart-rate-zone breakdown in 'detailed' mode. Get activity_id from garmin_list_activities first.

Inputs: activity_id (required), response_format. Returns: result

garmin_get_body_compositionA
Read-only

Body composition entries (Garmin Index scale or manual) as a table (max 90 days, default last 30). Columns: date, weight_kg, body_fat_pct, muscle_mass_kg, body_water_pct, bmi. Only days with a measurement appear.

Inputs: end_date, start_date. Returns: result

garmin_get_daily_summaryA
Read-only

Day-by-day Garmin health metrics as a compact table (max 31 days, default last 7).

Columns: date, steps, resting_hr (bpm), hrv_avg (ms overnight), hrv_status (balanced/unbalanced/low), bb_high/bb_low (Body Battery 0-100), stress_avg (0-100), intensity_min (moderate + 2x vigorous), active_kcal. For sleep detail use garmin_get_sleep; for workouts use garmin_list_activities.

Inputs: end_date, start_date. Returns: result

garmin_get_sleepA
Read-only

Garmin sleep data per night as a compact table (max 31 days, default last 7).

Columns: date (wake-up morning), score (0-100), quality, duration, deep, light, rem, awake (H:MM), overnight_hrv (ms), spo2_avg (%), resting_hr (bpm). Note: if the user also wears an Oura ring, oura_* tools report the same nights and may differ slightly; say which source you're citing.

Inputs: end_date, start_date. Returns: result

garmin_get_training_statusA
Read-only

Current Garmin training snapshot in one call: training readiness score, training status (e.g. productive/maintaining/strained), acute load, VO2max, HRV status, and race time predictions (5K/10K/half/marathon). Use this for 'how is my training going / how recovered am I' questions; combine with oura_* readiness for cross-source checks.

Inputs: no named parameters. Returns: result

garmin_list_activitiesA
Read-only

List Garmin activities in a date range as a compact table (max 90 days, default last 30).

Columns: activity_id (for garmin_get_activity_detail), date, type, name, distance_km, duration (H:MM), avg_hr, max_hr, pace_or_speed, elev_gain_m, aerobic_te (training effect 0-5), anaerobic_te.

Inputs: limit, end_date, start_date, activity_type. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a unique aspect of Garmin data: daily summary, activity detail, training status, body composition, sleep, and activity list. No two tools overlap in purpose, making selection unambiguous.

    Naming Consistency4/5

    Tools follow a 'garmin_verb_noun' pattern (e.g., garmin_get_daily_summary, garmin_get_sleep), with 'garmin_list_activities' being the only one using 'list' instead of 'get'. This minor inconsistency is easily understood but breaks the pattern slightly.

    Tool Count5/5

    With 6 tools covering key health and fitness domains (daily metrics, activities, training, body composition, sleep), the count feels well-scoped and sufficient for a read-only health data API.

    Completeness5/5

    The tool surface covers essential read-only operations: retrieving daily summaries, activity details, training status, body composition, sleep, and listing activities. Cross-references between tools indicate thoughtful design, with no obvious missing functionality for the intended purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Local MCP server that connects Claude Desktop with Garmin and Apple Health data to read training and recovery, estimate heart rate and pace zones, analyze performance, and create structured workouts.
      22
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A local, read-only MCP server that gives Claude access to your Garmin health and training data, exposing tools for health snapshots, training status, run details, body metrics, and training analysis.
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      A local MCP server that exposes Garmin Connect activity, health, and training data as tools for Claude Desktop. It provides read-only access to metrics like activities, sleep, heart rate, and training readiness.
      25
      -