garmin-strava-mcp
Reads running, recovery and readiness data from Garmin Connect: activity lists and per-second activity streams (ground-contact time, vertical oscillation, stride length, power), activity splits, training status, race predictions, lactate threshold, personal records, sleep, HRV, body battery, training readiness, heart rate and stress — so sessions can be analysed against form and recovery.
Pulls activity data from the Strava API: activity lists, single-activity details, per-second streams, laps, athlete profile and aggregate stats, with automatic OAuth token refresh, for comparing sessions and reviewing splits.
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-strava-mcp
An MCP server and REST API that let Claude work with my own running data: Garmin Connect for running dynamics, training status, sleep, HRV and readiness, and Strava for activities, laps and streams. A small SQLite training log adds the structure a training block needs. I built it to train for a marathon with Claude as an analyst. It can pull a workout's splits and ground-contact time, compare them with my readiness and sleep, log the session, and track form trends week to week. All of that works from the Claude app on my phone, and the data stays on my own hardware.
Architecture
flowchart LR
C["Claude<br/>(web, desktop, mobile)"] -->|"MCP over HTTPS<br/>OAuth / bearer token"| T["Cloudflare Tunnel"]
X["Scripts, notebooks,<br/>other services"] -->|"REST + bearer key"| T
T --> S["garmin-strava-mcp<br/>FastAPI + FastMCP<br/>on a Raspberry Pi"]
S -->|garminconnect| G["Garmin Connect"]
S -->|"OAuth refresh"| V["Strava API"]
S --> DB[("SQLite<br/>training log")]The MCP endpoint is mounted at /tools. The same data is available as plain REST endpoints under /garmin/* and /strava/*, for scripts and dashboards.
Related MCP server: garmin-mcp-server
Tools
Source | Tools |
Garmin |
|
Strava |
|
Training log |
|
Security
Every REST route and the MCP endpoint require a bearer key, compared in constant time. The server refuses to start if the key is shorter than 20 characters.
For Claude's custom connectors there is a minimal OAuth 2.1 + PKCE flow with dynamic client registration. The authorize page asks for the API key once and issues a 30-day token. Failed attempts are rate limited per IP and logged.
DNS-rebinding protection allows only the configured public host and localhost. The REST API is rate limited per IP.
Credentials live in files outside the repo (
CREDS_DIR), and the server binds to127.0.0.1by default.
Setup
Requires Python 3.11+ and uv.
uv sync
cp .env.example .env # set API_KEY and PUBLIC_URLVariable | Required | Purpose |
| yes | Bearer key for REST and MCP (at least 20 characters) |
| for remote clients | Public HTTPS URL. Used for OAuth metadata and the allowed host. |
| no | Bind address (default |
| no | Folder holding |
| no | SQLite files. The training-log tables are created on first use from |
Credential files (never commit these):
// strava_creds.json: from your Strava API application, after one OAuth authorization
{"client_id": "...", "client_secret": "...", "access_token": "...", "refresh_token": "...", "expires_at": 0}
// garmin_creds.json
{"email": "...", "password": "..."}The Strava access token is refreshed automatically and written back to the file.
Run
set -a; source .env; set +a
uv run uvicorn server:app --host 127.0.0.1 --port 8787To use it from Claude on any device, put it behind HTTPS, for example with a Cloudflare Tunnel public hostname pointing at http://localhost:8787. Then add a custom connector in Claude (Settings → Connectors) with the URL https://<your-host>/tools, and enter your API key on the authorize page. On a Pi, run it under systemd with EnvironmentFile= pointing at your .env.
Example
Me: How did this morning's tempo run go compared with last week's?
Claude (calls
get_garmin_activities,get_garmin_activity_splitsfor both runs, andget_garmin_training_readiness): Your tempo miles averaged 7:31/mi, 6 seconds faster than last week, at the same average heart rate (158). Ground-contact time crept up from 238 to 247 ms over the last two tempo miles, which points to fatigue late in the run. Readiness was 61 after a short night, so the effort was harder than the pace alone suggests. Should I log it?Me: Yes.
Claude (calls
log_run, thenget_form_trends): Logged as week 9. Your 3-run rolling average GCT is still down 5 ms since week 6, so the form trend is still improving.
Tests
uv sync --group dev
uv run pytestThe tests cover auth on REST and MCP, the OAuth metadata, a training-log round trip (re-logging a run updates it rather than duplicating it), and Garmin login handling. A login that comes back incomplete, as can happen when the host is busy just after boot, is not cached, so the next request retries instead of failing until a restart.
License
MIT
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
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceConnects Claude to Garmin Connect data for personalized running coaching, including morning readiness checks, post-run analysis, weekly reviews, and goal tracking.-
- FlicenseNot gradedqualityBmaintenanceConnects Claude Desktop to your Garmin Connect running data stored locally in SQLite, enabling querying, syncing, and AI analysis of fitness activities.1-
- AlicenseAqualityBmaintenanceProvides Claude Code and Claude Desktop with safe, read-only access to your local Garmin training data, readiness decisions, run details, and trends so you can get coaching advice in natural language.1543 PyPI11MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to read recent activities and wellness data, then design, create, update, and delete structured workouts that sync through intervals.icu to Garmin Connect and the user's watch.MIT