Garmin MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GARMIN_EMAIL | No | Email for first login only. | |
| GARMIN_REDACT | No | get_activity full leaves out name, profile/photo URLs, device and sensor serials and GPS; false returns raw as sent. | true |
| GARMIN_REGION | No | Region; 'cn' switches all three hosts. | global |
| GARMIN_DATA_DIR | No | tokens, database, config.json | ~/.garmin-mcp |
| GARMIN_MCP_HOST | No | Host for streamable HTTP. | 127.0.0.1 |
| GARMIN_MCP_PORT | No | Port for streamable HTTP. | 8000 |
| GARMIN_PASSWORD | No | Password for first login only. | |
| GARMIN_TIMEZONE | No | IANA zone for 'today'. | system |
| GARMIN_LOG_LEVEL | No | Log level for pino JSON on stderr. | info |
| GARMIN_AUTO_FETCH | No | Read tools download missing data themselves; false means only explicit syncs. | true |
| GARMIN_APP_VERSION | No | Override mobile app version (for when Garmin changes the mobile app identity). | built in |
| GARMIN_CONCURRENCY | No | Parallel connectapi requests. | 4 |
| GARMIN_TOKENS_FILE | No | Path to tokens file. | $GARMIN_DATA_DIR/tokens.json |
| GARMIN_BROWSER_PATH | No | Chrome/Edge/Brave/Chromium used for the sign-in window. | detected |
| GARMIN_SSO_STRATEGY | No | SSO strategy: auto (browser if installed, else terminal), browser, curl, fetch, import. | auto |
| GARMIN_SYNC_PAUSE_S | No | Pause between sync chunks in seconds; a random range or a fixed number. | 1-11 |
| GARMIN_DI_CLIENT_IDS | No | Override mobile app client IDs (for when Garmin changes the mobile app identity). | built in |
| GARMIN_ENABLED_TOOLS | No | Comma-separated allow list of tools. | |
| GARMIN_MCP_TRANSPORT | No | Transport: stdio or streamable-http. | stdio |
| GARMIN_APP_USER_AGENT | No | Override mobile app user agent (for when Garmin changes the mobile app identity). | built in |
| GARMIN_DISABLED_TOOLS | No | Comma-separated deny list of tools. | |
| GARMIN_MCP_HTTP_TOKEN | No | Bearer token for streamable HTTP authentication; without it only binds to 127.0.0.1. | |
| GARMIN_SYNC_CHUNK_DAYS | No | Sync chunk size in days. | 7 |
| GARMIN_FIT_DOWNLOAD_DIR | No | Directory for downloaded activity files. | $GARMIN_DATA_DIR/downloads |
| GARMIN_ENABLE_DESTRUCTIVE | No | Enable delete tools and workout overwrite. | false |
| GARMIN_HTTP_ALLOWED_HOSTS | No | Comma-separated hostnames (no port, IPv6 in brackets) accepted in Host/Origin on top of localhost, 127.0.0.1, [::1]; others get 403. | |
| GARMIN_MIN_REQUEST_INTERVAL_MS | No | Spacing between request starts (±25% jitter). | 250 |
| GARMIN_SYNC_MAX_REQUESTS_PER_DAY | No | Maximum requests per day for syncs. | 600 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Garmin Connect data for the signed-in user, served from a local cache. Read tools download data that is not in the cache yet by themselves (within the daily Garmin request limit), so just call them and answer; there is no need to ask about or describe syncing. If auto fetch is turned off (GARMIN_AUTO_FETCH=false), missing data comes back as meta.sync_hint; then ask the user before calling garmin_sync with it.
Dates are YYYY-MM-DD in the user's local time zone; "today" is resolved by the server.
Prefer one coarse call (query_health with several metrics, get_period_summary) over many small ones.
Every result has meta.source: "cache", "live", "partial" or "local" (computed by the server without Garmin, e.g. create_workout with dry_run: true). On "partial", mention briefly that some days are still downloading (meta.note says when to ask again). meta.fetched_at is when the oldest record in the answer was downloaded; newer ones may be fresher.
Errors come back as {"error":{"code","message","hint"}}; relay the hint to the user (e.g. to run
garmin login).Every result is also in structuredContent (the same JSON, typed by the tool's outputSchema), and a workout is saved only after you showed the user its steps from create_workout with dry_run: true and they agreed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| garmin_syncA | Download data from Garmin Connect into the local cache. Read tools already download missing data by themselves, so call this only when the user asks to sync/refresh or to pre-load a range, or when a tool returned meta.sync_hint (auto fetch turned off) and the user agreed; pass the hint's scope/from/to. Days already stored are skipped. Long ranges continue in the background: this waits at most 20 s and reports progress (also in garmin://sync-status). |
| get_activitiesA | List workouts/activities (runs, rides, swims, strength...) as dense summaries: id, date, type, name, duration, distance, pace or speed, GAP, HR, power, NP, cadence, training load and Training Effect, temperature (if weather downloaded), event_type when tagged (e.g. race). Use for "what did I do last week", finding an activity id, or comparing sessions. For one activity in depth use get_activity; for weekly/monthly totals use get_period_summary. |
| get_activityA | Details of one activity by id. detail="summary" (default) for the overview incl. description, RPE, feel, GAP, running dynamics (cadence, GCT, balance, VO, VR, stride), breathing rate, stamina, Training Effect label, run/walk/stand time, HR source (strap or watch) and workout_id (for get_workout); "splits" adds laps with the same dynamics, intensity (warmup, active, rest...) and, for a workout, the step as get_workout numbers it (wkt_step) and its compliance, plus typed splits (run, walk, stand, ClimbPro climbs) with totals per type; "hr_zones" adds time in HR zones; "power_zones" adds time in power zones (power meter); "weather" adds temperature, wind and conditions during the activity; "exercise_sets" adds strength sets (exercise, reps, weight, rest); "stream_summary" aggregates the stream per |
| update_activityA | Change an activity in Garmin Connect: name, type, event_type (e.g. race), description (notes), rpe, feel, privacy, or the gear used: add_gear puts shoes or a bike on it, remove_gear takes one off (swap: both in one call). Without id it adds a manual activity (type, start, duration_min; optional distance_km, name, description, rpe, feel, privacy, default private): show the user these values and call after they agree. Only call when the user asked for the change. Returns the activity after the edit. |
| download_activity_fileA | Download one activity from Garmin Connect and save it as a file on this machine (fit, gpx, tcx, kml or csv), returning its path and size. Use it when the user wants the file itself, e.g. to import into another app; to read an activity's numbers, laps or streams in the answer use get_activity instead. Prefer fit, the original recording, unless the destination needs another format. The file is named . and replaces an earlier download of the same activity and format; every call fetches it from Garmin again. |
| query_healthA | For "how did I sleep this week", "calories and intensity minutes this week", "steps yesterday" or any single health metric over days: a table per day or per ISO week plus summary with averages, totals, min/max and 7/28-day trend. steps also returns the daily distance in km, resting_hr the daily min/max HR, hrv the Garmin HRV status and baseline range, calories the kcal burned (total, active) and eaten (calories_consumed_kcal, absent without food log entries), hydration the ml drunk, goal and sweat loss (days without a water entry are left out). Ask for several metrics in one call (e.g. calories and intensity_minutes together). Use get_sleep for sleep stages of particular nights. Example: {"metrics":["hrv","resting_hr","sleep"],"from":"2026-07-01","to":"2026-09-30","granularity":"week"}. "hour" gives hourly HR, stress, Body Battery, steps, respiration and SpO2 with peak and lowest hour and Body Battery events (sleep, activity, stress), for "when was I most stressed yesterday": {"metrics":["stress","body_battery"],"from":"2026-10-09","to":"2026-10-09","granularity":"hour"}. |
| get_sleepA | Sleep for one night with stages, score, SpO2, respiration, overnight HRV and a timeline (stage segments, awakenings, lowest HR, HRV and SpO2 with times), or for a range a per-night table with averages and trends. Use it for sleep stages and the detail of particular nights; for sleep hours next to other daily metrics, or months by week, use query_health. A night is named by the date of the morning it ended on: the night of 7 to 8 October is 2026-10-08. No arguments returns the last 7 nights; a range can span up to 3 years, one row per night. Nights not in the cache yet are downloaded from Garmin within the daily request limit, and a night without sleep data comes back as sleep null. |
| get_training_statusA | Fitness and fatigue: VO2max (running/cycling) with trend, training readiness, remaining recovery time, Garmin training status (productive, maintaining, ...), Garmin acute/chronic load and load focus (aerobic low/high, anaerobic vs. targets), and |
| get_body_compositionA | Weigh-ins (kg, body fat %, muscle mass, BMI) in a range, each with its time, plus change over the range and trend. Use it for weight and body composition questions; query_health and get_period_summary carry no weight. Days without a weigh-in are simply absent; an empty range returns no weigh-ins, not an error. |
| get_period_summaryA | Training week or month at a glance: sessions and volume per sport, time in the Garmin HR zones 1-5 (for the 3-zone Z1/Z2/Z3 split against LT1/LTHR, e.g. time below LT1 or polarisation, use get_load), active vs rest days, longest and hardest session, |
| list_workoutsA | List the saved workout library ( |
| get_workoutA | Steps of one saved workout from the Garmin library in readable form: name, sport, description and one line per step (warm-up, repeats, duration or distance, target in pace/HR/power/cadence), plus estimated duration and distance. Use it to show what a planned session contains, or before changing it with create_workout; to find workouts or what is on the calendar use list_workouts. An id that no longer exists in Garmin Connect returns a NOT_FOUND error. |
| create_workoutA | Save a new structured workout to Garmin Connect (then use schedule_workouts to put it on the calendar so it syncs to the watch). Pass exactly one of: |
| schedule_workoutsA | Put saved workouts on the Garmin calendar (they then sync to the watch), or take them off it. |
| get_gearA | List the shoes, bikes and other gear on the Garmin account, active first: uuid, name, type, status (active or retired), total distance and activity count, the distance limit set in Garmin, in use since, retired date and notes. Use it for "how many km on my shoes" or "which shoes to replace", not for watches and sensors (get_devices); name or uuid is what update_activity takes as add_gear/remove_gear. Returns every item, no paging; none recorded gives an empty list. |
| get_devicesA | Garmin devices on the account with model, firmware, last sync time and settings (units, tones, alerts, pulse ox during sleep, alarms). Use it for "is my watch up to date" or "when did it last sync"; shoes and bikes are get_gear. Read from the cache, refreshed from Garmin at most hourly; no devices gives an empty list. |
| get_loadA | Training load from the server's own transparent model: TSS per activity from power, else pace, else heart rate, else session RPE, with the thresholds in effect on each date. Use it for fitness, fatigue and form trends, ramp rate, weekly volume and intensity distribution (time below LT1, % in Z1, polarisation). Not Garmin's EPOC load: Garmin's status and CTL/ATL/TSB from Garmin's load are get_training_status, a go/no-go for today get_readiness. Returns CTL/ATL/TSB, ACWR, monotony and strain on |
| compare_activitiesA | Sessions side by side: pace, GAP, HR, power (best 5/20 min if curve stored), EF, decoupling, IF, TSS, % Z4-5, cadence and running dynamics, temperature, dew point. |
| get_readinessA | Morning GO/MODIFY/REST decision from HRV, resting HR, sleep hours and load against your own baselines. Returns each signal with its value, reference and rating (ok, yellow, red; unknown when data is missing), rules_used and a recommendation that starts with the signals that decided. Garmin's own scores (Training Readiness, Body Battery, stress; sleep score in the sleep value) are shown as info, not counted. REST needs a red pair, a single red or 2 yellow give MODIFY; |
| get_thresholdsA | Thresholds the analytics use on |
| set_thresholdA | Record a field test result (LTHR, LT1, HRmax, FTP…) effective from a date; ask the user before saving. Stored in the local database only, never sent to Garmin; a row with the same date, param and source stays as it is (added false). A backdated row recomputes earlier activities from its date on. Returns the row and the value in effect today. Example: {"date":"2026-10-11","param":"lthr_run","value":171,"note":"30 min TT"}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| weekly_review | Review a training week and ask how it felt |
| plan_next_week | Propose next week of training and create the workouts on request |
| sleep_report | Sleep over a range of nights, then the worst night hour by hour |
| activity_review | Review one activity and compare it with similar sessions |
| race_check | How ready I am for the next race: form, predictions and the days left |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| profile | User profile: name, units, time zone, VO2max, HR and power zones |
| gear | Gear list with distances |
| devices | Garmin devices, last sync and settings |
| activity-types | Garmin activity type keys (e.g. running, trail_running, lap_swimming) with their parent type: the values get_activities `type` filters by and update_activity `type` accepts. Comes from the reference sync. |
| courses | Courses saved in Garmin Connect, newest first: id, name, sport, distance and elevation gain. Downloaded when read (auto fetch) and kept for an hour. |
| challenges | Badges and challenges: how many badges you earned and the 10 latest, and the badge challenges you joined that are in progress, with progress in % (value and target in Garmin's unit). Downloaded when read (auto fetch) and kept for an hour. |
| sync-status | Recent sync runs, date coverage and record counts of the local cache |
| today | Today at a glance from the local cache, nothing downloaded: the readiness decision (GO/MODIFY/REST) with each signal's rating, last night in one line and the workouts planned for today |
TDQS
Scored across 21 tools
Most tools are cleanly separable (get_activity vs get_activities, get_workout vs list_workouts, get_gear vs get_devices), but the analytics cluster is crowded: get_load, get_training_status, get_readiness and get_period_summary all return fitness/fatigue/load data, and get_load vs get_training_status both produce CTL/ATL/TSB, differing only in which model computes them. The descriptions do heavy lifting to explain the split, but an agent can easily misselect between the 'own TSS model' and 'Garmin EPOC model' tools.
Nearly all tools follow a verb_noun convention (get_sleep, create_workout, set_threshold, compare_activities, schedule_workouts), with clear domains. The main deviations are garmin_sync (server-prefixed, no noun object) and the compound download_activity_file, which break the pattern slightly but remain readable.
21 tools is at the heavy end for a single-account fitness server; the surface is broad (activities, sleep, health, workouts, gear, devices, load, thresholds) so most tools earn their place, but several read-only analytics tools could plausibly be merged. It sits in the 16-25 'feels heavy' band rather than being obviously over-scoped.
Coverage is broad: read/write for activities, workout create/schedule/read, sleep, health metrics, body composition, gear, devices, training analytics and threshold management, with a sync and file export path. Minor gaps remain — no delete_workout from the library, no way to delete an activity or update body composition/gear, and no calendar/race creation — but core lifecycle workflows are workable.