Garmin MCP
Integrates with Garmin Connect to read and analyze personal training and health data: activities and their splits/zones/streams, sleep, HRV, resting heart rate, stress, body battery, body composition, training status, VO2max, gear and devices. Also computes training load (CTL/ATL/TSB, ACWR, monotony/strain) and morning readiness locally, and can create structured workouts, schedule them on the Garmin calendar so they sync to the watch, and update activity details.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Garmin MCP
Ask your AI assistant how your training is really going. Garmin MCP is an unofficial, open-source MCP server for your Garmin Connect data: training load, form and morning readiness computed on your machine with methods from published sports-science literature, with citations; 21 tools designed around the questions athletes ask, not a mirror of Garmin's API; a local SQLite cache that downloads only what a question needs; and structured workouts that go from the answer to your Garmin calendar and watch. It also reads activities, health, sleep, training status, body composition, gear, devices and the workout library.
Works with Claude Code, Claude Desktop, Codex, Antigravity CLI, opencode and any other MCP client (stdio or streamable HTTP).
Documentation: endurancetools.github.io/garmin-mcp (getting started per client, what to ask, configuration, troubleshooting). Contributing and development: DEVELOPMENT.md.
Unofficial. Garmin and Garmin Connect are trademarks of Garmin Ltd. or its subsidiaries; this project is not affiliated with or endorsed by Garmin. The training analytics (get_load, get_readiness) are training information, not medical advice.
Why Garmin MCP
Answers you can check. Training load (TSS from power, pace, heart rate or session RPE), fitness, fatigue and form (CTL/ATL/TSB), ACWR, intensity distribution and morning readiness from your own HRV, resting heart rate, sleep and load against your own baselines, with methods from published sports-science literature, with citations. Every answer returns the values and rules it used, and you can change them. Methods and evidence
Designed tools, not an API mirror. 21 tools built around questions like "review my week" or "can I train hard today?", so one call answers one question. The whole tool list costs the model about 8,600 tokens of context, and the first tool call was the right one in 48 of 48 tool-selection scenarios. Designed tools
Local and private. You sign in on Garmin's own page, so your password never passes through the tool. What it downloads stays in a local database on your computer, answers come back from it in milliseconds, downloads are paced to stay gentle with Garmin, and tool answers go only to the AI client you connect. What is stored where
From answer to watch. Ask for "6×400 m with 90 s rest on Thursday": you see the steps and estimated duration first, nothing is saved until you agree, and then it goes to your Garmin calendar and syncs to the watch. Workouts and calendar
Related MCP server: garmin-mcp
Getting started
Requirements: Node.js 22 or newer, a Garmin Connect account, and Chrome, Edge, Brave or Chromium for the sign-in window (there is a terminal fallback).
1. Sign in once. This opens Garmin's own sign-in page in your browser. Your password never passes through the tool; only the tokens Garmin issues are stored, in ~/.garmin-mcp.
npx -y garmin-mcp-cli login2. Add the server to your client.
Client | Configuration |
Claude Code |
|
Claude Desktop | install |
Codex |
|
Antigravity CLI |
|
opencode |
|
Any other client | command |
3. Ask. Nothing is downloaded until a question needs it. For example:
"How did I sleep this week?" or "How did my HRV trend over the summer?"
"Review my training week" or "Summarise my block from 2026-08-04 to 2026-09-28"
"Am I fatigued? What is my form right now?"
"When is my next race?" or "What is planned this week?"
"Build me 6×400 m with 90 s rest for Thursday" (you see the steps first, nothing is saved until you agree)
"Rename activity 21001 to Parkrun PB"
Optional: pre-load a range so the first questions answer instantly.
npx -y garmin-mcp-cli sync --scope all --from 2026-07-01 --to 2026-09-30How it fetches data
Logging in and starting the server download nothing. When a question needs days that are not in the local database, the tool downloads exactly that range, waits up to 20 s and answers; anything left keeps downloading in the background and the answer says so (meta.source is partial). Everything downloaded stays in the local database: stored days are never downloaded again unless you pass --force, so repeating a question costs nothing.
To stay gentle with Garmin, long ranges go in 7-day chunks, newest first, with a random 1-11 s pause after each chunk that actually downloaded something, at most 600 requests per day. A 429 or a Cloudflare challenge pauses all downloads for 6 h. An interrupted sync continues where it left off.
With GARMIN_AUTO_FETCH=false nothing is downloaded unless you run garmin sync or the garmin_sync tool; read tools then return the missing range in meta.sync_hint and the model asks you first.
Measured on a real account after a 90-day sync (433 requests in about an hour): answers come from the local database in 1-110 ms.
Tools
Tool | Purpose |
| dense activity list with cursor paging (GAP, cadence, NP, Training Effect label, temperature when downloaded); |
| one activity: |
| name, type, description, RPE, feel |
| FIT (unzipped), GPX, TCX, KML, CSV to the download directory ( |
| steps (with daily distance), resting HR (with daily min/max HR), HRV (with status and baseline), sleep, stress, body battery, respiration, SpO2, intensity minutes, calories (burned, and eaten when a food log is linked), floors; per day or week, with 7/28-day trends |
| one night with stages, or a range with averages |
| VO2max, readiness, recovery time, Garmin status, load and load focus, |
| weigh-ins in kg with trend |
| week, month or any |
| workout library, scheduled workouts, races and events from the calendar in any date range (default: next 60 days), readable steps |
| workouts from presets (run intervals, walk/run, easy Z2, strength circuit) or a typed definition (nestable repeats, HR/pace/power targets); |
| gear with distance, devices with last sync and settings |
| explicit download of a scope (all/activities/health/training/reference) and date range, with progress notifications |
| own load model (TSS per activity from power, pace, heart rate or RPE, with the thresholds valid on each date): CTL/ATL/TSB, ACWR 7:28, monotony and strain, flags with overridable thresholds, ISO weeks per sport, 3-zone intensity split; optional daily series, per-activity TSS/IF/load source/EF and running dynamics, monthly EF trend, monthly running dynamics at a reference pace |
| sessions side by side ( |
| morning GO / MODIFY / REST from HRV, resting HR, sleep hours and load, with Garmin's Training Readiness, Body Battery, stress and sleep score shown, not counted; overridable |
| threshold history per date (LTHR per sport, LT1, HRmax, FTP, VO2max...; Garmin profile changes recorded automatically), heart rate and power zones per sport from the Garmin profile, and recording a test result, locally only |
delete_activity, delete_workout, delete_weigh_in and overwriting a saved workout (create_workout with workout_id) are only available with GARMIN_ENABLE_DESTRUCTIVE=true.
Resources: garmin://profile, garmin://gear, garmin://devices, garmin://activity-types, garmin://sync-status, and the templates garmin://activity/{id} and garmin://workout/{id} with id completion. Prompts: weekly_review, plan_next_week.
Every response is { data, meta: { source: cache|live|partial|local, fetched_at, coverage?, sync_hint? } }, as JSON text and as structuredContent matching the tool's outputSchema; failures are { error: { code, message, hint } }.
Formulas, defaults and limits of the analytics tools: docs/analytics.md. Which Garmin Connect data is covered, and what is still missing: docs/coverage.md.
CLI
garmin-mcp-cli shares the core with the server and is handy for setup and checks:
garmin login [--strategy auto|browser|curl|fetch] [--email] [--token-path]
garmin import-tokens <file> # garmin_tokens.json from python-garminconnect 0.3.x
garmin status [--json]
garmin sync [--scope ...] [--from --to] [--force] [--pause <s>] # default: last 7 days
garmin activities [--from --to --type --limit --json]
garmin health <metric> [--from --to --week --json]
garmin load [--from --to] [--source auto|hrtss|garmin_load] [--flags <file.json>] [--series] [--activities] [--efficiency] [--by-sport] [--json]
garmin readiness [date] [--rules <file.json>] [--json] # GO / MODIFY / REST for the morning
garmin thresholds [--date --param --history --json] # LTHR, LT1, HRmax ... in effect, per sport
garmin thresholds add <date> <param> <value> [--source test|manual] [--note]
garmin thresholds export [--out <file.csv>] # date,param,value,source,note
garmin thresholds import <file.csv>
garmin import-activities <file.csv...> # Garmin Connect "Activities" CSV exports
garmin doctor # TLS strategy, hosts, permissions, tokens, SQLite driver
garmin serve [--transport stdio|streamable-http] [--port]
garmin logoutload, readiness and thresholds print the same results as the get_load, get_readiness and get_thresholds tools: markdown tables by default, the tool's { data, meta } envelope with --json. They read the local database only and never download; missing days come back as a note with the garmin sync command that fills them. import-activities adds activities from Garmin Connect CSV exports (English or Polish headers) for dates the synced activities do not cover, and thresholds export/import keep a copy of the threshold history in a CSV file.
Run it with npx -y garmin-mcp-cli <command> or install it globally (npm i -g garmin-mcp-cli).
Signing in
garmin login opens Garmin's real sign-in page in your installed Chrome, Edge, Brave or Chromium (a temporary profile, removed afterwards). You sign in there, including MFA or a CAPTCHA if Garmin asks; the tool only catches the one-time ticket Garmin redirects to afterwards and exchanges it for tokens. Cloudflare sees a real browser. Set GARMIN_BROWSER_PATH if your browser is not found.
Without a browser (headless server, Docker) or with --strategy curl|fetch, it asks for e-mail, password and MFA in the terminal and talks to Garmin's mobile login API, trying curl-impersonate (optional cuimp package, downloads its binary on first use) and then plain fetch. If that is blocked too, log in with Python and import the tokens; garmin doctor prints the exact command:
uvx --with "garminconnect>=0.3" python <path>/python-login.py ~/.garmin-mcp/garmin_tokens.json
garmin import-tokens ~/.garmin-mcp/garmin_tokens.jsonTokens and the database are 0600 inside a 0700 directory; the server refuses to start on looser permissions.
Remote and Docker
Streamable HTTP: GARMIN_MCP_TRANSPORT=streamable-http GARMIN_MCP_HTTP_TOKEN=<secret> npx -y garmin-mcp-server serves POST /mcp with Authorization: Bearer <secret>. Without a token it only binds to 127.0.0.1. Requests whose Host or Origin is not localhost, 127.0.0.1 or [::1] get 403 (DNS rebinding protection); behind a public hostname add it with GARMIN_HTTP_ALLOWED_HOSTS=mcp.example.com.
The server speaks MCP 2026-07-28 (server/discover, list results cached for an hour) and the 2025 revisions through the usual initialize handshake, on stdio and on HTTP, so clients on older MCP SDKs connect unchanged.
Docker: docker build -t garmin-mcp . && docker run -i -v garmin-data:/data garmin-mcp (log in with docker run -it -v garmin-data:/data garmin-mcp login).
Configuration
Precedence: CLI flag > environment > <data dir>/config.json > default. ~, $HOME and ${HOME} are always expanded.
Variable | Default | |
|
| tokens, database, config.json |
|
| |
| first login only | |
|
|
|
|
|
|
| detected | Chrome/Edge/Brave/Chromium used for the sign-in window |
| comma-separated allow/deny lists | |
|
| delete tools and workout overwrite |
|
| read tools download missing data themselves; |
|
|
|
|
| |
|
| |
| comma-separated hostnames (no port, IPv6 in brackets) accepted in | |
|
| pino JSON on stderr |
| system | IANA zone for "today" |
|
| parallel connectapi requests |
|
| spacing between request starts (±25 % jitter) |
|
| pacing of syncs; the pause is seconds, a random range or a fixed number |
| built in | for when Garmin changes the mobile app identity |
More
DEVELOPMENT.md: monorepo layout, tests, tool-list budget, evals, release.
docs/coverage.md: every Garmin Connect read and write and the tool that serves it.
License: MIT. Author: Marcin Milewicz (LinkedIn).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI coach for Garmin: builds training plans and structured workouts, synced straight to your watch.
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Ask your AI about your fitness: activities and data from Garmin, COROS, Strava, GPX and more
Your endurance training data in your AI assistant: activities, recovery, plan, workout edits.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read Garmin activities and create/schedule structured workouts and multi-week training plans on Garmin Connect, syncing to the user's watch.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read Garmin activities and create/schedule structured workouts and multi-week training plans directly on Garmin Connect, syncing to your watch with guided prompts.1MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to read Garmin Connect sleep, health, activity, and training data, and to write structured multi-sport workouts, calendar schedules, and performance metrics back into Garmin Connect.2429 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to read Garmin sleep, readiness and activity data, build an athlete profile, check proposed sessions against code-enforced limits and real calendar availability, and then push approved structured workouts to a Garmin watch. Plans are proposed and stored under a plan ID, so only explicitly approved sessions are ever written.MIT