garmin-personal-mcp
Reads the user's own Garmin Connect data through Garmin's official Personal API — activities (list, details, laps/splits), sleep (single night and ranges), HRV, Body Battery, stress, and other daily health metrics — with privacy scrubbing, unit maps and ready-made pace strings.
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-personal-mcp
A private, self-hosted remote Model Context Protocol (MCP) server that lets Claude (on web and mobile) read your own Garmin Connect data via Garmin's official Personal API.
Disclaimer: Not affiliated with or endorsed by Garmin. Garmin and Garmin Connect are trademarks of Garmin Ltd. or its subsidiaries.
Not technical? Read here — setup is easy (and free)
You don't need to know how to code, edit config files, or manage a server.
All you need are:
A free GitHub account
A free Cloudflare account
Your Garmin Connect account
If you use an AI coding assistant (Claude Code, Antigravity, Cursor, Codex, etc.), it can handle almost the entire setup for you in about 5 minutes — just paste this prompt:
Clone https://github.com/cheehongloong/garmin-personal-mcp and follow AGENTS.md to deploy my personal Garmin MCP server to Cloudflare Workers. Handle all terminal steps yourself and guide me one click at a time whenever I need to click something in the browser.You will only need to do 4 quick browser clicks yourself (logging into Cloudflare, clicking "Create Key" in Garmin Connect, clicking "Register application" in GitHub, and pasting your final URL into claude.ai). Your assistant takes care of everything else.
Related MCP server: Garmin MCP Worker
Why self-host instead of using a hosted app?
Your Garmin Personal API key stays yours: Your Garmin Personal API key unlocks read access to your sleep, heart rate, HRV, stress, and GPS workout history. When you self-host on your own free Cloudflare account, no third-party developer, startup, or shared server ever touches your API key or your health data.
Official Garmin Personal API (no password scraping): Garmin's Personal API is built specifically for individuals reading their own data — not for multi-user SaaS apps. Unlike unofficial libraries that ask for your Garmin password and break whenever Garmin updates its login screen, this uses Garmin's official API key.
Locked to one account, runs for free: Access is gated by your own GitHub login (
ALLOWED_GITHUB_LOGIN) — anyone else trying to sign in gets rejected immediately — and everything runs comfortably on Cloudflare's Free tier.Privacy-first by default: Zero analytics, zero telemetry, and zero logging of tokens or health payloads. Before responses reach Claude, the server automatically strips your name, Garmin owner/profile IDs, profile photo links, device IDs, and exact start/end GPS coordinates, trims unused fields and raw per-minute arrays, adds an explicit
unitsmap + ready-made pace strings, and normalizes unworn sleep nights and Garmin's-1no-data stress sentinels to{ date, recorded: false }.
Prerequisites
A Cloudflare account — the Free tier is sufficient (Workers + Workers KV).
A GitHub account — used to authenticate yourself during OAuth sign-in.
A Garmin Connect Personal API key:
Sign in to connect.garmin.com.
Open your Profile & Account menu → Account Settings.
Open the Personal API Key section and click Create Key.
Accept the terms, pick an expiration period, and click Create.
Copy the key immediately — Garmin only displays it once.
Deploy
Option A: Hands-off setup with an AI agent (Recommended for non-technical users)
Paste the prompt in Not technical? Read here above into Claude Code, Antigravity, Cursor, or Codex. It follows AGENTS.md step-by-step and verifies your live server automatically.
Option B: One-click Deploy to Cloudflare
Click the button above to clone the repo into your GitHub account, provision the
OAUTH_KVWorkers KV namespace, and deploy your Worker (https://garmin-personal-mcp.<your-subdomain>.workers.dev).Continue to Create a GitHub OAuth App and Configure secrets and vars below.
Option C: Manual deploy with Wrangler
Requires Node.js 24+ and Yarn 4 (corepack enable).
git clone https://github.com/cheehongloong/garmin-personal-mcp.git
cd garmin-personal-mcp
corepack enable
yarn install
yarn wrangler loginCreate a KV namespace for OAuth state and Garmin bearer-token caching:
yarn wrangler kv namespace create OAUTH_KVCopy wrangler.jsonc to a gitignored wrangler.local.jsonc (or update your fork's wrangler.jsonc) with:
Your new
OAUTH_KVnamespaceidALLOWED_GITHUB_LOGIN: your exact GitHub username (the Worker fails closed if empty)TIMEZONE: your IANA timezone (e.g."America/New_York","Europe/London","Asia/Tokyo") so "today" and 7-day defaults match your local calendar
Deploy:
yarn wrangler deploy -c wrangler.local.jsoncNote the deployed Worker URL printed by Wrangler, e.g. https://garmin-personal-mcp.<your-subdomain>.workers.dev.
Create a GitHub OAuth App
Go to GitHub Settings → Developer settings → OAuth Apps → New OAuth App (github.com/settings/developers).
Fill in the exact URLs for your Worker:
Application name:
garmin-personal-mcp(or anything you like)Homepage URL:
https://<worker-name>.<your-subdomain>.workers.devAuthorization callback URL:
https://<worker-name>.<your-subdomain>.workers.dev/callback
Click Register application, then click Generate a new client secret.
Copy the Client ID and Client Secret.
(For local development with yarn dev, create a separate OAuth App with Homepage URL http://localhost:8787 and Authorization callback URL http://localhost:8787/callback.)
Configure secrets and vars
Secrets
Set these in the Cloudflare Dashboard (Workers & Pages → <your-worker> → Settings → Variables and Secrets) or with Wrangler (note: pass the secret name, and paste the value when prompted):
yarn wrangler secret put GARMIN_PERSONAL_API_KEY -c wrangler.local.jsonc
yarn wrangler secret put GITHUB_CLIENT_ID -c wrangler.local.jsonc
yarn wrangler secret put GITHUB_CLIENT_SECRET -c wrangler.local.jsonc
# Generate a 32-byte random hex key for remembering consent across browser sessions:
openssl rand -hex 32
yarn wrangler secret put COOKIE_ENCRYPTION_KEY -c wrangler.local.jsoncVars (wrangler.local.jsonc / wrangler.jsonc or Cloudflare Dashboard)
Variable | Required | Default | Description |
| Yes |
| Exact single GitHub username allowed to authorize. Fails closed ( |
| Recommended |
| Your immutable numeric GitHub user ID ( |
| No |
| Comma-separated OAuth redirect hostnames allowed to register and authorize (blocks consent phishing). Add e.g. |
| No |
| IANA timezone used for "today" and default 7-day ranges (Workers run in UTC). |
| No |
| Official Garmin Personal API base URL. |
| No | Derived from request origin | Optional override for the canonical RFC 9728 MCP resource URL (defaults to |
If you used the Deploy to Cloudflare button, set ALLOWED_GITHUB_LOGIN and TIMEZONE under Settings → Variables and Secrets (or commit them in your forked repo's wrangler.jsonc) and redeploy.
Add to claude.ai (web & mobile)
On web (claude.ai)
Open claude.ai → Settings → Connectors (or Customize → Connectors).
Click Add custom connector.
Enter your remote MCP URL:
https://<worker-name>.<your-subdomain>.workers.dev/mcpLeave the OAuth client fields on automatic registration (Dynamic Client Registration and Client ID Metadata Documents are both enabled).
Click Connect → review the consent screen → click Continue with GitHub and sign in with your allowlisted GitHub account.
On mobile (Claude iOS / Android app)
Custom connectors added on claude.ai sync automatically to the Claude mobile app on the same account. Open a new chat on your phone, ensure the connector is enabled in the chat's tools/connectors menu, and ask about your training or recovery.
(Because this server implements standard MCP Streamable HTTP + OAuth 2.1 + PKCE + DCR + CIMD, it also works with other compatible remote MCP clients such as MCP Inspector or Gemini Custom Apps where available.)
Available tools
All 14 tools are strictly read-only. Range tools default to the last 7 days ending today in TIMEZONE. Dates use YYYY-MM-DD.
Tool | Description |
| List activities newest first ( |
| Full summary for one activity by |
| Laps/splits and workout steps for one activity. |
| Detailed sleep for one night (stages, score, duration). Returns |
| Daily sleep summaries across a date range (default last 7 days). Unworn nights return |
| Daily HRV summaries across a date range (default last 7 days). |
| Daily Body Battery reports (charged, drained, daily high/low/start/end, feedback events; default last 7 days). |
| Daily stress stats across a date range (default last 7 days). Negative |
| Daily steps, calories, resting HR, and intensity minutes (default last 7 days). |
| Daily resting/min/max heart rate plus compact hourly min/avg/max buckets (default today). |
| Your configured Garmin heart rate zones. |
| Garmin fitness age for a date (default today). |
| Non-identifying profile preferences (units, time format, sleep schedule, training days). |
| Parallel fetch of sleep summaries, HRV, Body Battery, and stress for the last |
Example prompts
"Check my recovery snapshot for the last 7 days — should I do intervals today or take an easy run?"
"List my last 10 running activities and compare my pace and average HR on my longest run."
"Pull the splits from my latest workout and show how evenly I paced each lap."
"How has my resting heart rate and sleep duration trended over the last 14 days?"
Maintenance: rotating keys, revoking access, and deleting
Rotate your Garmin Personal API key
Delete the old key and create a new one in Garmin Connect (Account Settings → Personal API Key).
Update the Worker secret:
yarn wrangler secret put GARMIN_PERSONAL_API_KEY -c wrangler.local.jsoncCached Garmin bearer tokens in KV are bound to a hash of the API key and invalidate automatically on the next request. To clear the cached entry immediately:
yarn wrangler kv key delete --binding OAUTH_KV --remote garmin:bearer_token -c wrangler.local.jsonc
Revoke MCP access
In
claude.ai→ Settings → Connectors, disconnect or remove the custom connector.To revoke all active OAuth tokens and grants server-side, delete the
grant:*/token:*/client:*entries in yourOAUTH_KVnamespace (or delete and recreate the KV namespace).In GitHub Settings → Applications → Authorized OAuth Apps, revoke your
garmin-personal-mcpOAuth App.
Delete the deployment
yarn wrangler delete -c wrangler.local.jsoncThen delete the OAUTH_KV namespace in the Cloudflare Dashboard (Storage & Databases → KV), delete your GitHub OAuth App, and optionally delete your Garmin Personal API key.
Local development
cp .dev.vars.example .dev.vars
# Fill in your dev GitHub OAuth App credentials, COOKIE_ENCRYPTION_KEY,
# ALLOWED_GITHUB_LOGIN, TIMEZONE, and GARMIN_PERSONAL_API_KEY.
yarn devRun checks:
yarn typecheck
yarn lint
yarn testConnect MCP Inspector to http://localhost:8787/mcp (Streamable HTTP) to test OAuth and tools locally.
Limitations
Read-only: Garmin's Personal API does not support creating workouts, modifying activities, or writing data.
Single user: Built strictly for one owner per deployment (
ALLOWED_GITHUB_LOGIN). Do not expose a shared multi-user instance on a Personal API key.No activity weather tool:
get_activity_weather(/activity-service/activity/{id}/weather) was tested against the Garmin Personal API and consistently returned404 NOT_FOUNDeven on outdoor GPS runs, so it is omitted.Garmin rate limits & key expiry: Subject to Garmin Personal API rate limits and the key expiration period you chose when creating the key. Bearer tokens (valid up to 24h) are cached in Workers KV and reused while >1 hour remains, minimizing token endpoint traffic.
License
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
Your own Garmin data (sleep, HRV, Body Battery, activities) in Claude, ChatGPT and any MCP app.
Garmin data in ChatGPT, Claude & other AI apps via the Garmin Health API. No password sharing.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude and other remote OAuth-capable MCP clients to read personal Garmin Connect recovery, sleep, HRV, activity, and wellness data through Garmin's official Personal API.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude and other remote MCP clients to read a Garmin Connect account through Garmin's official Personal API, covering recovery trends, sleep, HRV, activities, and daily wellness data with OAuth-secured access.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude and other MCP clients to read a user's Garmin Connect data through Garmin's official Personal API, supporting queries about recovery, sleep, HRV, activities, heart rate, stress, and related wellness metrics.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude and other remote MCP clients to query a user's Garmin Connect data—including sleep, HRV, Body Battery, stress, heart rate, and activities—through Garmin's official read-only Personal API with OAuth sign-in.MIT