<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bruno Santos on Medium]]></title>
        <description><![CDATA[Stories by Bruno Santos on Medium]]></description>
        <link>https://medium.com/@bsan?source=rss-ecb177aa7b90------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1h99gajMAug1dKCSuAx2XQ.jpeg</url>
            <title>Stories by Bruno Santos on Medium</title>
            <link>https://medium.com/@bsan?source=rss-ecb177aa7b90------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:57:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bsan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting that Half Marathon PB with an AI Coach]]></title>
            <link>https://medium.com/@bsan/getting-that-half-marathon-pb-with-an-ai-coach-9f9068b14faf?source=rss-ecb177aa7b90------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f9068b14faf</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[running]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[garmin]]></category>
            <dc:creator><![CDATA[Bruno Santos]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 16:19:21 GMT</pubDate>
            <atom:updated>2026-03-25T15:35:55.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNQmiPYSXQD2z2T3yJqd-w.png" /></figure><p>It starts with a business use case. I’m a frequent runner but every year I make the same mistake. I have booked a place for the upcoming <a href="https://www.hackneymoves.com/half-marathon">Hackney Half Marathon</a> in May but barely ran past 5K. How can I improve my performance to keep that PB dream alive?<br>There are a few services out there that can build you a workout plan but that got me thinking: With all my Garmin data and all other publicly available data out there how hard could this be? So I decided to build my own AI Assisted running coach and in the next paragraphs I’m going to show you how you can do it too. (can’t wait?<a href="https://medium.com/@bsan/getting-that-half-marathon-pb-with-an-ai-coach-9f9068b14faf#8ea5"> jump to demo</a>).</p><p>On one hand I have all these years of running data locked away on my Garmin account. On another hand I have the latest AI Models available to me. <strong>But the link between my garmin data and the intelligence is not there</strong>. I can ask Claude or ChatGPT for guidance and they will return decent running plans based on <em>their </em>training data (and loads of <a href="https://www.runnersworld.com/uk/training/half-marathon/a764179/half-marathon-training-plans/">runner’s world articles</a>) to me but I’ve been there and it didn’t quite work for me. I don’t want to have to adapt to a standard training plan. What I want is MY plan. What I need is a personalized plan.</p><p>Rather than getting a generic 12 weeks training plan to get to a target Pace at race day I want a plan that is tailored to my current running form and adapts to any changes along the way.</p><p>Something that can answer the question:</p><blockquote>“Given my last 2 months of training, what do I need to do to get to my PB on race day?”</blockquote><p>The following diagram shows the state that I was in. I have a battered Garmin watch, years of running data in Garmin’s servers and the Claude Desktop App with no link to my running data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s06iMNhk1zU4RZxb-1C5Tw.png" /><figcaption>Disconnected AI APP and Garmin Data</figcaption></figure><p>What I need to do is marry the LLM intelligence with my activity data and the answer is a Model Context Protocol (MCP) server. A <a href="https://modelcontextprotocol.io/docs/getting-started/intro">MCP is an open-source standard</a> that helps the AI App link with an external system to get access to data or execute an action via tools.</p><p>Think of it as that tool that your travel agent uses to look for the best flights and hotels and that does the bookings. The travel agent acts like an AI agent that understands your questions and what data it needs and which actions need doing and the MCP acts like the search and/or booking tool that translates the queries to the other parties helping to navigate the complexity of the multiple systems out there.</p><p>So when I ask:</p><blockquote>“Given my last 2 months of training, what do I need to do to get to my PB on race day for the Hackney Half Marathon?”</blockquote><p>The AI App gets the list of available tools and finds the one that can answer “What are the last 2 months of activity” and calls the MCP tool to get that data. The AI App then uses that data in it’s context and asks the Model to answer “Given this context running data, what do I need to do to get to my PB on race day for the Hackney Half Marathon?” and builds the workout plan for us.</p><p>The following diagram shows how the AI App interacts with the MCP to get data and execute scheduling actions. Marrying the LLM intelligence with my activity data, powered by the Garmin Workouts MCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQu1NWeAxG7DsDzwuYz5GA.png" /><figcaption>LLM intelligence with my activity data powered by Garmin Workouts MCP</figcaption></figure><h3>Running the AI Coach</h3><p>To test the setup and to prove that the AI App had access to my Garmin Connect Data I started by asking a simple question:</p><blockquote>“what was my last Run?”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mU-1Q6U6jzAdAJka54l-ew.gif" /></figure><blockquote>Here be dragons 🐉<em>: You are given the option to “Always Allow” or “Allow Once”. It’s advisable to not “always allow” so that you can check before the AI App runs the tool. Enabling a “</em><strong><em>human in the loop” check</em></strong><em>.</em></blockquote><p>Right, we’re in! But this only uses the AI App as an interface to get activity data and isn’t doing much for me. Where is my AI Coach?</p><p>To get a workout plan I need to tell the AI App to get my running data and then do the analysis on it. So I asked:</p><blockquote>Given my last 2 months of training, what do I need to do to get to my PB on race day for the Hackney Half Marathon?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d4H5YFN0Wem2Ux55MDOjyQ.gif" /></figure><blockquote>Note: The results are not deterministic. Meaning that there isn’t a guarantee that you will have the same answer from the same exact question.</blockquote><p>So far so good. The AI App did some analysis of my previous runs and returned some decent analysis of my form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-1zGw0vZrTAixNV2abR6Q.png" /></figure><p>It gave me insights on my training gaps:</p><blockquote><strong>The biggest issue: your long runs.</strong> Your longest run in the last 2 months is just 8.7km. To race 21.1km at pace, you need to get to at least 18–20km in training. The good news is you have 8 weeks, which is just enough time to build properly without injury — but you need to start this weekend.</blockquote><p>And built me a personalised 8 week training plan:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cweKgYkT8yhzyKqeJqO_g.png" /><figcaption>AI Coach generated workout plan</figcaption></figure><p>And even recommendations for race day:</p><blockquote>One final tip for the Hackney course: the atmosphere and live music on the route makes it very easy to go out too fast. Stick to 5:05/km for the first 5km even if it feels slow — you’ll thank yourself from km 15 onwards.</blockquote><p>So that’s it! I’m ready to get that PB…. not so fast. I’ve got a training plan like I’ve had so many that didn’t work. What I need is something to give me that nudge that it’s time to train. I need that training plan to show on my Garmin watch so that I don’t have to remember to look for the training plan and memorise the steps (10min warmup + 4x200m strides + 10min cooldown). Moreover, having that plan on my watch will during the run tell me if I’m going too fast/slow or in the wrong effort zone or when to do strides or when to do race pace. It’s all on my watch!</p><p>The next step is to create these workouts on my Garmin account and to publish them to my training calendar. I can do this by asking the AI App to create the workouts and schedule them on my Garmin account because the MCP tool does the rest. But I don’t want to have to remember these steps and the prompts that were needed for the AI App to do what I wanted in the first place. Nor do I want to submit multiple instructions and accept the commands the agent is about to run. To make this more <em>agentic</em> I need to write one clear instruction with all that I want the AI App to do and I can do this with the following prompt:</p><pre>Build me a workout plan and schedule it to my garmin calendar by following these steps:<br>1- find when the next hackney half marathon is<br>2- Get my last 2 months of run activities from Garmin<br>3- Based on those activities, create a training plan for the Hackney Half Marathon build me a workout plan so that I can run the next hackney half in under 1h45.<br>4- Schedule the workouts on the appropriate dates.</pre><p>After all the work is completed when I login to my Garmin Connect account I can see that the workouts were created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fptmTYboc45B61Rh1fnjoA.png" /><figcaption>Garmin Connect Workouts</figcaption></figure><p>And scheduled onto my calendar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gtM47_RpxPgthdlKOe6Dew.png" /><figcaption>Garmin Connect Calendar</figcaption></figure><p>And I’m ready to start training!</p><h3>How to run the AI Coach for yourself</h3><blockquote>Here be dragons 🐉: data privacy risk. Use at your own risk and be mindful of the data that you want to share with the LLM. If you are <a href="https://www.theguardian.com/world/2018/jan/28/fitness-tracking-app-gives-away-location-of-secret-us-army-bases">on a tour in Afghanistan</a> or <a href="https://www.bbc.co.uk/news/articles/cd9vdel17wqo">on an aircraft carrier on a secret mission</a> probably leave this one out.</blockquote><p>You only need a free Claude (or ChatGPT or Copilot) account to do this as long as you don’t reach the token limit.</p><p>To get your AI Coach running for you it first needs to:</p><p>Note: You can follow the latest setup guide <a href="https://github.com/brunosantos/garmin-workouts-mcp/blob/main/README.md#setup">here</a>.</p><h4>Setup the Prerequisites</h4><p>The Garmin Workouts MCP runs on Python so you will need to install Python v3.12+ and uv helps you with that. To do this follow these guides:<br><strong>0.1</strong> — Install uv: <a href="https://docs.astral.sh/uv/getting-started/installation/">https://docs.astral.sh/uv/getting-started/installation/</a></p><p><strong>0.2</strong> — Install Python using uv: <a href="https://docs.astral.sh/uv/guides/install-python/#viewing-python-installations">https://docs.astral.sh/uv/guides/install-python/#viewing-python-installations</a></p><p>uv is a python package manager and project manager that helps you create reproducible virtual environments eliminating the “it works on my machine” headache.</p><h4>Step 1 — Authenticate with to your Garmin Connect account</h4><p><strong>1.1 </strong>— Install and run authentication tool</p><p>Install and run authentication tool by running the following command in the terminal:</p><pre>uvx - python 3.12 - from git+https://github.com/brunosantos/garmin-workouts-mcp garmin-mcp-auth</pre><p>Note: This command downloads, installs, and runs the garmin-mcp-auth tool in a temporary, isolated Python 3.12 environment.</p><p>You’ll be prompted for:</p><ul><li>Email</li><li>Password</li><li>MFA code (if enabled on your account)</li></ul><p>The garmin-mcp-auth tool will authenticate your account, get OAuth access tokens and store them in a hidden folder on your machine.</p><h4>Step 2 — Configure the AI App</h4><p>Configure the Claude Desktop App (or for VS code with Copilot <a href="https://github.com/brunosantos/garmin-workouts-mcp?tab=readme-ov-file#usage-with-vs-code">follow here</a>) to install the Garmin Workouts MCP.</p><p>Go to the Claude Desktop &gt; Settings &gt; Developer &gt; Edit Config.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*bvVlt7LOT3JNGcKMkY5-_A.png" /></figure><p>Open the claude_desktop_config.json file and add the garmin-workouts configuration to your Claude Desktop MCP settings:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;garmin-workouts&quot;: {<br>      &quot;command&quot;: &quot;uvx&quot;,<br>      &quot;args&quot;: [<br>        &quot;--python&quot;,<br>        &quot;3.12&quot;,<br>        &quot;--from&quot;,<br>        &quot;git+https://github.com/brunosantos/garmin-workouts-mcp&quot;,<br>        &quot;garmin-workouts-mcp&quot;<br>      ]<br>    }<br>  }<br>}</pre><p>Alternatively you can also find the configuration files on these paths:</p><pre>macOS: ~/Library/Application Support/Claude/claude_desktop_config.json<br>Windows: %APPDATA%\Claude\claude_desktop_config.json</pre><h4>Step 3 — restart the AI App</h4><p>This is so that the AI App pulls and runs the latest configuration with the new MCP. You should now see the Garmin Workouts MCP installed and running when you go to +&gt;Connectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*QOls54Rx97HKiz4rMFqzYQ.png" /></figure><h4>Step 4 — Create your workout Plan</h4><p>You can try many different prompts like these:</p><ul><li>“What are some workout templates I can use to improve my 5k time?”</li><li>“Based on my recent activities, what workouts should I do this week to prepare for a half marathon?”</li><li>“Create a workout plan for the next Hackney Half Marathon based on my recent activities, with a goal to run it in under 1h45.”</li><li>“Upload a structured 45-minute threshold run workout and schedule it for next Tuesday”</li><li>“Look at my last 4 weeks of running and tell me if I’m overtraining or ready to increase mileage”</li><li>“How much time did I spend in each heart rate zone during my run last Sunday?”</li><li>“Compare my pace and HR across my last 5 runs — am I getting fitter?”</li><li>“I have a race in 6 weeks — build me a progressive weekly workout schedule and add each session to my calendar”</li></ul><p>You can find more <a href="https://github.com/brunosantos/garmin-workouts-mcp?tab=readme-ov-file#ai-coach-assisted-queries">examples here</a> or try your own!</p><h3>What’s Next:</h3><p>This is a high level post about how the garmin workouts mcp can work for you. On my next post we’ll dive into the technical details of how all this works but after all this it’s time for me to put on those stinky trainers. It’s long run day…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f9068b14faf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>