Intervals-icu-mcp — 48-tool open source MCP server: activities, wellness, calendar, aerodynamics, and advanced analytics

Hi all — sharing an MCP server I built for my own triathlon/duathlon training. Open source, runs locally, MIT licensed.

GitHub: GitHub - andiarenaleandro-ux/intervals-icu-mcp: MCP server that connects Claude with intervals.icu for advanced physiological training analysis · GitHub

What it does

48 tools across 10 categories, covering the full intervals.icu API and more:

  • Activities — fetch, create, update, filter by sport, second-by-second streams (power, HR, cadence, speed)
  • Fitness & zones — CTL/ATL/TSB history, sport settings, update FTP/LTHR
  • Wellness — HRV, resting HR, sleep, weight, subjective fatigue — read and write
  • Calendar — planned workouts, weekly plan builder, create/update/delete events
  • Athlete profile — FTP, LTHR, zones, MMP model, upcoming races
  • .fit files — local analysis without uploading: power peaks (1/5/20/60min), laps, cadence, elevation
  • Biomechanics — persistent bike fitting profile with position angles, crank length, change history, injury tracking
  • Aerodynamics — CdA estimated from position angles (Defraeye/Blocken) and real field CdA from power+speed streams (Martin et al. 1998)
  • Advanced analytics — session-level cardiac efficiency, longitudinal comparison, adaptation detection (more on this below)
  • Memory — SQLite snapshots for weekly and per-session trends without re-fetching months of data

All conversational through Claude Desktop — ask questions in natural language, get analysis back.

What makes this different from other MCP servers

What makes this different

There are already great MCP servers for intervals.icu out there. This one adds a proprietary analysis layer on top of the standard API access:

  • Cardiac Cost Index (CCI)HR / %FTP calculated only on work intervals (not the full session), so you can compare cardiac efficiency week over week even when session structure varies. Normalizing by %FTP instead of absolute watts means the metric stays valid after an FTP retest.

  • HRV Z-Score correction — when your HRV is low, your heart rate behaves differently at the same power. The CCI gets corrected using a Z-Score (not a raw multiplier — that injects noise) so the trend line separates real adaptation from sympathetic fatigue.

  • Freshness Ratio (HRV × TSB matrix) — instead of looking at TSB alone, it cross-references with HRV Z-Score in 4 quadrants: fresh/recovered, optimal load absorbed, acute overload, and non-functional overreaching. A TSB of -8 with normal HRV is NOT the same as a TSB of -8 with crashed HRV.

  • Cardiac suppression detection — flags when a lower heart rate at the same power is actually autonomic exhaustion (the heart slowing down to protect itself), not improved efficiency.

  • Field CdA estimation — Martin et al. (1998) method using power and speed streams from flat segments. Also estimates CdA from position angles (torso, hip, elbow) using Defraeye/Blocken literature values.

  • Persistent SQLite memory — weekly snapshots and per-session metrics so longitudinal trends don’t require re-fetching months of data every conversation.

It also does the standard stuff

48 tools total — full CRUD for activities, wellness, calendar, sport settings. Second-by-second streams. Local .fit file parsing. Planned workout creation. Weekly plan builder. Bike fitting profile with change history.

Setup

5-minute install: python install.py + python setup_claude.py + edit .env with your API key. Works on Windows, Mac, and Linux with Claude Desktop.

Context

I built this for my own duathlon prep (targeting a specific race in August). The CCI and freshness ratio came out of wanting to answer a specific question: “am I actually improving, or just feeling better because I slept well?” Turns out you need HRV context to answer that honestly, and no platform cross-references it automatically.

The analysis engine is calibrated through real-world use — the HR drift thresholds, the Z-Score correction factors, and the session type detection all evolved from actual training data and iterative debugging with Claude as the analyst.

Happy to discuss the physiology behind the CCI or the implementation details. Feedback, issues, and PRs welcome.