Skip to main content
Glama
Garmin MCP for Claude

Garmin MCP for Claude

Garmin MCP for Claude

A small, read-only MCP server that lets Claude read your own Garmin Connect data (activities, sleep, HRV, heart rate, body battery, stress, weight…) through Garmin's official Personal API.

  • Runs on your own Cloudflare account, on the free Workers plan

  • Works as a remote custom connector on claude.ai, so it is available on web, desktop and mobile

  • Protected by OAuth and a password that only you know

  • Your health data is not stored: the server fetches it from Garmin and passes it to Claude

🇮🇹 Guida in italiano: LEGGIMI.md

Unofficial project. It is not affiliated with, endorsed by or supported by Garmin or Anthropic. "Garmin" and "Claude" are trademarks of their respective owners.

One copy per person

Garmin's Personal API gives each user access to their own data with a key they generate themselves. This project follows that model: each person deploys their own copy, with their own Cloudflare account, Garmin key and password.

Please don't run one shared instance for other people. It would go against the intended use of the Personal API, and you would end up holding other people's health data.

Related MCP server: garmin-mcp

Tools

Tool

What it returns

garmin_list_activities

Activities (newest first) with km, duration, pace, HR, cadence, elevation, training effect, load, VO2max, time in HR zones

garmin_get_activity

One activity in detail, optionally with the structured workout it followed

garmin_daily_health

One day: summary, sleep, heart rate, HRV, SpO2, fitness age

garmin_health_trend

A metric over a date range: daily summaries, sleep, HRV, body battery, steps, stress, weight

garmin_profile_and_zones

Profile settings and heart-rate zones

garmin_raw_get

Any other read-only GET path of the Personal API (e.g. VO2max history)

What you need

  • A Garmin account with a device syncing to Garmin Connect

  • A free Cloudflare account

  • A Claude account that supports custom connectors

  • Node.js 20 or newer, only for option B below

1. Create your Garmin Personal API key

  1. Sign in to Garmin Connect Web and open the Personal API Key page (Garmin's guide).

  2. Select Create Key, accept the terms and choose an expiration (30 days to 1 year).

  3. Copy the key now, because Garmin shows it only once. Treat it like a password.

Also pick a long random password (20+ characters) for the connector. A password manager is the easiest way to generate one.

2. Deploy

Option A: Deploy button

Deploy to Cloudflare

  1. Sign in to Cloudflare. The page creates a copy of this repository in your GitHub account and sets up the Worker.

  2. When asked for the secrets, paste your GARMIN_API_KEY and your ACCESS_PASSWORD.

  3. If you are asked about a KV namespace, let Cloudflare create a new one.

  4. When it finishes, write down your Worker URL (https://garmin-mcp.<your-subdomain>.workers.dev).

Option B: Command line

git clone https://github.com/YOUR-USER/garmin-mcp.git
cd garmin-mcp
npm install
npx wrangler login                       # opens the browser: sign in to Cloudflare and allow
npx wrangler deploy                      # creates the Worker and its KV namespace; note the *.workers.dev URL
npx wrangler secret put GARMIN_API_KEY   # paste your Garmin key, press Enter
npx wrangler secret put ACCESS_PASSWORD  # type your connector password, press Enter

On the first deploy, Wrangler may ask you to choose a workers.dev subdomain. Any name works.

Open your Worker URL in a browser. If you see "Server attivo", it is running.

3. Connect it to Claude

  1. In Claude, open Settings → Connectors → Add custom connector.

  2. Name: Garmin. URL: https://garmin-mcp.<your-subdomain>.workers.dev/mcp (don't forget /mcp).

  3. Select Connect. Your server's page opens: type your ACCESS_PASSWORD and select Consenti (Allow).

Then try asking: "Summarise my training over the last two weeks" or "How did I sleep last night?"

How it works

Claude ──► /mcp ──► OAuth check ──► MCP tools ──► Garmin Personal API
  • src/index.ts is the entry point. It handles the OAuth flow and the password-protected consent page, then forwards authorised requests to the MCP server (stateless Streamable HTTP).

  • src/tools.ts holds the MCP tools. Parameters are defined with Zod, and activities are summarised into readable units (km, min/km, minutes).

  • src/garmin.ts is the Garmin client. It exchanges your API key for a 24-hour token and caches it in KV.

The KV namespace holds only OAuth clients, grants and tokens, plus the cached Garmin token. No health data is stored.

Security notes

  • The password is the only gate. Use a long random one. Wrong attempts are limited to 10 per hour.

  • Changing the password does not disconnect clients that are already connected. To revoke every connection:

    1. Delete all entries in the Worker's KV namespace (Cloudflare dashboard → Storage & Databases → KV).

    2. Set a new password with npx wrangler secret put ACCESS_PASSWORD.

    3. Reconnect Claude.

  • The tools are read-only, and the Personal API cannot write to your Garmin account anyway.

  • Keep dependencies up to date: run npm audit, then npm update, then npx wrangler deploy.

  • Never commit secrets. Use npx wrangler secret put. For local testing, copy .dev.vars.example to .dev.vars, which is git-ignored.

Maintenance

  • Your Garmin key expires (one year at most). Create a new one and run npx wrangler secret put GARMIN_API_KEY.

  • To remove everything, run npx wrangler delete and delete the key in Garmin Connect.

Troubleshooting

Message

Fix

"Garmin rejected the Personal API key"

The key expired, was deleted or was mistyped. Create a new one and update GARMIN_API_KEY.

"Garmin is rate limiting requests"

Wait a minute and try again.

"Password sbagliata" / "Troppi tentativi"

Wrong password. After 10 failures, wait one hour.

Claude cannot connect

Check that the URL ends with /mcp and that the Worker page shows "Server attivo".

Limits

On the free Workers plan, requests and CPU time per day are limited across your account. For personal use with Claude this is normally more than enough.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude to access and query your Garmin Connect data, including sleep, activities, training load, and health metrics, through a set of read-only MCP tools.
      28
      161 PyPI
      7
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables Claude to access and query your Garmin Connect data—sleep, training, heart rate, and more—through a suite of read-only tools, with an optional write path for creating strength workouts.
      63
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude to read and review your own Garmin training and recovery data through Garmin's official Connect Personal API, with tools for activities, daily summaries, sleep, HRV, and period analytics.
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables Claude to answer questions about your own Garmin Connect data — sleep, steps, heart rate, HRV, Body Battery, weight, and workouts including strength sets — by exposing read-only tools backed by Garmin's official Personal API. Access is locked behind GitHub OAuth and responses are stripped of names, photos, and GPS coordinates to keep the data private.
      MIT