<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shalom Yerushalmy</title>
    <description>The latest articles on DEV Community by Shalom Yerushalmy (@yershalom).</description>
    <link>https://dev.to/yershalom</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F213862%2F68ca2563-5c6c-4e7d-ae61-18133d87376e.jpg</url>
      <title>DEV Community: Shalom Yerushalmy</title>
      <link>https://dev.to/yershalom</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yershalom"/>
    <language>en</language>
    <item>
      <title>Talk to your Garmin data in Claude, for free</title>
      <dc:creator>Shalom Yerushalmy</dc:creator>
      <pubDate>Wed, 18 Nov 2026 13:25:33 +0000</pubDate>
      <link>https://dev.to/yershalom/talk-to-your-garmin-data-in-claude-for-free-1928</link>
      <guid>https://dev.to/yershalom/talk-to-your-garmin-data-in-claude-for-free-1928</guid>
      <description>&lt;p&gt;I wanted to get healthier, and I wanted a coach I could ask "how did this week actually go?" without scrolling through five screens of the Garmin app. So I connected my watch to Claude. Here's what I built, what it taught me about my own habits, and how you can set up your own copy in about 15 minutes for $0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I wanted
&lt;/h2&gt;

&lt;p&gt;My plan was simple: two long walks and two gym sessions a week, more sleep, and steady progress instead of big heroic weeks followed by nothing. The data was already on my wrist. What I didn't have was an easy way to &lt;em&gt;ask questions&lt;/em&gt; of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did my walks actually stay in the heart-rate zone I was aiming for?&lt;/li&gt;
&lt;li&gt;Am I sleeping as badly as I feel, or is it just one night?&lt;/li&gt;
&lt;li&gt;Should I push today, or is my body still recovering?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude can answer those questions in plain language, if it can read the data. That's what an &lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; is for: a small service that gives Claude a set of tools, like "get my sleep for these dates", that it can call when you ask something.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I got out of it
&lt;/h2&gt;

&lt;p&gt;A week in, these were the useful bits. None of them needed a dashboard, only a question:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A weekly check-in that takes one sentence.&lt;/strong&gt; "Check my week against my plan" gets back what I did, what I missed, and how to fit the rest in, without me counting anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest pace feedback.&lt;/strong&gt; Some of my walks felt hard but sat below my target heart-rate zone. Now I know to walk a bit faster, not longer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My sleep data was there all along.&lt;/strong&gt; Another app I use showed big gaps in my nights. Garmin had every night. The gaps were a sync problem, not my sleep, and I'd never have spotted that by looking at one app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowing when to back off.&lt;/strong&gt; After a long flight, Body Battery and resting heart rate showed I hadn't recovered. Claude suggested a lighter gym session instead of skipping it or overdoing it. That's the kind of call I usually get wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gym sessions that count.&lt;/strong&gt; When I start a strength workout on the watch, the sets and reps come through too, so progress is visible from week to week.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude ──OAuth token──▶ Your Worker (/mcp, Cloudflare) ──Bearer token──▶ Garmin Personal API
  (signs in once with           │
   GitHub, only you)            └─ KV: grants + cached Garmin token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Claude never sees your Garmin key. The Worker holds it and only answers Claude after you've signed in.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Garmin's Personal API&lt;/strong&gt; is official and read-only. You create a personal API key in Garmin Connect, and the server swaps it for an access token that lasts 24 hours. No scraping, and no sharing your Garmin password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Cloudflare Worker&lt;/strong&gt; keeps the key as a secret, caches the token in KV, refreshes it before it expires, and exposes about 20 read-only tools: daily summaries, sleep, heart rate, HRV, Body Battery, stress, weight, VO2 Max and activities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth with GitHub&lt;/strong&gt; locks the &lt;code&gt;/mcp&lt;/code&gt; endpoint. When Claude connects, you sign in with GitHub, and only the GitHub username you configured gets through.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy scrubbing.&lt;/strong&gt; Garmin's activity data includes your name, profile photo and GPS start point, which is often your front door. The server removes those before anything reaches Claude.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it costs: nothing
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Garmin Connect Personal API&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloudflare Workers, Free plan (100,000 requests a day)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workers KV, Free plan (100,000 reads, 1,000 writes a day)&lt;/td&gt;
&lt;td&gt;Free. The server writes about once a day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub OAuth app&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude&lt;/td&gt;
&lt;td&gt;Works on the Free plan, which allows one custom connector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom domain&lt;/td&gt;
&lt;td&gt;Optional, about $10 a year. The free &lt;code&gt;workers.dev&lt;/code&gt; address is fine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One person asking a few questions a day uses a tiny fraction of those limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build your own
&lt;/h2&gt;

&lt;p&gt;Everything is in a public template. You don't need to write any code, and every step happens in a browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/yershalom/claude-garmin-mcp" rel="noopener noreferrer"&gt;Get the template on GitHub →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Create a Garmin personal API key
&lt;/h3&gt;

&lt;p&gt;Open the &lt;a href="https://connect.garmin.com/app/settings/personalApiToken" rel="noopener noreferrer"&gt;Personal API Key page&lt;/a&gt; in Garmin Connect (sign in on the web if asked), then &lt;strong&gt;Create Key&lt;/strong&gt; → accept the terms → choose an expiry → &lt;strong&gt;Create&lt;/strong&gt;. Copy it somewhere safe: Garmin only shows it once. Garmin's own walkthrough is in the &lt;a href="https://developer.garmin.com/gc-developer-program/personal/personal-api/" rel="noopener noreferrer"&gt;Personal API docs&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Deploy the Worker
&lt;/h3&gt;

&lt;p&gt;Click &lt;strong&gt;Deploy to Cloudflare&lt;/strong&gt; in the template's README. It forks the repo into your GitHub account, creates the KV storage and deploys. Note your Worker's address, something like &lt;code&gt;https://garmin-mcp.&amp;lt;you&amp;gt;.workers.dev&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Tell it who you are
&lt;/h3&gt;

&lt;p&gt;In your fork, edit &lt;code&gt;wrangler.jsonc&lt;/code&gt;. Set &lt;code&gt;ALLOWED_GITHUB_LOGIN&lt;/code&gt; to your GitHub username and &lt;code&gt;PUBLIC_URL&lt;/code&gt; to the Worker address, then commit. Cloudflare redeploys automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Make a GitHub OAuth app
&lt;/h3&gt;

&lt;p&gt;GitHub → Settings → Developer settings → OAuth Apps → &lt;strong&gt;New OAuth App&lt;/strong&gt;. Use your Worker address as the homepage and &lt;code&gt;&amp;lt;worker address&amp;gt;/callback&lt;/code&gt; as the callback URL. Leave wildcard matching and device flow off. Copy the Client ID and generate a Client secret.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Add three secrets
&lt;/h3&gt;

&lt;p&gt;Cloudflare → your Worker → Settings → &lt;strong&gt;Variables and Secrets&lt;/strong&gt;. Add these, each as type &lt;strong&gt;Secret&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GARMIN_API_KEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;your key from step 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GITHUB_CLIENT_ID&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;from step 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GITHUB_CLIENT_SECRET&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;from step 4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  6. Connect Claude
&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href="https://claude.ai/customize/connectors" rel="noopener noreferrer"&gt;claude.ai → Customize → Connectors&lt;/a&gt; → &lt;strong&gt;Add custom connector&lt;/strong&gt;, and paste &lt;code&gt;&amp;lt;worker address&amp;gt;/mcp&lt;/code&gt;. Click &lt;strong&gt;Connect&lt;/strong&gt;, approve, and sign in with GitHub. Start a new chat and try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Summarise my last 7 days from Garmin: sleep, steps, workouts and recovery.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Check the lock.&lt;/strong&gt; A request without a token must be refused. This should print &lt;code&gt;401&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; -X POST https://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;worker&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Want to hack on it?
&lt;/h2&gt;

&lt;p&gt;The repo includes a &lt;code&gt;.dev.vars.example&lt;/code&gt;, so local setup takes three commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp .dev.vars.example .dev.vars   &lt;span class="c"&gt;# then fill it in&lt;/span&gt;
npm run check-garmin             &lt;span class="c"&gt;# tests your Garmin key&lt;/span&gt;
npm run dev                      &lt;span class="c"&gt;# http://localhost:8787&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fill &lt;code&gt;.dev.vars&lt;/code&gt; with your Garmin key and a second GitHub OAuth app whose callback is &lt;code&gt;http://localhost:8787/callback&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Point the &lt;a href="https://github.com/modelcontextprotocol/inspector" rel="noopener noreferrer"&gt;MCP Inspector&lt;/a&gt; at &lt;code&gt;http://localhost:8787/mcp&lt;/code&gt; to try the tools. Claude connects from the cloud and can't reach &lt;code&gt;localhost&lt;/code&gt;, so deploy before connecting it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I learned along the way
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lock first, then add data.&lt;/strong&gt; The endpoint requires sign-in from the very first deploy, and the Garmin key goes in last. If a step goes wrong, there's no window where your health data is public.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use an exact callback URL.&lt;/strong&gt; Leave GitHub's wildcard redirect matching off. It's a common way to leak OAuth codes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask questions, not for raw data.&lt;/strong&gt; "Compare this week's sleep with last week's" works far better than "give me my sleep data". Claude picks the right tools and date ranges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start a strength workout on the watch.&lt;/strong&gt; Otherwise gym sessions are invisible to your data, and so to your check-ins.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;The endpoint list and auth flow come from Garmin's official &lt;a href="https://github.com/garmin/connect-personal-api-python" rel="noopener noreferrer"&gt;connect-personal-api-python&lt;/a&gt; client and the &lt;a href="https://developer.garmin.com/gc-developer-program/personal/personal-api/" rel="noopener noreferrer"&gt;Personal API docs&lt;/a&gt;. The server is built on Cloudflare's &lt;a href="https://github.com/cloudflare/workers-oauth-provider" rel="noopener noreferrer"&gt;workers-oauth-provider&lt;/a&gt; and the &lt;a href="https://github.com/modelcontextprotocol/typescript-sdk" rel="noopener noreferrer"&gt;MCP TypeScript SDK&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This isn't medical advice. Check a new training plan with your doctor, especially if you have a health condition.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://blog.yershalom.com/posts/garmin-mcp-claude/" rel="noopener noreferrer"&gt;blog.yershalom.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>claude</category>
      <category>cloudflare</category>
      <category>garmin</category>
    </item>
  </channel>
</rss>
