Skip to main content
Glama
intervals-icu-mcp

intervals-icu-mcp

by hadidwirsty

Intervals.icu MCP サーバー & AI ランニングコーチ

License: MIT Node.js Version TypeScript Model Context Protocol Tests

Intervals.icu 向けのプロダクショングレードの Model Context Protocol (MCP) サーバーおよびAI ランニングコーチ知能システムです。

AI アシスタント(Claude Desktop、Antigravity、Cursor、VS Code Cline / Roo-Code)に、リアルタイムテレメトリの読み取り、急性・慢性トレーニング負荷(CTL/ATL/TSB/ACWR)の評価、Jack Daniels VDOT とペースゾーンの計算、心拍ドリフトと有酸素デカップリングの算出、レースタイムの予測、テーパリングのスケジューリング、そして構造化ワークアウトの Intervals.icu カレンダーへの直接公開を可能にします。


📑 目次


Related MCP server: intervals.icu-mcp

✨ 主な機能

  • 🏃 リアルタイムテレメトリとストリーム取り込み: 完了したセッションからワット数、心拍数、ケイデンス、速度、インターバルスプリットを抽出します。

  • ⚡ 有酸素デカップリング & 心拍ドリフトエンジン: Efficiency Factor (EF) $H_1$ と $H_2$ を計算し、心血管ドリフト(>5%)や脱水を検出します。

  • 🩹 統合リカバリー & レディネススコア: TSB、ACWR、睡眠スコア、HRV、RHR スパイクを組み合わせた 0〜100% の複合スコアを、Green/Yellow/Red のアクションシグナルとして算出します。

  • 🏆 レースタイム予測 & テーパリングプランナー: Jack Daniels VDOT 計算式 + CTL フィットネスと TSB フレッシュネス調整 + 2〜3週間のボリューム削減ジェネレーター。

  • ⚖️ ACWR & 週間負荷予算管理: 42日間のローリングベースラインに基づく安全なボリューム進行上限(ロングラン 30〜35%、クオリティ 15〜20%、イージー 45〜55%)。

  • 📅 構造化ワークアウトビルダー: ネイティブの Intervals Text DSL(Warmup、Main Set Nx、Cooldown)を使用して、ワークアウトを Intervals.icu カレンダーに公開します。


🚀 3分クイックスタート

1. 前提条件

  • Node.js: >= 18.0.0

  • パッケージマネージャー: pnpm(推奨)、npm、または yarn

  • Intervals.icu アカウントと API キー

2. クローンとビルド

git clone https://github.com/hadidwirsty/intervals-icu-mcp.git
cd intervals-icu-mcp
pnpm install
pnpm run build

⚙️ 設定

Intervals.icu 設定 から認証情報を取得します:

  1. Developer セクションまでスクロールダウンします。

  2. API キーをコピーします(例: your_api_key_here)。

  3. アスリート ID を確認します(設定またはプロフィール URL に記載。例: i12345、または self を使用)。

環境変数

変数

必須

説明

INTERVALS_API_KEY

はい

個人の Intervals.icu API キー。

INTERVALS_ATHLETE_ID

任意

デフォルトのアスリート ID(デフォルト: self)。呼び出しごとに上書き可能。


🔌 MCP クライアント設定ガイド

1. Claude Desktop

以下を claude_desktop_config.json に追加します:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "intervals-icu": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/intervals-icu-mcp/dist/index.js"],
      "env": {
        "INTERVALS_API_KEY": "YOUR_API_KEY_HERE",
        "INTERVALS_ATHLETE_ID": "self"
      }
    }
  }
}

2. Antigravity

Antigravity の MCP 設定または .gemini/config/mcp.json に追加します:

{
  "mcpServers": {
    "intervals-icu": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/intervals-icu-mcp/dist/index.js"],
      "env": {
        "INTERVALS_API_KEY": "YOUR_API_KEY_HERE",
        "INTERVALS_ATHLETE_ID": "self"
      }
    }
  }
}

3. Cursor

Cursor 設定 > 機能 > MCP サーバー、または .cursor/mcp.json に追加します:

{
  "mcpServers": {
    "intervals-icu": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/intervals-icu-mcp/dist/index.js"],
      "env": {
        "INTERVALS_API_KEY": "YOUR_API_KEY_HERE",
        "INTERVALS_ATHLETE_ID": "self"
      }
    }
  }
}

4. VS Code(Cline / Roo-Code)

cline_mcp_settings.json に追加します:

{
  "mcpServers": {
    "intervals-icu": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/intervals-icu-mcp/dist/index.js"],
      "env": {
        "INTERVALS_API_KEY": "YOUR_API_KEY_HERE",
        "INTERVALS_ATHLETE_ID": "self"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

🤖 AI ワークフロー & スラッシュコマンド一覧

このリポジトリには、.agents/workflows/ に本番運用可能な 11 の AI ワークフローがプリロードされており、スラッシュコマンドで起動できます:

スラッシュコマンド

ファイル

説明と使用方法

/run-report

run-report.md

ワークアウト後のコーチングレポート。ワット数/心拍数の達成度、インターバル内訳、心血管ドリフトを分析します。

/readiness-check

readiness-check.md

TSB、ACWR、睡眠、RHR に基づく毎日のリカバリー & レディネススコア評価(0〜100% Green/Yellow/Red)。

/cardiac-drift

cardiac-drift.md

テレメトリストリーム分析(心拍数 vs パワー/速度)。$H_1$ と $H_2$ の Efficiency Factor (EF) と有酸素デカップリング % を計算します。

`/predict-race``

predict-race.md

VDOT と CTL/TSB 調整 + 2〜3週間のテーパリングボリュームスケジュールで、5K、10K、HM、FM の完走タイムとペースを推定します。

/fitness-status

fitness-status.md

完全なトレーニング負荷分析(CTL フィットネス、ATL ファティーグ、TSB フォーム、ランプレートリスク、デロード検出)。

/weekly-budget

weekly-budget.md

42日間のローリング負荷/距離に基づく安全な週間トレーニング予算(ロングラン 30〜35%、クオリティ 15〜20%、イージー 45〜55%)を計算します。

/mesocycle-block

mesocycle-block.md

4週間 3:1 メソサイクル計画(ビルド W1-3(+5%)と計画デロード W4(-25%))。

/backcast-plan

backcast-plan.md

目標レースデー A(HM 13週、FM 18週)から逆算したマクロサイクル計画。

/calc-vdot

calc-vdot.md

オフラインの Jack Daniels VDOT と 5 つのペーストレーニングゾーン計算機(イージー、マラソン、閾値、インターバル、レペティション)。

/check-workout

check-workout.md

Intervals.icu カレンダーから予定されているワークアウトを表示します。

/create-workout

create-workout.md

Intervals Text DSL を使用して、構造化されたランニング/サイクリングワークアウトをカレンダーに公開します。


👤 アスリートプロフィールのカスタマイズ

AI アシスタントに正確なコーチングコンテキストを提供するには、.agents/skills/running-coach-analysis/SKILL.md でプロフィールを設定します:

  1. セクション 2(アスリートプロフィール): 名前、年齢、フォールバック体重、目標レース目標を入力します。

  2. セクション 3(生理学的ベースライン): フォールバックの CP/FTP、LTHR、最大心拍数、安静時心拍数を入力します(注: アクティブな値は MCP を介して動的に自動同期されます)。

  3. セクション 4(週間構成とブループリント): 週間トレーニング頻度、好みのワークアウトセッション(例: サブスレッショルド、VO2Max、ロングラン)、および具体的なパワー/ペース目標を定義します。


💬 チャットプロンプトの例

AI ランニングコーチとのチャット方法の例を以下に示します:

1. 毎日のランニング後評価

"今朝のワークアウトです。最新のアクティビティで /run-report を実行してください。RPE は 6/10 で、3本目のインターバル中は脚が軽く感じられました。"

2. ワークアウト前のレディネスチェック

"/readiness-check — 今日のサブスレッショルドインターバルセッションに向けて十分に回復していますか、それとも強度をゾーン 2 に制限すべきですか?"

3. 週間ボリューム配分

"/weekly-budget distance — 今週の推奨総走行距離とロングランの上限はどれくらいですか?"

4. レースデー予測とテーパリング

"/predict-race — 現在の VDOT は 50 で、目標のハーフマラソンレースは 2026-10-15 です。完走タイム予測と 2 週間のテーパリングスケジュールを教えてください。"

5. カレンダーへのワークアウトスケジュール

"/create-workout — 明日、50 分のサブスレッショルドセッション(ウォームアップ 12 分、6x3 分 @ CP の 95〜98%、レスト 1 分、クールダウン 6 分)をスケジュールしてください。"


🛠️ MCP ツール完全リファレンス

サーバーはカテゴリ別に 20 以上のツールを公開しています:

🏃 1. アクティビティ & ストリーム

  • get_activities: 日付範囲内のアクティビティを取得します(oldest、newest、type)。

  • get_activity_details: アクティビティ ID の完全なテレメトリ、メトリクス、アスリートの生理学的値を取得します。

  • get_activity_intervals: ラップとワーク/レストのインターバル内訳を抽出します。

  • get_activity_streams: 生の時系列ストリームデータ(watts、heartrate、cadence、velocity_smooth、altitude)にアクセスします。

  • get_activity_messages: アクティビティのコメントとメモを読み取ります。

  • add_activity_message: アクティビティにコーチングフィードバックを投稿します。

👤 2. アスリートの生体情報 & ゾーン

  • get_athlete_profile: アスリートプロフィール(FTP、LTHR、最大心拍数、体重、安静時心拍数)を取得します。

  • get_training_zones: パワー、心拍数、ペーストレーニングゾーンの境界にアクセスします。

🧮 3. 生理学 & 持久力インテリジェンス(オフライン)

  • calculate_vdot: レース/テンポタイムトライアルから Jack Daniels VDOT と VO₂max を計算します。

  • calculate_pace_zones: 5 つのペーストレーニングゾーン(イージー、マラソン、閾値、インターバル、レペティション)を MM:SS/km で計算します。

  • predict_race_time: VDOT からレース完走タイムとペース(5K、10K、HM、FM、またはカスタム km)を、CTL フィットネスと TSB フレッシュネス調整付きで予測します。

  • calculate_taper_plan: レースデーのピーク TSB フレッシュネスに向けた週間ボリューム削減スケジュール(75% → 50% → 30%)を生成します。

  • analyze_cardiac_drift: 生のテレメトリストリーム(heartrateStream、powerOrSpeedStream)から Efficiency Factor (EF) と有酸素デカップリング % を計算します。

  • calculate_readiness_score: TSB、ACWR、睡眠、HRV、RHR を組み合わせた統合リカバリースコア(0〜100%、Green/Yellow/Red)を計算します。

⚖️ 4. トレーニング負荷 & ピリオダイゼーション(オフライン)

  • analyze_training_load: ACWR(ATL/CTL)を計算し、TSB レディネスゾーンを分類し、ランプレートの怪我リスクを評価します。

  • calculate_weekly_budget: 42 日間のローリング平均に基づく安全な週間トレーニング予算(総ボリューム、ロングラン 30〜35%、クオリティ 15〜20%、イージー 45〜55%)を計算します。

📅 5. カレンダー & ワークアウトビルダー

  • get_events: 日付範囲内のカレンダー項目(予定ワークアウト、メモ、レース)を取得します。

  • get_event_by_id: ID で詳細なイベントデータを取得します。

  • create_running_workout: 構造化ワークアウトビルダー — Text DSL を使用して構造化ワークアウトを検証し、Intervals.icu カレンダーに公開します。

  • add_or_update_planned_workout: 予定ワークアウトイベントを作成または更新します。

  • add_or_update_note: カレンダーの日付にテキストメモを追加します。

  • delete_event: ID でカレンダーイベントを削除します。

  • get_workout_library: ワークアウトテンプレートライブラリを検索します。

  • get_workout_by_id: ワークアウトテンプレートの詳細を取得します。

🚴 6. ギア & パワーカーブ

  • get_gear_list: 登録済みのバイク、シューズ、装備を走行距離付きで一覧表示します(30 分キャッシュ)。

  • get_athlete_power_curves: パワーデュレーションカーブを取得します(60 分キャッシュ)。

💚 7. ウェルネス & フィットネス時系列

  • get_wellness_data: 毎日のウェルネス記録(睡眠スコア、HRV、安静時心拍数、疲労度、筋肉痛、体重)を取得します。

  • get_fitness_chart: 時系列フィットネスデータ(ctl、atl、tsb、rampRate、eftp)を取得します。


🧪 開発とテスト

完全なユニットテストスイートを実行します:

# Run Vitest unit tests
pnpm test

# Build TypeScript
pnpm run build

# Watch mode during development
pnpm exec vitest

59以上のユニットテストが含まれており、HTTP 429でのAPIクライアントの自動リトライ、LRU TTLキャッシュ、Jack Daniels VDOT計算、レース予測、心拍ドリフト分析、回復スコアリング、ACWR分析、ワークアウトDSL検証をカバーしています。


📄 ライセンス

このプロジェクトはMITライセンスの下でライセンスされています。© Muhammad Hadid Wiransetyo.

Available Tools

19 tools
add_activity_messageAdd Activity MessageA

Tambahkan catatan/komentar baru ke sebuah aktivitas.

Inputs: content (required), activityId (required), apiKey.

add_or_update_noteAdd or Update NoteA

Buat atau update catatan teks biasa (kategori NOTE) di kalender Intervals.icu.

Inputs: name (required), description (required), color, apiKey, +3 more.

add_or_update_planned_workoutAdd or Update Planned WorkoutA

Buat atau update planned workout (event kalender kategori WORKOUT) di Intervals.icu. Kirim event_id untuk update, kosongkan untuk membuat baru. workoutDoc opsional untuk mendefinisikan struktur steps (warmup/interval/cooldown, target power/hr/pace, dll — ikuti format workout builder Intervals.icu).

Inputs: name (required), workoutType (required), apiKey, eventId, +5 more.

create_custom_itemCreate Custom ItemA

Buat custom item baru (chart/field/zones) untuk seorang athlete. Catatan enum penting: field 'type' di dalam content untuk INPUT_FIELD/ACTIVITY_FIELD harus 'numeric' | 'text' | 'select' (bukan 'number'); field 'aggregate' harus MIN|SUM|MAX|AVERAGE (bukan AVG).

Inputs: name (required), itemType (required), apiKey, content, +3 more.

delete_custom_itemDelete Custom ItemB

Hapus satu custom item berdasarkan ID.

Inputs: itemId (required), apiKey, athleteId.

delete_eventDelete EventB

Hapus satu event kalender berdasarkan event ID.

Inputs: eventId (required), apiKey, athleteId.

get_activitiesGet ActivitiesB

Ambil daftar aktivitas latihan seorang athlete dari Intervals.icu dalam rentang tanggal tertentu.

Inputs: limit, apiKey, endDate, athleteId, +1 more.

get_activity_detailsGet Activity DetailsB

Ambil detail lengkap satu aktivitas berdasarkan activity ID.

Inputs: activityId (required), apiKey.

get_activity_intervalsGet Activity IntervalsA

Ambil data interval/lap (power, HR, pace per segmen) dari satu aktivitas.

Inputs: activityId (required), apiKey.

get_activity_messagesGet Activity MessagesB

Ambil catatan/komentar (messages) pada satu aktivitas.

Inputs: activityId (required), apiKey.

get_activity_streamsGet Activity StreamsA

Ambil data time-series (streams) dari satu aktivitas, misalnya power, heart rate, cadence, altitude, distance, velocity.

Inputs: activityId (required), apiKey, streamTypes.

get_athlete_power_curvesGet Athlete Power CurvesA

Ambil power curve (best power per durasi, dalam watt) seorang athlete untuk musim ini/lalu, dan/atau rentang tanggal custom.

Inputs: apiKey, endDate, athleteId, durations, +5 more.

get_custom_item_by_idGet Custom Item By IDA

Ambil detail satu custom item berdasarkan ID.

Inputs: itemId (required), apiKey, athleteId.

get_custom_itemsGet Custom ItemsA

Ambil daftar custom item (custom chart, field, zones, dll) milik seorang athlete.

Inputs: apiKey, athleteId.

get_event_by_idGet Event By IDB

Ambil detail satu event kalender berdasarkan event ID.

Inputs: eventId (required), apiKey, athleteId.

get_eventsGet EventsA

Ambil daftar event kalender (planned workout, race, note) dalam rentang tanggal.

Inputs: apiKey, endDate, athleteId, startDate.

get_gear_listGet Gear ListB

Ambil katalog gear (sepeda, sepatu, dll) beserta statistik dasarnya untuk seorang athlete.

Inputs: apiKey, athleteId.

get_wellness_dataGet Wellness DataA

Ambil data wellness harian athlete (training metrics, HRV, resting HR, sleep, subjective scores, dll) dalam rentang tanggal tertentu.

Inputs: apiKey, endDate, athleteId, startDate.

update_custom_itemUpdate Custom ItemA

Update custom item yang sudah ada. Hanya field yang diisi yang akan dikirim.

Inputs: itemId (required), name, apiKey, content, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 19 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action. Activity-related tools are separated by data granularity (list, details, intervals, streams, messages), and event/custom item tools follow clear CRUD patterns. No two tools appear to serve the same purpose.

    Naming Consistency5/5

    All tools use a consistent verb_noun pattern in snake_case. Retrieval uses get_, creation uses add_/create_, updates use update_/add_or_update_, and deletion uses delete_. Minor variation like add_or_update_ is predictable.

    Tool Count4/5

    At 19 tools, this is above the ideal 3-15 range but appropriate for the broad scope covering activities, events, wellness, gear, power curves, and custom items. The tools are grouped by domain and each is justified; still, a few could be consolidated, so not a perfect 5.

    Completeness4/5

    Core workflows are well covered: activities have read and message addition, events have full CRUD, and custom items have full CRUD. Gaps include no activity update/delete, no gear management, and no wellness update, but these may be outside the API's intended scope or rare needs.

    Related MCP Connectors

    • Adaptive running coach MCP server: training data, plans, and recovery for AI assistants.

      https://api.coachicarus.com/mcp
    • Intervals.icu MCP server for ChatGPT, Claude and any AI agent: list activities, get activity with intervals, list wellness, list calendar events, create planned workout, update planned workout, delete calendar event and log daily wellness in your own Intervals.icu account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Intervals.icu yourself; Cotlet does not store your password and you need no Intervals.icu API key. About the official Intervals.icu API: Yes, Intervals.icu has a public REST API (checked 6 Nov 2026). You generate a personal API key under Developer Settings for your own data, and apps for many users use OAuth. Setup and FAQ: https://cotlet.dev/integrations/intervals-icu-api-mcp-server

    • Connect Intervals.icu to Claude and ChatGPT: read training, plan workouts. Training never stored.

      https://thresholdlink.app/mcp
    • tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).

      https://tri-train.com/api/mcp

    Related MCP Servers