garmin-mcp
Provides tools for interacting with a Garmin Connect account, including reading daily health metrics, sleep, HRV, body battery, stress, heart rate, body composition, training readiness/status, race predictions, personal records, activities, and workouts. With writes enabled, it can also create and schedule workouts, unschedule or delete workouts, update activities, and add weigh-ins.
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-mcphow did I sleep last night?"
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-mcp
An MCP server that connects Claude to your Garmin Connect account. Ask Claude things like "how did I sleep this week?", "am I recovered enough for intervals today?" or "put a 6x800 session on my calendar for Thursday" and it reads (and, if you allow it, writes) your Garmin data.
It uses the unofficial Garmin Connect API via
python-garminconnect, for your
own account only. Garmin's official developer APIs require business approval; all
Garmin calls live in garmin_client.py so that route can be added later.
Tools
Area | Tools |
Profile |
|
Daily health |
|
Training |
|
Workouts |
|
Writes (off unless |
|
Prompts |
|
Responses are trimmed summaries; every read tool accepts raw=true for Garmin's full JSON.
Related MCP server: garmin-mcp
1. Log in to Garmin once (on your own computer)
Your password never leaves your machine and is never stored. The login script prints a token that the server uses instead.
pipx install git+https://github.com/alyssindewonderland/garmin_mcp # or: pip install -e .
garmin-mcp-login # asks for email, password and MFA code
garmin-mcp-login --save ~/.garmin-tokens # also keep a copy for local useThe last line it prints is your GARMIN_TOKENS value. Treat it like a password: it
grants access to your Garmin account. The server refreshes it automatically and keeps
the refreshed copy in GARMIN_TOKEN_DIR; if it ever stops working, run the script again.
2a. Use it locally (Claude Desktop / Claude Code)
Claude Code:
claude mcp add garmin -e GARMIN_TOKEN_DIR=$HOME/.garmin-tokens -- garmin-mcpClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"garmin": {
"command": "garmin-mcp",
"env": { "GARMIN_TOKEN_DIR": "/Users/you/.garmin-tokens" }
}
}
}2b. Deploy it so claude.ai (web, mobile) can use it
The server runs streamable HTTP at /mcp, protected by a random secret
(MCP_AUTH_SECRET). Clients either call https://<host>/mcp/<secret> or send
Authorization: Bearer <secret>. Everything else gets a 404.
Vercel (recommended, free Hobby plan)
In Vercel: Add New → Project, import this GitHub repo, keep the defaults, and deploy.
In the project: Storage → Create Database → Upstash for Redis (free tier) and connect it to the project. This adds
KV_REST_API_URLandKV_REST_API_TOKEN, where the server keeps refreshed Garmin tokens (Garmin rotates them, and Vercel has no disk).In Settings → Environment Variables add:
GARMIN_TOKENS: the output ofgarmin-mcp-loginMCP_AUTH_SECRET: a random string of 32+ characters (python3 -c 'import secrets; print(secrets.token_urlsafe(32))')optionally
GARMIN_ALLOW_WRITES=true
Redeploy (Deployments → ⋯ → Redeploy) so the variables take effect. Every push to
maindeploys automatically after that.
Your server is at https://<project>.vercel.app/mcp/<MCP_AUTH_SECRET>.
Fly.io
fly launch --no-deploy --copy-config # pick a unique app name, keep fly.toml
fly volumes create garmin_data --size 1
fly secrets set \
GARMIN_TOKENS='<output of garmin-mcp-login>' \
MCP_AUTH_SECRET="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')" \
MCP_ALLOWED_HOSTS=<app>.fly.dev
fly deployAnywhere else
Any Docker host with HTTPS in front works (Railway, Render, a VPS, a home server behind
Cloudflare Tunnel). Run the image with the same env vars and a persistent volume at /data:
docker build -t garmin-mcp .
docker run -d -p 8000:8000 -v garmin_data:/data \
-e GARMIN_TOKENS='...' -e MCP_AUTH_SECRET='...' garmin-mcpAdd the connector in Claude
In claude.ai: Settings → Connectors → Add custom connector, name it "Garmin", and use
https://<host>/mcp/<MCP_AUTH_SECRET> as the URL. Then enable it in a chat from the
tools menu.
For Claude Code against the deployed server:
claude mcp add --transport http garmin https://<host>/mcp --header "Authorization: Bearer <secret>"Configuration
Variable | Default | Purpose |
| Token JSON from | |
|
| Where refreshed tokens are kept (use a volume) |
| Upstash Redis for refreshed tokens instead of disk (also | |
| Fallback login; fails if your account has MFA | |
|
| Use garmin.cn |
|
| Enable write tools |
|
| Seconds to cache Garmin responses |
| Required for HTTP mode, 24+ characters | |
| Comma-separated public hostnames for Host header checks | |
|
| HTTP bind |
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest && ruff check .Tests use a fake Garmin client, so they never touch your account.
Caveats
This uses Garmin's private API. Garmin can change it at any time; pin and update
garminconnectwhen things break. Use it for your own account only.Logins from cloud data-center IPs are more likely to be challenged, which is why login happens on your computer and the server only refreshes tokens.
This server cannot be deployed
Maintenance
Related MCP Connectors
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Log meals, water, and weight to Garmin Connect from Claude or ChatGPT.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Related MCP Servers
- AlicenseBqualityAmaintenanceConnects Claude Desktop to Garmin Connect, enabling natural language queries of fitness activity data, health metrics, sleep analysis, workout management, and device information with 94 available tools.1101MIT
- AlicenseAqualityBmaintenanceEnables 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.28214 PyPI4MIT
- FlicenseNot gradedqualityDmaintenanceConnects Garmin watch data to Claude Desktop, allowing users to ask natural language questions about their health and activity data from Garmin Connect.-
- FlicenseAqualityBmaintenanceExposes your Garmin Connect data (activities, sleep, recovery, training status) to Claude in read-only mode.7-