I just published a Model Context Protocol (MCP) server that connects Anthropic’s Claude desktop client with the Intervals.icu API. It includes built-in tools for authentication and retrieving activities, events, and wellness data.
Feel free to give it a try and ask Claude questions about your past activities and their interval data, upcoming workouts, and past wellness data — and I’d love any feedback or suggestions!
Thanks! I just updated the readme to make instructions more clear. Let me know what use cases you come up with. I’ll post some that I found useful later.
BTW… nothing to do with your code, but i struggled to get Claude to play with uv and python (I’m on macOS)… and had to add full path on the Claude config file to make it work, so this may save some trouble for some of you… here it is the final configuration that worked for me:
Thanks, and sorry you had trouble with it. I’d be curious to know if you still have the same issues if you follow the new instructions. I’m on macOS too.
This is a cool use for it… I did a ramp test on feb 21… so i asked
from the ramp test on feb 21, what is my ftp, thr and vo2max
Edit
Based on the ramp test data from February 21, 2025, I can identify the following key metrics:
FTP (Functional Threshold Power): 242 watts
This is confirmed in your activity data and used as your FTP reference in subsequent workouts
THR (Threshold Heart Rate): 168 bpm
This is listed as your LTHR (Lactate Threshold Heart Rate) in your activity data
During the test, your heart rate reached 170 bpm during the sustained threshold effort
VO2max Power: Not directly measured in the test
Based on your peak power in the ramp test (375W) and your ability to sustain around 300W during the final minutes, your VO2max power is likely around 310-325W (approximately 115-120% of your FTP)
This would typically be the power you could sustain for a maximal 3-5 minute effort
The ramp test is primarily designed to establish your FTP rather than precisely measure VO2max. For a more accurate VO2max measurement, you would need either a specific field test (like a 5-minute all-out effort) or a laboratory test with respiratory gas analysis equipment.
The Xert “Gold Breakthrough” mentioned in your activity description indicates that this test represented a significant improvement in your performance markers according to their analytics system.
no worries… absolute first time playing with MCP, so my struggles are due to being the very first time ever i connected Claude to mcp… great work, and thanks !!!
Question: “Analyze my last 10 cycling activities and their interval data and let me know if I should decrease, keep, or increase my FTP and why.”
Answer:
I’d be happy to analyze your recent cycling activities and interval data to help determine if you should adjust your FTP (Functional Threshold Power). Let me retrieve your most recent activities and their interval data.
Now, let me look at the interval data for a few key workouts to better understand your performance. I’ll check the interval data for recent structured workouts at higher intensities.
Based on the data I’ve collected from your last 10 cycling activities and interval workouts, I can now analyze your performance to determine if you should adjust your FTP. Here’s my analysis:
Current FTP Status
Your current FTP is set at 260 watts.
Key Performance Indicators
Training Structure
You’ve completed a well-structured mix of workouts:
VO2max intervals at 110-115% FTP
Sweet Spot workouts (84-90% FTP)
Zone 2 endurance rides
Recovery rides
An outdoor ride after recovering from a shoulder injury
High-Intensity Workout Performance
Looking at your VO2max intervals (activity i70479948):
You consistently maintained 295-299 watts during 30-second intervals (113-115% of FTP)
Heart rate response was appropriate, reaching 154-169 bpm
Cadence was high (91-102 rpm) with good efficiency
During your Sweet Spot sessions:
You completed multiple 5-minute intervals at 233-234 watts (89-90% FTP)
You maintained 10-minute intervals at 228-233 watts (87-89% FTP)
Heart rate response was appropriate (160-169 bpm)
Decoupling was minimal, suggesting good aerobic fitness
RPE (Rating of Perceived Exertion)
Your workouts show “Feel” ratings of 1-3/10, suggesting the intensity was challenging but manageable
Your Sweet Spot sessions had RPE of 439-634 (moderate to somewhat hard)
Your VO2max session had RPE of 419 (moderate)
Heart Rate and Power Relationship
Your Power:HR ratio is consistently around 1.07-1.19, showing good efficiency
Decoupling during high-intensity efforts is minimal (<5% in most intervals)
You reach appropriate HR percentages for the given power zones
FTP Recommendation
Based on the analysis of your last 10 workouts, I recommend you increase your FTP by 5-10 watts (to 265-270 watts) for the following reasons:
You’re completing high-intensity intervals at 115% of current FTP with good form and consistent power output
Your Sweet Spot intervals are sustained well with appropriate physiological responses
Your Power:HR ratio is favorable across different workout intensities
Your RPE ratings suggest workouts are challenging but not excessively difficult
The variability index in your harder workouts shows you’re maintaining steady power
Your heart rate recovery appears good between intervals
The 5-10 watt increase is conservative but appropriate because:
You’ve recently recovered from a shoulder injury
A moderate increase will allow you to adapt gradually to the new zones
Your current workouts are challenging but not overwhelming you
If you decide to increase your FTP, I’d recommend reassessing after 3-4 weeks of training at the new level to ensure it’s appropriate and sustainable.
thanks for this, it looks awesome. I’m having installing (on Ubuntu subsystem on Windows). I followed the instructions. I installed the Model Context Protocol (MCP) server inside the intervals-mcp-server dir and followed the setup page (btw, there’s a typo in git clone https://github.com/yourusername/intervals-mcp-server.git).
However, when I get to “uv pip install -e .”, I get this error:
Resolved 28 packages in 283ms
× Failed to build `intervals-mcp-server @ file:///mnt/c/Non_Installed_Software/intervals_icu/intervals-mcp-server`
├─▶ The build backend returned an error
╰─▶ Call to `hatchling.build.build_editable` failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "/home/nik/.cache/uv/builds-v0/.tmpPQ2L1G/lib/python3.10/site-packages/hatchling/build.py", line 83,
in build_editable
...... cut .......
File "/home/nik/.cache/uv/builds-v0/.tmpPQ2L1G/lib/python3.10/site-packages/hatchling/builders/wheel.py", line
250, in default_file_selection_options
raise ValueError(message)
ValueError: Unable to determine which files to ship inside the wheel using the following heuristics:
https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection
Thanks. Please let me know if you’d prefer me to post help questions on git.
I’m on a Mac and I’m not familiar with hatchling. I got the following error on “Setup Step 4. Install dependencies”:
$ uv pip install -e .
Resolved 27 packages in 15.32s
× Failed to build `intervals-mcp-server @ file:///Users/andy/Projects/AI/intervals-mcp-server`
├─▶ The build backend returned an error
╰─▶ Call to `hatchling.build.build_editable` failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 11, in <module>
wheel_filename = backend.build_editable("/Users/andy/.cache/uv/builds-v0/.tmpcQMekT", {}, None)
File "/Users/andy/.cache/uv/builds-v0/.tmp4wccXg/lib/python3.13/site-packages/hatchling/build.py", line 83,
in build_editable
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<snip>
File "/Users/andy/.cache/uv/builds-v0/.tmp4wccXg/lib/python3.13/site-packages/hatchling/builders/wheel.py",
line 262, in default_only_include
return self.default_file_selection_options.only_include
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andy/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/lib/python3.13/functools.py", line
1037, in __get__
val = self.func(instance)
File "/Users/andy/.cache/uv/builds-v0/.tmp4wccXg/lib/python3.13/site-packages/hatchling/builders/wheel.py",
line 250, in default_file_selection_options
raise ValueError(message)
ValueError: Unable to determine which files to ship inside the wheel using the following heuristics:
https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection
The most likely cause of this is that there is no directory that matches the name of your project
(intervals_mcp_server).
At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see:
https://hatch.pypa.io/latest/config/build/
As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at
the root of your project, you can define the following:
[tool.hatch.build.targets.wheel]
packages = ["src/foo"]
hint: This usually indicates a problem with the package or the build environment.
To fix this and to get the dependencies to install, I added the following lines to pyproject.toml per Claude’s recommendations: