intervals.mcp
# intervals.mcp
An [MCP](https://modelcontextprotocol.io) server for [intervals.icu](https://intervals.icu), exposing your training data to Claude and other MCP clients. And yes, I did vibe code this.
I am not yet sure of the value of this MCP or AI for training in general. My recent months have been focused on skiing with minimal running. I asked it to help me ease back in to trail running and it came up with a pretty aggressive mileage plan and some heavier threshold work than I am doing now. I'll keep experimenting with it and adding tools as I see fit.
## Prerequisites
- Python 3.14+
- [uv](https://docs.astral.sh/uv/)
- An intervals.icu account with API access
## Configuration
Set the following environment variables:
| Variable | Description |
|---|---|
| `INTERVALS_ATHLETE_ID` | Your athlete ID (found in the intervals.icu URL, e.g. `i12345`) |
| `INTERVALS_API_KEY` | Your API key (Settings → API) |
## Claude Code Setup
Add to your MCP config (`.claude/settings.json` or `~/.claude/settings.json`):
```json
{
"mcpServers": {
"intervals": {
"command": "env",
"args": [
"INTERVALS_ATHLETE_ID=i12345",
"INTERVALS_API_KEY=your-api-key",
"uvx", "--from", "/path/to/intervals.mcp", "intervals-mcp"
]
}
}
}
```
## Claude Desktop Setup
Open the config via **Settings → Developer → Edit Config**:
```json
{
"mcpServers": {
"intervals": {
"command": "env",
"args": [
"INTERVALS_ATHLETE_ID=i12345",
"INTERVALS_API_KEY=your-api-key",
"uvx", "--from", "/path/to/intervals.mcp", "intervals-mcp"
]
}
}
}
```
## Available Tools
| Tool | Description |
|---|---|
| `get_athlete` | Athlete profile including sport zones and thresholds |
| `get_activities` | List activities, filterable by date range and sport type |
| `get_activity_detail` | Full detail for a single activity including laps and intervals |
| `get_fitness` | CTL/ATL/TSB fitness time series |
| `get_wellness` | HRV, resting HR, sleep, and fatigue scores |
| `get_events` | Planned workouts and races from your calendar |
## Development
```bash
uv run intervals-mcp
```
TDQS
Scored across 6 tools
Each tool targets a distinct domain: activity listing vs. detailed retrieval, athlete profile, calendar events, fitness metrics (CTL/ATL/TSB), and wellness data. No overlap in purpose; the distinction between planned events and completed activities is clear.
Perfectly consistent verb_noun pattern using 'get_' prefix throughout. All use snake_case. The '_detail' suffix appropriately distinguishes single-resource retrieval from list operations without breaking the convention.
Six tools is ideal for this focused read-only integration covering the core intervals.icu data surfaces (activities, athlete, calendar, fitness, wellness). Each tool earns its place; neither bloated nor sparse.
Strong coverage of read operations for athlete analytics including list/detail views and time-series data. Minor gaps exist: no power curve retrieval, segment data, or write operations (create/update activities/events), but core analysis workflows are fully supported.