mcp-garmin-connect
This MCP server lets an MCP client query and analyze a user's Garmin Connect health, recovery, training, and running data.
Check current recovery: readiness, HRV, sleep, body battery, and training status.
Read sleep, resting heart rate, stress, and compact health summaries for configurable lookback windows.
Browse recent activities and fetch one activity's detailed summary by Garmin ID.
Analyze training volume by sport, Garmin training load/status, and load focus.
Retrieve fitness data: VO2 max, cycling FTP, race predictions, HR zones/thresholds, and personal records.
Generate running summaries, monthly running stats, and comprehensive multi-section snapshots.
Run locally over MCP stdio or Streamable HTTP; README also documents demo data, provider demo agents, caching, concurrency caps, and partial-error reporting.
Provides tools to retrieve Garmin Connect data including recovery, sleep, stress, activities, training load, fitness, zones, personal records, and running summaries.
Allows sending Garmin health and activity data to OpenAI's Chat Completions API for natural language queries about training and recovery.
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., "@mcp-garmin-connect What should my training focus be this week based on my recovery?"
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.
LLM-agnostic Garmin Connect MCP server for training, recovery, sleep, stress, VO2 Max, race predictions, and running summaries.
Use the same local Garmin tools from any MCP client — Claude Desktop, Claude Code, Cursor, Continue, Hermes, opencode — or from provider-backed demo agents using DeepSeek, OpenAI, Claude, OpenRouter, or Gemini.
See It In Action

Recorded with garmin-mcp serve --demo, which serves deterministic fictional sample data — no Garmin credentials and no real health data involved:
uvx mcp-garmin-connect serve --demoRelated MCP server: claude-garmin
Works With Any MCP Harness
This server implements standard MCP over stdio and Streamable HTTP, so there is no harness-specific adapter to maintain. If your tool speaks MCP, it works:
Harness | Connection |
Claude Code / Claude Desktop |
|
Codex CLI | MCP server config |
Gemini CLI | MCP server config |
Cursor, Windsurf, Zed, VS Code Copilot, Continue | MCP server settings (stdio or HTTP) |
opencode |
|
Hermes | stdio or HTTP |
Custom agents, web bots, scripts | Streamable HTTP at |
Any client that supports MCP over stdio or Streamable HTTP can use every tool and prompt in this server with no extra code.
Why This Exists
Most fitness advice from LLMs is generic. This server lets an LLM inspect your real Garmin Connect data first, then answer with context from your activities, recovery markers, HRV, sleep, stress, VO2 Max, and running history.
The core server is provider-neutral. DeepSeek, OpenAI, Claude, OpenRouter, and Gemini integrations are optional demo bridges for clients that do not speak MCP directly.
Two Garmin Backends
personal (official) | unofficial (email/password) | |
Auth | Self-serve API key → 24 h bearer token | Garmin SSO + cached tokens |
Stability | Documented, rate-limit friendly | Breaks when SSO/Cloudflare changes |
Raw | ✅ | ❌ |
Sleep/HRV/stress/body battery/RHR/weight/SpO2/steps | ✅ | ✅ |
Training status/load, readiness, VO2 Max, race predictions, personal records | ❌ | ✅ |
GARMIN_AUTH_MODE picks the strategy:
auto(default) — official Personal API whenGARMIN_PERSONAL_API_KEYis set, else email/password.personal/unofficial— force one backend.hybrid— run both: wellness and raw-file reads go to the official API, Garmin-derived metrics go to email/password, with automatic fallback when a call fails. This is the only mode that returns derived metrics and raw.FITfiles from one process. It needs both credential sets. Tools that need a metric the active backend cannot see return that field asnullwith anerrorsentry explaining why, instead of failing the whole call. Setup and endpoint mapping: docs/personal-api.md.
Features
Published on PyPI — run it with
uvx mcp-garmin-connect, no clone or manual install.24 Garmin tools and 4 prompt templates for training and recovery analysis.
Two Garmin backends, switchable or combined — the official Connect Personal API (self-serve key, stable) and the unofficial email/password flow (wider metric coverage).
GARMIN_AUTH_MODE=autopicks one;hybridruns both and routes each call to the backend that owns the data.Raw activity files —
download_activity_filefetches the original.FIT(ZIP) through the Personal API.Demo mode —
serve --demoruns on fictional sample data with no credentials, for try-outs and recordings.Local MCP server over
stdioor Streamable HTTP (/mcp).Endpoint-level TTL cache with single-flight factories — concurrent tool calls share one Garmin request instead of stampeding the API.
Global request concurrency cap so parallel snapshots stay within a safe request rate.
Partial-error reporting — composite tools include an
errorsarray when an endpoint fails, instead of silently returning nulls.Provider demo bridge for
deepseek,openai,claude,openrouter, andgemini.Explicit opt-in before Garmin health/activity data is sent to any external LLM provider.
Mocked test suite plus optional live Garmin smoke tests.
Quick Start
Option A — published package (no clone needed)
uvx mcp-garmin-connect login
uvx mcp-garmin-connect serve --transport stdiouvx runs the latest PyPI release in an isolated environment. Export GARMIN_EMAIL / GARMIN_PASSWORD (or keep a .env in the directory you launch it from) before the first login.
Option B — from source
git clone https://github.com/kavakoss/mcp-garmin-connect
cd mcp-garmin-connect
uv sync
cp .env.example .envPick a backend in .env:
# Official Personal API (recommended): create a key at
# https://connect.garmin.com/app/settings/personalApiToken
GARMIN_AUTH_MODE=personal
GARMIN_PERSONAL_API_KEY=your-key-hereor the unofficial email/password flow:
GARMIN_AUTH_MODE=unofficial
GARMIN_EMAIL=you@example.com
GARMIN_PASSWORD=your-passwordThe unofficial flow needs a one-time interactive login (MFA supported); the Personal API needs no login step:
uv run garmin-mcp login # unofficial backend only
uv run garmin-mcp personal-api --check # official backend: token + sample per endpoint
uv run garmin-mcp doctor --liveList available MCP tools, then run the server:
uv run garmin-mcp tools
uv run garmin-mcp serve --transport stdioHTTP transport:
uv run garmin-mcp serve --transport http --host 127.0.0.1 --port 8765
# clients connect to http://127.0.0.1:8765/mcpWindows (PowerShell) equivalents:
uv sync,Copy-Item .env.example .env,notepad .env, then the sameuv run garmin-mcp ...commands.
MCP Client Setup
Generic stdio config using the published package (uvx):
{
"mcpServers": {
"garmin": {
"command": "uvx",
"args": ["mcp-garmin-connect", "serve", "--transport", "stdio"],
"env": {
"GARMIN_EMAIL": "you@example.com",
"GARMIN_PASSWORD": "your-password"
}
}
}
}From a local checkout, replace command/args with:
{
"mcpServers": {
"garmin": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-garmin-connect",
"run",
"garmin-mcp",
"serve",
"--transport",
"stdio"
]
}
}
}With the local checkout, credentials are also read from the repo's .env file, so the env block is optional.
opencode (opencode.json):
{
"mcp": {
"garmin": {
"type": "local",
"command": [
"uv",
"--directory",
"/path/to/mcp-garmin-connect",
"run",
"garmin-mcp",
"serve",
"--transport",
"stdio"
],
"enabled": true
}
}
}Per-client examples (Claude Desktop, Claude Code, Cursor, Continue, Hermes, generic stdio/HTTP) live in docs/clients.
MCP Tools
Tool | Purpose |
| Readiness, HRV, sleep, body battery, resting HR, training status if available |
| Sleep duration and sleep score trends |
| Daily RHR with 7-day and 30-day trend summaries, up to 30 days |
| Daily stress buckets and average stress |
| Recent normalized activity summaries |
| One activity with training effect fields |
| Per-lap splits with pace, HR, cadence, elevation and HR drift (on the Personal API, rebuilt from the sample stream) |
| Volume by sport based on recent activities |
| Native Garmin Training Load when the device/account exposes it |
| VO2 Max, FTP, and race predictions |
| Heart-rate zones and thresholds from Garmin user settings |
| Garmin personal records |
| Running summary with pace, HR, longest and fastest run |
| Monthly running breakdown |
| Daily HRV (last-night + weekly average) with a baseline over a longer window |
| Daily body battery: charged, drained, highest, lowest, end of day |
| Weight, BMI, body fat/muscle/water from Garmin weight entries — Personal API only |
| Daily blood oxygen (SpO2) — Personal API only |
| Logged daily fluid intake in millilitres — Personal API only |
| Daily steps versus goal — Personal API only |
| Garmin fitness age versus chronological age — Personal API only |
| Original activity file (ZIP with the |
| Compact recovery, sleep, RHR, and stress snapshot |
| Broad multi-section Garmin snapshot; each section carries |
Activity windows
get_recent_activities accepts either a lookback (days) or an explicit window:
{ "days": 30 } // newest 30 days
{ "start_date": "2026-08-01", "end_date": "2026-08-31" } // August 2026 onlyBoth dates are inclusive and YYYY-MM-DD; end_date defaults to today. Explicit dates win over days and make a past window queryable without pulling every newer activity first — the pager walks backwards and stops once it reaches start_date. The response then includes the resolved window so callers can see exactly what was queried. Invalid or reversed dates return an error field instead of silently returning everything.
MCP Prompts
recovery_checkweekly_training_reviewactivity_analysisrace_plan_context
Configuration
All settings come from environment variables (.env is loaded automatically).
Variable | Default | Purpose |
|
|
|
| — | Personal API key from Connect settings — enables the official backend |
|
| Where the 24 h bearer token is cached (mode |
|
| Personal API host override |
|
| HTTP timeout for Personal API calls |
| — | Garmin Connect account email (unofficial backend only) |
| — | Garmin Connect password (unofficial backend only) |
|
| Directory for the OAuth token cache |
|
| TTL for cached Garmin endpoint responses |
|
| Global cap on in-flight Garmin requests |
|
| Max lookback for |
|
| Max lookback for activities, training load and running summaries |
|
| Max activities returned per call (history is paged automatically) |
| unset |
|
Provider bridge variables (optional): DEEPSEEK_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, GEMINI_API_KEY, plus the matching *_BASE_URL and *_MODEL overrides.
Field units
Garmin's raw payloads mix units, and some fields are named after a unit that Garmin does not actually use (see issue #3: recoveryTime is minutes, not hours). This table is the contract — if you add a field, add its row.
Daily arrays (daily on the sleep, stress, RHR, HRV and body-battery tools) are newest-first — index 0 is the most recent day. Sort client-side if you need chronological order.
Field | Unit we expose | Garmin raw | Conversion |
|
|
| formatted |
| minutes / seconds |
|
|
| kilometres |
|
|
|
|
| derived |
| bpm |
| – |
| steps per minute |
| – |
| watts |
| – |
| metres |
| assumed metres |
| count |
| – |
| hours |
|
|
| 0–100 |
| – |
| minutes |
|
|
| minutes / hours |
| derived |
| milliseconds |
| – |
| hours |
|
|
| level |
| – |
| ml/kg/min |
| – |
| seconds |
| – |
| percent | computed from laps | – |
| mixed — read |
| see below |
|
| derived from the record label | – |
recovery_time_hours is only populated when the watch/account provides Training Readiness — a Forerunner 165, for example, returns no readiness data, so the whole training_readiness object is null. Other tools that lean on it degrade the same way rather than inventing numbers.
How It Stays Fast And Quiet
Endpoint-level cache. Sleeping, stress, RHR, and activity fetches are cached per day/limit and shared across every tool that needs them — a
get_full_snapshotburst reuses the same responses instead of refetching.Single-flight. If two tool calls ask for the same missing key, only one hits Garmin; the other waits and reuses the result.
Failures are never cached. A failed endpoint is retried on the next call.
Concurrency cap. All outbound Garmin calls pass through one bounded semaphore (
GARMIN_MAX_CONCURRENCY) so parallel sections cannot flood the API.Visible partial failures. When an optional endpoint fails, composite tools add an
errorsarray (source + exception) to their output.
Provider Demo Agents
Provider API access may require a paid account or credits even if the provider's web app has a free tier.
DEEPSEEK_API_KEY=sk-...
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=sk-or-...
GEMINI_API_KEY=...Provider | Env key | Default model | API style |
DeepSeek |
|
| OpenAI-compatible Chat Completions |
OpenAI |
|
| OpenAI Chat Completions |
Claude |
|
| Anthropic Messages API |
OpenRouter |
|
| OpenAI-compatible Chat Completions |
Gemini |
|
| Gemini Generate Content API |
uv run garmin-mcp ask "How is my recovery today?" --provider deepseek --allow-external-health-data
uv run garmin-mcp ask "Summarize my running for 90 days." --provider openai --allow-external-health-data
uv run garmin-mcp ask "What should I focus on this week?" --provider claude --allow-external-health-dataThe --allow-external-health-data flag is required because Garmin tool results can be sent to the selected provider.
Privacy And Safety
Your
.envfile and Garmin token cache stay local and are ignored by git.MCP clients that run locally can call Garmin tools without sending provider API keys to this project.
Provider demo commands such as
garmin-mcp askcan send Garmin health/activity results to the selected LLM provider, so the CLI requires--allow-external-health-data.get_zonesreturns only zone/threshold fields from the Garmin profile, not the raw profile (gender, birth date, weight, and similar PII are trimmed).
Testing
uv run garmin-mcp doctor
uv run garmin-mcp doctor --live
uv run garmin-mcp tools
uv run ruff check .
uv run pytestCI runs on Linux (Python 3.11, 3.12, 3.13) and Windows (3.12). Optional live tests are gated and never run in CI:
$env:GARMIN_LIVE_TEST = "1"
uv run pytest tests/liveTroubleshooting
Garmin rate-limited the request— lowerGARMIN_MAX_CONCURRENCY(for example to3) and retry after a few minutes.Garmin authentication failed— checkGARMIN_EMAIL/GARMIN_PASSWORD, then runuv run garmin-mcp loginfrom a real terminal (MFA prompts need interactive input).Garmin rejected the Personal API key— keys expire after 30/90/180/365 days. Create a new one at https://connect.garmin.com/app/settings/personalApiToken, updateGARMIN_PERSONAL_API_KEY, thenuv run garmin-mcp personal-api --check.personal api required— that tool only exists on the official backend. SetGARMIN_PERSONAL_API_KEYandGARMIN_AUTH_MODE=personal(orhybrid).A derived metric is
nullon the personal backend — training status/load, readiness, VO2 Max, race predictions and personal records are not in Garmin's Personal API. Switch toGARMIN_AUTH_MODE=unofficialwhen you need them.A tool returns
errors— the array names the endpoint that failed; the rest of the payload is still valid partial data.
Garmin Disclaimer
This project uses the community garminconnect Python package and Garmin Connect endpoints. Garmin Connect is not a public API for individual open-source projects, and authentication or endpoint behavior may change without notice.
Some metrics depend on Garmin device capabilities. For example, a device may expose VO2 Max and Training Effect but not native Garmin Training Load or Training Status. Zone availability depends on what the Garmin user settings endpoint exposes for your account.
License
This project is licensed under the MIT License.
Made by kavakoss. Inspired by Jack-Abyss/claude-garmin, with a clean-room implementation focused on LLM-agnostic MCP usage.
Available Tools
24 toolsdownload_activity_fileA
Download the original activity file (ZIP containing the .FIT) for one activity.
Personal API only. This is the raw recording — GPS track, HR, cadence, laps, sample by sample — which the unofficial flow cannot fetch. Garmin strips some fields it computes (VO2 Max, recovery time, performance condition) from files delivered through its API, so this is not identical to a manual download.
Inputs: activity_id (required), save_path. Returns: object
get_activity_detailC
Detailed summary for one activity by Garmin activity ID.
Inputs: activity_id (required). Returns: object
get_activity_splitsB
Per-lap splits for one activity: pace, HR, cadence, elevation and HR drift.
Inputs: activity_id (required). Returns: object
get_body_battery_rangeA
Daily body battery (charged, drained, highest, lowest, end of day).
get_recovery only exposes today's levels; this walks the range endpoint so the
history is available for trends. The raw per-timestamp arrays are summarised away
because they are large and rarely useful. daily is newest-first, like every other
daily array here.
Inputs: days. Returns: object
get_body_compositionA
Weight (and body fat/muscle when the scale reports it) from Garmin Connect.
Personal API only. Weight is what most fitness decisions here hinge on, and the unofficial flow never exposed it as a tool.
Inputs: days. Returns: object
get_fitnessB
VO2 max, cycling FTP, and race predictions.
Inputs: no named parameters. Returns: object
get_fitness_ageB
Garmin's fitness age for today. Personal API only.
Inputs: no named parameters. Returns: object
get_full_snapshotC
Comprehensive Garmin data snapshot for holistic analysis.
Every section carries a data_source field naming the backend that
answered it (personal, unofficial, or personal+unofficial when one
section needed both — with the per-endpoint map in source_detail). In
hybrid mode this makes it visible which numbers are official-API data and
which came from the derived-metrics backend, instead of hiding a fallback.
(data_source rather than source: some sections already use source
for their own provenance string, e.g. garmin_training_status.)
Inputs: load_days, activity_days. Returns: object
get_health_summaryB
Compact health snapshot combining recovery, sleep, and stress.
Inputs: days. Returns: object
get_hrv_historyA
Daily HRV (last-night and weekly average) plus a baseline.
get_recovery carries only a 7-day HRV window, which is fine for "how am I today"
but useless for trend questions. This is the same data over a longer range.
daily is newest-first, like every other daily array here.
Inputs: days. Returns: object
get_hydrationB
Logged daily fluid intake in millilitres. Personal API only.
Inputs: days. Returns: object
get_monthly_running_statsC
Monthly running stats for the last N calendar-ish months based on recent activities.
Inputs: months. Returns: object
get_personal_recordsC
Personal records returned by Garmin Connect.
Inputs: no named parameters. Returns: object
get_recent_activitiesA
Recent Garmin activities with normalized sport-aware summary fields.
Pass start_date/end_date for a specific historical window (both inclusive);
otherwise the days lookback is used. Explicit dates make a past window
queryable without pulling every newer activity first.
Inputs: days, limit, end_date, start_date. Returns: object
get_recent_loadB
Training volume aggregated by sport over the last N days.
Inputs: days. Returns: object
get_recoveryB
Current recovery state: readiness, HRV, sleep, body battery, and status.
Inputs: no named parameters. Returns: object
get_resting_heart_rateB
Daily resting heart rate with 7-day and 30-day trend summaries, up to 30 days.
Inputs: days. Returns: object
get_running_summaryC
Running summary: sessions, distance, pace, HR, longest run, fastest run, monthly split.
Inputs: days. Returns: object
get_sleepB
Sleep duration and sleep scores for the last N days.
Inputs: days. Returns: object
get_spo2C
Blood oxygen (SpO2) acclimation per day. Personal API only.
Inputs: days. Returns: object
get_steps_historyC
Daily step totals and goals. Personal API only.
Inputs: days. Returns: object
get_stressB
Daily all-day stress levels and stress duration buckets.
Inputs: days. Returns: object
get_training_loadB
Garmin training load status, acute/chronic load, and load focus.
Inputs: no named parameters. Returns: object
get_zonesB
Heart-rate zones and thresholds from Garmin user settings when available.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools target distinct metrics, but there is meaningful overlap among the health/recovery/snapshot tools: get_recovery, get_health_summary, get_full_snapshot, get_body_battery_range, get_hrv_history, get_sleep, and get_stress all overlap in scope. The descriptions clarify ranges versus snapshots, but an agent could still hesitate about which tool to call for broad questions like "how am I doing?"
All tool names use snake_case and a consistent verb_noun pattern, overwhelmingly with the get_ prefix. download_activity_file is a deliberate action-specific deviation rather than an inconsistency.
At 24 tools, this server sits in the heavy range for a single MCP server, even though the Garmin domain is broad. Most tools are purposeful, but the count is large enough that selection and maintenance become harder.
The surface covers activities, recovery, sleep, HRV, stress, body battery, body composition, SpO2, hydration, steps, fitness metrics, zones, records, and raw activity download. Minor gaps remain, such as structured workouts, device/gear data, and direct access to per-sample activity streams outside the FIT download, but core workflows are well covered.
Maintenance
Related MCP Connectors
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Garmin Connect MCP server for ChatGPT, Claude and any AI agent: list activities, download FIT file, read sleep and HRV, get training status, create workout and schedule workout in your own Garmin Connect account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Garmin Connect yourself; Cotlet does not store your password and you need no Garmin Connect API key. About the official Garmin Connect API: Yes, in part (checked 27 Oct 2026). Garmin reopened its Connect Developer Program on 21 Oct 2026. Setup and FAQ: https://cotlet.dev/integrations/garmin-api-mcp-server
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that integrates Garmin Connect data with LLMs to provide personalized running analysis and training plans. It enables users to monitor performance metrics, manage training loads, and receive data-driven workout suggestions based on health indicators like VO2 Max and recovery status.435-
- AlicenseNot gradedqualityDmaintenanceMCP server that connects Garmin Connect data to Claude, enabling training analysis, recovery checks, and personalized plans based on real metrics like HRV, training load, and activities.24MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server for Garmin Connect integration. Access your activities, health data, training metrics, and more through Claude and other LLMs.2268MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to interact with Garmin Connect, enabling retrieval of health, activity, and device data through natural language.66MIT