garmin-mcp
Provides read-only tools for accessing Garmin Connect health, wellness, fitness, and activity data via Garmin's official Personal API, including daily summaries, sleep, HRV, Body Battery, SpO2, activities, trends, profile, and fitness metrics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@garmin-mcp How did I sleep last night, and what's my HRV compared to baseline?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Local config, timezone, token/cache state, and units reference (no Garmin call by default) |
| One-day composite snapshot (summary, sleep, HRV, Body Battery, SpO2, activities) with partial errors |
| Focused recovery check (sleep, HRV & baseline, resting HR, Body Battery, stress) |
| Daily resting HR trend + min/max/avg over a date range |
| Profile settings, HR zones, fitness age, latest VO2 Max, and latest weight & goals |
| Today's summary + trailing multi-day wellness trends + recent activities + fitness profile |
| Server-side weekly or monthly rollups (up to 366 days) keeping LLM context compact |
| Aggregated activity totals, sport breakdown, and weekly/monthly volume |
Daily Wellness & Summaries
Tool | Garmin Endpoint |
| Daily summaries (steps, distance, calories, RHR, stress, Body Battery, intensity minutes) |
| Daily step statistics |
| Daily stress statistics (0–100) |
| Daily hydration statistics (ml) |
| Single-night sleep stages, scores, SpO2, respiration ( |
| Daily sleep summaries across a date range |
| Daily Body Battery reports ( |
| Single-day heart rate ( |
| Single-night HRV summary & baseline ( |
| Daily HRV summaries across a date range |
| Daily SpO2 (%) and altitude acclimation |
Biometrics, Nutrition, Profile & Activities
Tool | Garmin Endpoint |
| Daily VO2 Max (optional |
| Garmin Fitness Age and contributing factors |
| Configured heart rate zones across sports |
| User profile settings (units, timezone, sleep schedule) |
| Weight and body composition measurements |
| Effective weight goals over a date range |
| Daily nutrition food logs |
| Wellness activity summaries over a date range |
| Parent/child activity type keys (cached 48 hours) |
| Search and paginate activities by date range and sport |
| Full summary/details for a single |
| Structured workouts attached to an activity |
| Original ZIP ( |
Opt-in Sensitive Tools
Off by default. Set GARMIN_ENABLE_MENSTRUAL_CYCLE=true to register:
garmin_get_menstrual_cycle_summarygarmin_get_menstrual_cycle_day_view
MCP Prompts
recovery_check— Assess today's recovery vs 7-day baselineweekly_training_review— Review the past 7 days of volume and wellnessactivity_analysis— Deep dive on one activity with HR zones and recovery contextmonthly_trends_review— Multi-month rollups viagarmin_get_trendsandgarmin_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:
recoveryTimein raw Garmin payloads is in minutes, not hours.Daily arrays are returned newest-first.
Related MCP server: garminconnect-js
Requirements
Python 3.12+ and uv
A Garmin Connect Personal API key from https://connect.garmin.com/app/settings/personalApiToken (pick 365-day expiry for least hassle; copy it immediately — Garmin displays it once).
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 accessAlternatively, 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-mcpHost 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 deployFor a custom domain (e.g. garmin.mcp.scot):
fly certs add garmin.mcp.scotIf 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 (highest precedence) |
| Explicit path to a key file (overrides default file and keychain) |
| Override bearer-token cache file path |
| IANA time zone for local dates (e.g. |
|
|
| In-memory response cache TTL in seconds; default |
| Max concurrent requests to Garmin; default |
| Required by |
| Port for |
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 on401. Never touches passwords or SSO.Rate-limit protection. Caps upstream concurrency to 2, honours
Retry-Afteron429with 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 tostderr(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 -vLicense
Available Tools
32 toolsgarmin_download_activity_fileARead-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_activityARead-onlyIdempotent
Return full summary and metadata details for one activity by activity_id.
Inputs: activity_id (required). Returns: object
garmin_get_activity_statsARead-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_typesARead-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_workoutsBRead-onlyIdempotent
Return structured workout definitions associated with an activity.
Inputs: activity_id (required). Returns: object
garmin_get_body_batteryARead-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_summariesARead-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_ageCRead-onlyIdempotent
Garmin Fitness Age estimate and contributing biometric factors for a calendar date.
Inputs: date. Returns: object
garmin_get_fitness_profileCRead-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_logsCRead-onlyIdempotent
Nutrition food logs for a calendar date.
Inputs: date. Returns: object
garmin_get_full_snapshotBRead-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_summaryARead-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_rateBRead-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_zonesARead-onlyIdempotent
Current user's configured heart rate zones across sports (default, running, cycling, swimming).
Inputs: no named parameters. Returns: object
garmin_get_hrvARead-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_summariesARead-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_hydrationARead-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_settingsARead-onlyIdempotent
Current user's Garmin Connect profile settings (measurement units, timezone, sleep schedule, goals).
Inputs: no named parameters. Returns: object
garmin_get_recoveryARead-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_rateARead-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_sleepARead-onlyIdempotent
Detailed single-night sleep data for a calendar date (stages, scores, SpO2, respiration).
Inputs: date, include_intraday. Returns: object
garmin_get_sleep_summariesARead-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_spo2BRead-onlyIdempotent
Daily blood oxygen saturation (SpO2 %) and altitude acclimation data for a calendar date.
Inputs: date. Returns: object
garmin_get_stepsARead-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_stressARead-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_trendsARead-onlyIdempotent
Server-side weekly or monthly trend rollups (newest-first) across up to 366 days, keeping context compact.
Inputs: metrics, end_date, start_date, granularity. Returns: object
garmin_get_vo2_maxARead-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_weightBRead-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_goalsARead-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_activitiesBRead-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_activitiesARead-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_statusARead-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
Scored across 32 tools
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.
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.
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.
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
Related MCP Connectors
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Your own Garmin data (sleep, HRV, Body Battery, activities) in Claude, ChatGPT and any MCP app.
Garmin data in ChatGPT, Claude & other AI apps via the Garmin Health API. No password sharing.
Unofficial Garmin Connect access: sleep, HRV, training, activities, workouts and weight.
Related MCP Servers
- AlicenseBqualityBmaintenanceDownloads 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.4897 PyPI177AGPL 3.0
- AlicenseCqualityBmaintenanceGarmin 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.2191,654 npm8MIT
- AlicenseAqualityBmaintenanceEnables 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.2174 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables 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.1MIT