garmin-connect-mcp
Provides comprehensive access to Garmin Connect data, allowing users to retrieve activity summaries, time-series health metrics (heart rate, stress, respiration), sleep data, body battery levels, VO2 Max estimates, and GPS polyline information.
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-connect-mcp What was my sleep score last night and my current body battery?"
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-connect-mcp
MCP server for Garmin Connect. Access your activities, health stats, sleep data, FIT files, and more from Claude Code or any MCP client.
Why This Exists
In March 2026, Garmin changed their authentication API, breaking garth and python-garminconnect — the two most popular libraries for accessing Garmin data programmatically. Garth has been officially deprecated. Garmin added Cloudflare TLS fingerprinting that blocks all non-browser HTTP clients (Node.js fetch, Python requests, curl) from their API endpoints.
This project works around that by routing all API calls through a headless Playwright browser, inheriting a real Chrome TLS fingerprint. Authentication uses browser cookies captured from a manual login session.
Related MCP server: mcp-garmin
Install
npm install -g @etweisberg/garmin-connect-mcp
npx playwright install chromiumThen register with Claude Code:
claude mcp add garmin -- npx @etweisberg/garmin-connect-mcpYou also need the Playwright MCP server for the login flow:
claude mcp add playwright -- npx @playwright/mcp@latestPrerequisites
Node.js 18+
Playwright MCP server (for browser-based login)
A Garmin Connect account with a synced device
Setup
1. Login
In Claude Code, call the garmin-login tool. It will walk you through:
Opening Garmin Connect in the Playwright browser
Logging in manually
Extracting cookies and CSRF token
Saving the session to
~/.garmin-connect-mcp/session.json
2. Verify
Call the check-session tool to confirm authentication works.
Session cookies expire after a few hours. Re-run the login flow when they do.
Available Tools
Session & Auth
Tool | Description |
| Returns login instructions for the Playwright MCP browser |
| Validates the saved session is still active |
| Returns a test plan to verify all tools work |
Activities
Tool | Description |
| List activities with pagination |
| Full activity summary (distance, duration, HR, calories) |
| Time-series metrics (HR, cadence, elevation over time) |
| Lap/split data |
| Heart rate time-in-zone breakdown |
| Full-resolution GPS track |
| Weather conditions during activity |
| Download original FIT file |
Daily Health
Tool | Description |
| Steps, calories, distance, intensity minutes |
| Heart rate data throughout the day |
| Stress levels throughout the day |
| Combined wellness chart data |
| Intensity minutes for a date |
| Movement/activity data |
| Respiration rate data |
Sleep / Body Battery / HRV
Tool | Description |
| Sleep score, duration, stages, SpO2 |
| Body battery charged/drained values |
| Heart rate variability data |
Training & Recovery
Tool | Description |
| Training readiness score (sleep, recovery, load) |
| Sleep statistics over a date range |
| Daily hydration/water intake data |
Weight / Records / Fitness
Tool | Description |
| Weight measurements over a date range |
| All personal records with history |
| Aggregated activity stats by type |
| Latest VO2 Max estimate |
| Heart rate zone boundaries |
| Power zone config for all sports |
| User profile and settings |
Calendar, Goals & Badges
Tool | Description |
| Monthly calendar with activities and events |
| Active, future, or past fitness goals |
| All earned badges/achievements |
| Badge leaderboard among connections |
Workouts
Tool | Description |
| List saved workouts |
| Get workout details (steps, segments) |
| Create a new workout (warmup, intervals, cooldown) |
| Schedule a workout to a date (syncs to device) |
| Delete a workout |
| Download a workout as a FIT file |
Architecture
Claude Code / MCP Client
|
| MCP (stdio)
v
garmin-connect-mcp server
|
| page.evaluate(fetch(...))
v
Headless Playwright Chromium
|
| HTTPS (real Chrome TLS fingerprint)
v
connect.garmin.com/gc-api/*All API calls are made from within a headless Chromium browser context via page.evaluate(fetch(...)). This inherits the real Chrome TLS fingerprint, bypassing Cloudflare's detection of non-browser clients.
Auth flow: Cookies + CSRF token are captured from a manual browser login (via the Playwright MCP server) and stored at ~/.garmin-connect-mcp/session.json. The headless browser loads these cookies on startup.
Why not direct HTTP? Cloudflare blocks Node.js fetch, Python requests, and even curl with a 403. Only requests from a real browser TLS stack are accepted.
Development
git clone https://github.com/etweisberg/garmin-connect-mcp.git
cd garmin-connect-mcp
npm install
npx playwright install chromium
npm run buildScripts
Command | Description |
| Compile TypeScript |
| Run ESLint |
| Format with Prettier |
| Type check without emitting |
| Run integration tests (requires valid session) |
Local Integration Testing
The standalone test suite (npm test) requires a valid Garmin session and hits the real API. Run it locally after authenticating:
npm testContributing
Create a feature branch off
mainMake your changes
Run checks:
npm run lint npm run format npm run typecheck npm run buildTest via Claude Code: The recommended way to verify your changes is through Claude Code. After building, call the
run-testsMCP tool — it returns a test plan that exercises all 27 tools against the live Garmin API. Tell Claude to execute the plan and report results.Open a PR against
main
CI runs lint, format check, typecheck, and build on every PR. Integration tests run locally only (they require Garmin authentication that can't safely run in CI).
Releasing
Releases are fully automated. Every merge to main triggers the release workflow which:
Runs CI (lint, format, typecheck, build)
Bumps the patch version
Publishes to npm with provenance
Creates a GitHub Release
No manual version bumping or tagging needed — just merge your PR.
License
Available Tools
41 toolscheck-sessionA
Check if the saved Garmin Connect session is still valid. MUST be called after garmin-login to verify authentication worked.
Inputs: no named parameters.
create-workoutA
Upload a workout from JSON data.
Creates a new workout in Garmin Connect from structured workout data.
IMPORTANT: Step types must use Garmin's DTO format:
Use "ExecutableStepDTO" for regular steps (warmup, interval, cooldown, recovery)
Use "RepeatGroupDTO" for repeat/interval groups with numberOfIterations
IMPORTANT: For heart rate zone targets, use "zoneNumber" (1-5), NOT targetValueOne/targetValueTwo. targetValueOne/targetValueTwo are only for absolute value ranges (e.g. pace in m/s, power in watts).
Sport type IDs: 1=running, 2=cycling, 3=swimming, 4=walking, 5=strength_training, 6=fitness_equipment, 7=hiking. Step type IDs: warmup (1), cooldown (2), interval (3), recovery (4), rest (5). End condition IDs: time (2, value in seconds), distance (3, value in meters), lap.button (7, no value), reps (10, value = rep count — use for strength exercises). Target type IDs: no.target (1), speed (2, m/s range via targetValueOne/targetValueTwo), heart.rate.zone (4, use zoneNumber 1-5), power.zone (11, use zoneNumber).
Available Templates: Instead of building workout JSON from scratch, use these MCP resources as starting points:
workout://templates/simple-run - Basic warmup/run/cooldown structure
workout://templates/interval-running - Interval training with repeat groups
workout://templates/tempo-run - Tempo run with heart rate zone targets
workout://templates/strength-circuit - Strength training circuit structure
workout://reference/structure - Complete JSON structure reference with all fields
Access these resources using your MCP client's resource reading capability, modify the template as needed, and pass the resulting JSON as the workout parameter.
Example workout structure with HR zone target: { "workoutName": "My Workout", "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSegments": [{ "segmentOrder": 1, "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSteps": [{ "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 3, "stepTypeKey": "interval"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 1200.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 3 }] }] }
Example with RepeatGroupDTO for intervals: { "workoutName": "Interval Run", "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSegments": [{ "segmentOrder": 1, "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSteps": [ { "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 1, "stepTypeKey": "warmup"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 600.0, "targetType": {"workoutTargetTypeId": 1, "workoutTargetTypeKey": "no.target"} }, { "type": "RepeatGroupDTO", "stepOrder": 2, "numberOfIterations": 6, "workoutSteps": [ { "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 3, "stepTypeKey": "interval"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 60.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 5 }, { "type": "ExecutableStepDTO", "stepOrder": 2, "stepType": {"stepTypeId": 4, "stepTypeKey": "recovery"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 90.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 2 } ] }, { "type": "ExecutableStepDTO", "stepOrder": 3, "stepType": {"stepTypeId": 2, "stepTypeKey": "cooldown"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 600.0, "targetType": {"workoutTargetTypeId": 1, "workoutTargetTypeKey": "no.target"} } ] }] }
Inputs: workout (required).
delete-workoutB
Delete a workout from Garmin Connect
Inputs: workoutId (required).
download-fitB
Download the original FIT file for an activity. Returns the file path.
Inputs: activityId (required), outputDir.
download-workout-fitC
Download a workout as a FIT file
Inputs: workoutId (required), outputDir.
garmin-loginA
Returns step-by-step instructions for authenticating with Garmin Connect. Requires the Playwright MCP server to be installed. After following these steps, ALWAYS call the check-session tool to verify the login worked.
Inputs: no named parameters.
get-activityB
Get full activity summary (name, type, distance, duration, HR, calories, etc.)
Inputs: activityId (required).
get-activity-detailsA
Get time-series metrics for an activity (HR, cadence, elevation, pace over time)
Inputs: activityId (required), maxChartSize.
get-activity-hr-zonesB
Get heart rate time-in-zone breakdown for an activity
Inputs: activityId (required).
get-activity-polylineA
Get full-resolution GPS track/polyline for an activity
Inputs: activityId (required).
get-activity-splitsB
Get lap/split data for an activity
Inputs: activityId (required).
get-activity-weatherB
Get weather conditions during an activity
Inputs: activityId (required).
get-badge-leaderboardB
Get badge leaderboard among your connections
Inputs: limit.
get-badgesA
Get all earned badges/achievements
Inputs: no named parameters.
get-body-batteryA
Get today's body battery charged/drained values
Inputs: no named parameters.
get-calendarB
Get monthly calendar with activities, workouts, and events
Inputs: year (required), month (required).
get-daily-heart-rateB
Get heart rate data throughout the day (resting HR, HR timeline)
Inputs: date.
get-daily-intensity-minutesB
Get intensity minutes earned for a date
Inputs: date.
get-daily-movementB
Get daily movement/activity data
Inputs: date.
get-daily-respirationC
Get respiration rate data for a date
Inputs: date.
get-daily-stressB
Get stress level data throughout the day
Inputs: date.
get-daily-summaryB
Get daily summary: steps, calories, distance, intensity minutes, floors, etc.
Inputs: date.
get-daily-summary-chartB
Get daily wellness summary chart data (combined health metrics)
Inputs: date.
get-fitness-statsB
Get aggregated fitness stats by activity type over a date range
Inputs: startDate (required), endDate (required), aggregation, metric.
get-goalsC
Get fitness goals
Inputs: status.
get-hrvB
Get heart rate variability (HRV) data for a date
Inputs: date.
get-hr-zones-configB
Get your configured heart rate zone boundaries
Inputs: no named parameters.
get-hydrationB
Get daily hydration/water intake data
Inputs: date.
get-personal-recordsA
Get all personal records with history (fastest mile, longest run, etc.)
Inputs: no named parameters.
get-power-zonesA
Get power zone configuration for all sports
Inputs: no named parameters.
get-sleepC
Get sleep data: score, duration, stages, SpO2, HRV during sleep
Inputs: date.
get-sleep-statsB
Get sleep statistics over a date range (averages, trends)
Inputs: startDate (required), endDate (required).
get-training-readinessA
Get training readiness score for a date (based on sleep, recovery, training load)
Inputs: date.
get-user-profileA
Get your Garmin Connect user profile and settings
Inputs: no named parameters.
get-vo2maxB
Get latest VO2 Max / fitness level estimate
Inputs: date.
get-weightB
Get weight measurements over a date range
Inputs: startDate (required), endDate (required).
get-workoutA
Get a single workout by ID with full step/segment details
Inputs: workoutId (required).
list-activitiesA
List your Garmin Connect activities with pagination
Inputs: limit, start.
list-workoutsB
List your saved workouts
Inputs: start, limit.
run-testsA
Returns a test plan for verifying all garmin-connect-mcp tools work. Call each tool listed and report results.
Inputs: no named parameters.
schedule-workoutA
Schedule an existing workout to a date on your calendar. The workout will sync to your device.
Inputs: workoutId (required), date (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Most tools have clearly distinct purposes (e.g., get-sleep vs get-sleep-stats), with descriptions clarifying differences. Minor overlap exists between get-daily-summary and get-daily-summary-chart, and between get-activity and get-activity-details, but descriptions help disambiguate.
All tools use consistent snake_case naming with a clear verb-noun pattern (e.g., check-session, create-workout, list-activities). Verbs are uniformly applied, and no mixing of conventions (camelCase, PascalCase) occurs.
With 41 tools, the surface is large but arguably justified by the breadth of Garmin Connect (activities, workouts, daily health, etc.). However, some tools could be merged (e.g., daily metrics) and the count may overwhelm agents, making it borderline.
The tool set covers core CRUD for workouts and activities, extensive daily health metrics, user profile, badges, and calendar. Minor gaps exist (no update/delete activities, no update workout), but the domain's primary use cases are well-supported.
Maintenance
Related MCP Connectors
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
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.
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that provides access to Garmin Connect fitness, health, and training data through 61 specialized tools. It enables users to query activities, sleep metrics, and performance stats directly within AI clients like Claude or Cursor.97193MIT
- AlicenseAqualityDmaintenanceMCP server for Garmin Connect that provides read-only access to daily health metrics, activities, workouts, and body composition data.32MIT
- FlicenseAqualityDmaintenanceMCP server that connects AI assistants to Garmin Connect health and fitness data, enabling natural language queries about workouts, sleep, heart rate, and more.29-
- AlicenseNot gradedqualityCmaintenanceMCP server for Garmin Connect that enables users to access and manage their personal health and fitness data, including daily summaries, heart rate, sleep, HRV, stress, body composition, activities, and training readiness, with secure per-user authentication.Functional Source , Version 1.1, ALv2 Future