Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a Garmin Connect library for TypeScript, then let Claude use it

Description and use

A TypeScript client (garminconnect-js) with 200 typed methods and zero runtime dependencies, plus a hosted MCP server that lets Claude read and manage Garmin data in plain language. The workout builder handles Garmin's hostile API quirks. Everything is free and open source.

Problem

Wear a Garmin watch every day, but your training data lives in the Garmin Connect app with no public API. You want to ask an AI about your sleep, HRV, readiness, and build workouts in plain language.

Outcome

A TypeScript client (garminconnect-js) with 200 typed methods and zero runtime dependencies, plus a hosted MCP server that lets Claude read and manage Garmin data in plain language. The workout builder handles Garmin's hostile API quirks. Everything is free and open source.

Workflow

  • Install garminconnect-js via npm
  • Create a GarminClient with a FileTokenStore for credentials
  • Call login() with GARMIN_EMAIL and GARMIN_PASSWORD; handle MFA if required via resumeLogin()
  • Instantiate Garmin from the client
  • Call getSleepData(), getHrvData(), or other typed methods for sleep, HRV, stress, Body Battery, daily summaries, activities, training readiness, race predictions, workouts, gear, courses, calendar events, devices, badges, weigh-ins, women's health, golf, nutrition, and training plans
  • Use buildWorkout() fluent builder to construct workouts (e.g., 6x400 intervals at 5k pace with 2-minute jog recoveries), handling Garmin's stepOrder, pace conversion, and sport/step id requirements
  • Upload the constructed workout via uploadWorkout()

Evidence

I wear a Garmin watch every day, and for a long time my data lived in one place: the Garmin Connect app. I wanted it in my own code, and lately I wanted to ask an AI about it

Source

Garmin has no public API for personal Connect data, so I built two things: garminconnect-js, a TypeScript client for Garmin Connect with 200 typed methods and zero runtime dependencies, and a Garmin MCP server on top of it

Source

Everything is free and open source, and the home for both is garmin.ficdev.xyz

Source

claude.ai (web, Desktop and the phone apps): Settings, Connectors, Add custom connector. Paste the URL, sign in to Garmin in the window that opens (with your MFA code if you use one), and you're done

Source

The hosted server never stores your Garmin tokens. They're sealed inside the OAuth token your MCP client holds, so the server keeps no copy of them

Source

What you get: Garmin's SSO and OAuth flow handled for you, including MFA. login() doesn't block on MFA. It returns a plain-JSON state you can carry across two HTTP requests, which is what you need in a serverless Next.js route

Source

  • Record date: 2026-10-23T16:26:05.297Z