Purpose
garmin-connect-api is used to read and write personal data in Garmin Connect from MCP clients (for example Claude), Python code, or a local HTTP API. The project explicitly states that it is an unofficial tool, is not affiliated with Garmin, and is not endorsed by Garmin. Because Garmin does not offer a public API for individuals, the project uses the same private endpoints as the Garmin Connect website through python-garminconnect.
Main capabilities
Version v0.3 provides 38 tools, each verified against a real account and labeled as read-only (24), create (8), or delete/overwrite (6). Reading supports: strength training activities with per-set details, laps and pool swimming lengths, daily health data, trends spanning up to two years, and named personal records. Writing supports: strength, running, cycling, and swimming training plans, completed strength training sessions, set corrections, and weigh-in records with body composition.
Four of the tools are designed specifically for models: garmin_status checks login status without calling Garmin; find_exercise looks up Garmin's name for a given weightlifting movement; recent_strength_sessions and week_summary answer common questions in a single call.
Recording completed workouts is a write capability not offered by Garmin's official developer program. Sessions are encoded as FIT activity files with set messages and uploaded, then appear in Garmin Connect as strength training activities with individual exercises. Body composition data from smart scales (fat, water, skeletal muscle, bone, BMI, basal metabolic rate, visceral fat) is written as a FIT weight scale file, while ordinary weigh-ins contain only weight.
Usage
Requires uv and Python 3.12 or later. First, perform a one-time login in the terminal; this is the only place where a password is required. It will ask for your Garmin email, password, and multi-factor verification code, then store the token in ~/.garmin-api/default, readable only by the current user. After that, add the server to your MCP client, for example by configuring it in Claude Desktop's claude_desktop_config.json. The configuration uses @latest lets uvx check for new versions on every launch.
It can also be used from the command line: uvx --from garmin-connect-api garmin ..., or installed with uv tool install garmin-connect-api. garmin serve runs the same API at 127.0.0.1:8765 and provides interactive documentation at /docs; the MCP tools are generated from these routes. Because the service can write to the account, it rejects write requests from browser web pages and requests from any non-localhost hostname, to defend against DNS rebinding. Binding outside localhost requires GARMIN_API_KEY, and the hostname used by the client must be listed in GARMIN_API_HOSTS. garmin mcp --http serves the MCP tools over HTTP under the same protections. The Dockerfile can build the MCP server from a code checkout; tokens are located at /tokens inside the container, and it is recommended to mount an existing directory and run as your own user.
Use cases
Suitable for individual users who want to query their personal Garmin data in natural language, analyze sleep, swimming pace, resting heart rate trends, view set-by-set details of strength training and correct set counts, or schedule training plans such as swimming. Also suitable for developers integrating Garmin data via Python or a local HTTP API.
Limitations and caveats
Private endpoints may change at any time, and this usage is not endorsed by Garmin's terms; it should only be used against your own account and your own data. Garmin deploys Cloudflare and per-account rate limiting before login; consecutive failed logins may lock the account for a day or longer. The project does not retry logins and stops all call paths when it encounters rate limiting. Recorded activities may be shared automatically; if the account is connected to apps such as Strava, uploaded sessions may also be published there, and deleting from Garmin will not delete them there. Exercise names must use Garmin's own naming (e.g. BENCH_PRESS / BARBELL_BENCH_PRESS); except for raw workout DTOs, every write is first checked against the catalog and suggests similar names. Correcting an already recorded session should edit its set counts; re-recording with modified set counts creates a second activity, and an identical session will be reportedas a duplicate. Sessions and body composition readings require a timezone offset, otherwise they will be rejected. The project includes 487 offline tests covering models, FIT encoding/decoding, the exercise catalog, HTTP routes, and MCP tool output; tests against a real account require explicit opt-in, and tests that create data require a second opt-in. The project is MIT licensed.