Purpose
garmin-mcp is a local MCP (Model Context Protocol) server for personal Garmin Connect accounts. It lets MCP-capable clients such as Claude read the user's running records, splits, heart rate zones, and daily health metrics, and unlike read-only Garmin integrations, it can also build structured training workouts and schedule them on the calendar, so the answer to "what should I run on Thursday" lands directly on the watch instead of staying only in the chat history.
Key capabilities
- Read Garmin Connect data: runs, splits, heart rate zones, daily health metrics.
- Create structured training workouts:
create_workoutaccepts an ordered list of steps, each step containing a type (warmup、interval、recovery、rest、cooldownorrepeat), and one ofduration_secondsordistance_meters, with an optional target of pace (minutes per kilometer, e.g. "4:05" or a range ["4:00","4:10"]) or heart rate (e.g. [150, 165]). A single pace is widened by 5 seconds per kilometer on each side, because Garmin alerts on ranges and an exact target would beep continuously. Nested repeat groups are not supported. - Workout management: creating a workout only saves it; it must be scheduled to a date to reach the watch; scheduling, unscheduling, and deleting workouts are supported.
- Date formats accept
YYYY-MM-DD、today、yesterday、tomorrow, or a signed offset such as-7、+3.
Usage
Local run: on macOS 10.15 (Catalina) or later with Claude Desktop installed, a single bootstrap command fetches the code into ~/garmin-mcp, installs a modern Python via uv , logs in to Garmin, and registers the server with Claude Desktop. Then fully quit and reopen Claude Desktop. Manual registration is also possible: copy .mcp.json.example, fill in the absolute path, and have the client point to python -m garmin_mcpover stdio.
Other MCP clients (Claude Code, Cursor, VS Code, Zed, Windsurf) work as well, because it speaks MCP over stdio. ChatGPT cannot run the local version, because its connectors require a public HTTPS URL and execute on OpenAI servers.
Security and limitations
- Reads are unrestricted; writes are limited to the workout library: create, schedule, unschedule, delete workouts. Training history is never touched, and no tool can delete or edit recorded activities.
delete_workouthas a two-step confirmation gate: the first call only reads back the workout and returns its name, and the second call must pass that name as confirmation to delete.- The password is read from an environment variable and sent directly to Garmin without being written to disk; only the session token issued by Garmin is cached to
~/.garmin-mcp/tokens.json(0600 permissions, in a 0700 directory). No tool returns the password or token, andget_connection_statusonly reports the masked address and the cache age and permissions. Logs go to stderr and do not pollute the MCP stream on stdout. - After the first login, the cached token is used; for unattended re-authentication, set
GARMIN_EMAILandGARMIN_PASSWORD. - Common issues: Garmin rate-limits logins by IP (429), unrelated to the password; office networks, campus networks, and VPNs are most likely to trigger it, so try logging in once via a mobile hotspot first; multi-factor authentication requires running the login script once in a terminal; Claude Desktop loads its configuration at startup, so changes made while it is running are lost and you need to fully quit and reinstall.
- Installation requires macOS 10.15 or later, determined by the Python interpreter; the installer uses
--only-binary :all:to fail fast. - Missing sleep data is usually because the device was not worn all night or has not synced.
Use cases
Suited to runners who want an AI assistant to read their personal Garmin training and health data and to generate and schedule training sessions based on that data. The project also includes skills/ training methodologies (the first being a Pete Pfitzinger-style half-marathon skill), as well as stdio tests against stub accounts, end-to-end validation with real accounts, and HTTP transport tests.
Limitations
The project is not affiliated with Garmin and uses the private API used by the Garmin Connect website (via garminconnect), because Garmin has not released a consumer OAuth API; this API may change at any time. The project is under the MIT license.