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 "Install 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-mcpWhat 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.
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 |
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 |
| User profile and settings |
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
Fork the repo and create a feature branch
Make 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 automated via GitHub Actions:
# Bump version
npm version patch # or minor, major
# Push the tag
git push --follow-tags
# GitHub Actions will:
# 1. Build the package
# 2. Publish to npm with provenance
# 3. Create a GitHub ReleaseLicense
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/etweisberg/garmin-connect-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server