garmin-coach-mcp
This server enables Claude to read and analyze your Garmin Connect data, and optionally create or manage workouts.
Read & Analysis
Connection status & account info
List recent activities (filter by type) and retrieve detailed metrics for any activity
Per-set strength data (exercises, reps, weight, estimated 1RM) and strength history trends
Recovery snapshot: sleep, daily stats, training readiness
Health trends: time series for resting HR, steps, stress, body battery, etc.
Progressive overload suggestions based on history
Write Capabilities (disable with GARMIN_COACH_READONLY=1)
List, create, schedule, and delete workouts (strength)
Schedule existing workouts onto your calendar
Delete workouts (e.g., to undo experimental creations)
Integrates with Garmin Connect to read activity data (recent activities, per-set strength history, sleep, recovery, trends) and optionally create, schedule, and delete strength workouts on the user's Garmin watch.
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-coach-mcp how was my sleep and recovery today?"
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-coach-mcp
An MCP server that lets Claude read and answer questions about your Garmin Connect data — recent activities, per-set strength history, sleep and recovery, and simple trends — and optionally build workouts back onto your watch.
Same code, two ways to run it:
Mode | Where | Use it for | Setup |
Local | Your PC, launched by Claude Code | Day-to-day at your desk | ~2 min, free |
Hosted | Azure Container Apps | Asking from your phone, PC off | ~20 min, ~$5/mo |
Local is the default: nothing listens on a socket, so nothing needs authenticating. Hosted is opt-in and sits behind Microsoft Entra sign-in.
Garmin's API is unofficial. This uses
python-garminconnect, which is not sanctioned by Garmin and can break when they change their backend. Fine for personal use; don't build anything load-bearing on it.
Quick start
Local
git clone https://github.com/jhoy1020/garmin-coach-mcp.git
cd garmin-coach-mcp
./scripts/setup.sh # or .\scripts\setup.ps1 on WindowsCreates the virtualenv, installs the package, runs the one-time Garmin login, and
registers the server with Claude Code using this checkout's own path. Nothing to edit.
Verify with python scripts/doctor.py, then restart Claude Code and ask it something.
Hosted — after the local setup works:
python scripts/deploy.pyProvisions Azure, registers the Entra application, seeds your Garmin token, and prints the connector URL.
Related MCP server: garth-mcp-server
What leaves your machine
Local mode: nothing. The server talks to Garmin directly from your PC. Your Garmin password is typed into a subprocess and never stored — only a refreshable token, in
~/.garminconnect.Hosted mode: that token is uploaded to an Azure file share in your own subscription, and your Garmin data passes through your own container. Requests come from claude.ai's servers. See docs/security.md.
Tools
Read (9)
Tool | What it answers |
| Is the connection working? Whose account? |
| "Show my last N workouts" |
| Detailed metrics for one activity |
| Per-set exercise / reps / weight / est. 1RM |
| "Is my squat going up?" |
| Sleep + daily stats + training readiness |
| Resting HR, steps, stress over time |
| Progressive-overload recommendation |
| Saved workouts (name + id) |
Write (3) — set GARMIN_COACH_READONLY=1 to drop these from the manifest entirely.
Tool | What it does |
| Build a strength workout on Garmin (experimental) |
| Put an existing workout on your calendar |
| Undo / remove a workout |
Strength answers only have data if you log Strength activities with weights on your watch.
create_strength_workoutuses Garmin's unofficial workout schema — check the result in the Garmin Connect app anddelete_workoutif it's wrong.
Layout
src/garmin_coach_mcp/
server.py tool definitions + entry point
config.py settings; refuses to start on unsafe combinations
http_app.py SecretGate - the auth ladder for hosted requests
oauth.py validates Entra-issued tokens
oauth_broker.py a small OAuth 2.1 server (the path real clients use)
ratelimit.py token buckets for the unauthenticated endpoints
garmin_client.py cached, token-authenticated Garmin client
analysis.py strength-history and trend computations, argument clamps
strength_workout.py Garmin workout payload builder
login.py one-time interactive Garmin login
scripts/ setup, deploy, doctor, rotate, secret scanner
infra/ Bicep for the hosted deployment
tests/ 109 tests
docs/ setup, architecture, security, troubleshootingDocumentation
Run it on your PC | |
Deploy to Azure with Microsoft sign-in | |
How it's built and why | |
Threat model, what protects what, rotating secrets | |
Organised by what you actually see | |
Context for AI agents working on this repo |
Scripts
Task | Command |
Set up locally |
|
Diagnose anything |
|
Deploy to Azure |
|
Register the Entra app |
|
Upload the Garmin token |
|
Rotate secrets |
|
Get the connector URL |
|
Scan for secrets |
|
Configuration
.env.example documents every setting. The ones you are most likely to touch:
Variable | Default | Meaning |
|
|
|
| off | Hide the three write tools entirely |
|
| Where the Garmin OAuth token lives |
| your machine's | Container |
|
| Hosts that may receive an authorization code |
Hosted mode also needs the Entra values, which scripts/deploy.py sets for you — see
docs/remote-setup.md for the name mapping between what you type
and what the container reads.
config.py refuses to start on unsafe combinations rather than running half-secured:
a partial Entra configuration, an http transport with no way to authenticate, a
too-short secret, a non-https public URL, access logging alongside a URL secret, or a
wildcard redirect-host allowlist without an explicit second opt-in.
Tests
python scripts/setup_local.py --dev # installs pytest
python -m pytest109 tests. The security-relevant ones are written to fail if the fix is reverted — the
concurrency test genuinely serialises without the threadpool, and the rate-limiter test
fails if the limiter key goes back to the spoofable leftmost X-Forwarded-For entry.
Contributing
python scripts/install_hooks.py enables the pre-commit scanner (setup does this for
you). It blocks credentials and personal data — this repository is public, and the
thing that actually needed cleaning up was absolute paths and resource names, not keys.
CI runs the same checks.
Licence
MIT.
Available Tools
12 toolscreate_strength_workoutA
Create a strength workout in Garmin Connect (and optionally schedule it).
EXPERIMENTAL: built from Garmin's unofficial workout schema. After creating, open the Garmin Connect app to confirm it looks right; use delete_workout to undo.
Args: name: Workout name shown on the watch / in Garmin Connect. exercises: List of exercises. Each item: {"name": "Bench Press", "sets": 3, "reps": 10, "weight_kg": 60, "rest_seconds": 90, "category": "BENCH_PRESS" (optional Garmin key)} schedule_date: Optional YYYY-MM-DD to place it on your Garmin calendar.
Inputs: name (required), exercises (required), schedule_date.
delete_workoutA
Delete a saved Garmin workout (undo a created workout).
Args: workout_id: The workout's ID from list_workouts / create_strength_workout.
Inputs: workout_id (required).
garmin_statusA
Check that the Garmin connection works and show whose account is connected.
Use this first to confirm authentication before other tools.
Inputs: no named parameters. Returns: object
get_activityA
Get detailed metrics for a single activity by its ID.
Args: activity_id: The activityId from list_activities.
Inputs: activity_id (required).
get_exercise_setsA
Get the per-set strength breakdown (exercise, reps, weight, est. 1RM) for one activity.
Only meaningful for strength_training activities logged with sets on the watch.
Args: activity_id: The activityId of a strength workout.
Inputs: activity_id (required).
get_recoveryA
Get sleep, daily stats, and training readiness for one day (default today).
Args: date: YYYY-MM-DD. Defaults to today.
Inputs: date.
get_strength_historyA
Progressive-overload view: strength sets grouped by session over recent weeks.
Walks your recent strength_training activities, pulls their sets, and returns per-session weight x reps so you can see whether a lift is going up.
Args: exercise_name: Optional case-insensitive substring to filter to one lift (e.g. "bench", "squat"). Omit to include all exercises. weeks: How many weeks back to look (default 8). max_sessions: Cap on how many strength sessions to fetch (default 20).
Inputs: weeks, max_sessions, exercise_name.
get_trendsA
Time series of a daily health metric to answer 'how am I trending?'.
Args: metric: One of resting_hr, steps, calories, stress, body_battery_high, body_battery_low, floors_climbed. weeks: How many weeks back to sample (default 8, max 26). sample_days: Sampling interval in days (default 7 = weekly). The series is capped at 60 points; a finer interval over a long window is widened automatically rather than making hundreds of requests.
Inputs: metric (required), weeks, sample_days.
list_activitiesA
List your most recent Garmin activities.
Args: limit: How many recent activities to return (default 10). activity_type: Optional Garmin type key filter, e.g. "running", "strength_training", "cycling". Omit for all types.
Inputs: limit, activity_type.
list_workoutsA
List saved Garmin workouts (name + id), newest first.
Args: limit: How many workouts to return (default 20).
Inputs: limit.
schedule_workoutA
Schedule an existing Garmin workout onto your calendar.
Args: workout_id: The workout's ID (from create_strength_workout or list_workouts). date: Target date, YYYY-MM-DD.
Inputs: date (required), workout_id (required).
suggest_next_weightA
Recommend the next weight & reps for a lift using progressive overload.
Reads your recent strength history for the exercise and applies a double-progression rule. This is read-only (it does not change anything on Garmin).
Args: exercise_name: Case-insensitive substring of the lift, e.g. "bench", "squat". reps_low: Bottom of your target rep range (default 8). reps_high: Top of your target rep range (default 12). increment_kg: Weight jump when you graduate the range (default 2.5). weeks: How many weeks of history to consider (default 8).
Inputs: exercise_name (required), weeks, reps_low, reps_high, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct concern: status, activity retrieval, strength analysis, recovery trends, and workout management. Even the strength-related tools are clearly separated by scope (single activity vs. history vs. recommendation), so an agent can reliably select the right one.
Most tools follow a verb_noun pattern (list_activities, get_activity, create_strength_workout, schedule_workout, delete_workout, suggest_next_weight), but garmin_status deviates from this pattern, making the naming slightly inconsistent overall.
With 12 tools, the server is well-scoped for its purpose: it covers activity data, health metrics, strength analysis, and workout management without unnecessary redundancy or bloat.
The server covers the main coach workflows: reading activities, analyzing strength progression, suggesting next weights, and managing workouts. Minor gaps such as listing scheduled workouts or updating an existing workout are easy to work around and do not cripple the overall tool surface.
Maintenance
Related MCP Connectors
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Unofficial Garmin Connect access: sleep, HRV, training, activities, workouts and weight.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for Garmin Connect that provides read-only access to daily health metrics, activities, workouts, and body composition data.32MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to interact with Garmin Connect, enabling retrieval of health, activity, and device data through natural language.66MIT
- AlicenseNot gradedqualityCmaintenancePersonal MCP server for interacting with your Garmin Connect data. Exposes 62 tools across 11 domains including activities, health, training, and workouts.1MIT
- AlicenseAqualityDmaintenanceMCP server that exposes Garmin Connect health and activity data (steps, sleep, stress, activities, etc.) via tools for querying, analysis, and visualization.17Apache 2.0