WHOOP MCP Server
WHOOP MCP サーバー
Claude があなたの WHOOP 健康データ(回復、睡眠、負荷、ワークアウト、プロフィール)を WHOOP の公式 OAuth 2.0 REST API(v2)経由で照会できるようにする MCP(Model Context Protocol)サーバーです。
このサーバーを使用する各ユーザーは、自身の WHOOP アカウントに対して自分のコピーを実行します。WHOOP で無料のデベロッパーアプリを登録し、トークンや認証情報はマシン上のローカルファイルに保持されます(gitignore 対象)。データが共有されたり、あなたのマシンと WHOOP の API 以外に送信されることはありません。
git clone https://github.com/vaibhavgoel63-arch/Whoop-MCP.git
cd Whoop-MCP1. WHOOP API 認証情報を取得する
WHOOP デベロッパーダッシュボード にアクセスし、サインインします。
アプリを作成(または開く)します。
アプリの API 設定で、リダイレクト URI を次のように正確に設定します。
http://localhost:8080/callbackクライアント ID と クライアントシークレット をコピーします。これらは、以下の手順 3 で
.envに貼り付けます。
Related MCP server: whoop-mcp
2. 前提条件
Node.js 18+(組み込みの
fetchAPI に必要)。node --versionで確認してください。
3. インストールと設定
npm install
cp .env.example .env.env を開き、手順 1 で取得したクライアント ID とクライアントシークレットを貼り付けます。
WHOOP_CLIENT_ID=your-client-id-here
WHOOP_CLIENT_SECRET=your-client-secret-here
WHOOP_REDIRECT_URI=http://localhost:8080/callback⚠️
WHOOP_CLIENT_IDとWHOOP_CLIENT_SECRETは手動で入力する必要があります。これらが設定されるまで、サーバーは OAuth フローを開始しません。
4. ビルドとログイン(初回のみ)
npm run build
npm run loginこれにより、以下の処理が行われます。
http://localhost:8080に一時的なローカルサーバーを起動します。ブラウザで WHOOP の同意画面を開きます(回復、睡眠、サイクル、ワークアウト、プロフィール、身体測定、オフライン/更新スコープを要求)。
承認後、WHOOP は認証コードとともに
localhost:8080/callbackにリダイレクトします。スクリプトがそのコードをアクセストークンと更新トークンに交換し、プロジェクトルートの
token.json(gitignore 対象)に保存します。
この手順は一度だけ実行すれば十分です。MCP サーバーは、アクセストークンの有効期限が切れたときに更新トークンを使用して自動的にアクセストークンを更新します(WHOOP のアクセストークンは約 1 時間有効)。更新トークンが失効または期限切れになった場合は、npm run login を再実行してください。
5. Claude Desktop に接続する
Claude Desktop の設定ファイルを開きます。
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
注:Microsoft Store から Claude Desktop をインストールした場合、上記のファイルは単なるスタブである可能性があります。アプリは実際には
%LOCALAPPDATA%\Packages\<Claude パッケージフォルダー>\LocalCache\Roaming\Claude\claude_desktop_config.jsonを読み取ります。以下の手順を実行してもツールが表示されない場合は、そちらを確認してください。
mcpServers の下に whoop エントリを追加します。以下のパスを、このプロジェクトの dist/server.js への絶対パスに置き換えてください(プロジェクトフォルダー内から macOS/Linux では pwd、Windows では cd で確認できます)。
{
"mcpServers": {
"whoop": {
"command": "node",
"args": ["/absolute/path/to/whoop-mcp/dist/server.js"]
}
}
}⚠️ この絶対パスは手動で入力する必要があります。このリポジトリをクローンした場所へのパスです。Windows でもスラッシュを使用してください(例:
C:/Users/you/whoop-mcp/dist/server.js)。この JSON ファイル内では問題なく動作します。
その後、Claude Desktop を完全に再起動します(ウィンドウを閉じるだけでなく、システムトレイから終了します)。
6. テストする
Claude Desktop で、チャットボックスのツール/ハンマーアイコンをクリックし、
whoopに 6 つのツール(get_recovery、get_sleep、get_strain、get_workouts、get_profile、get_training_recommendation)がリストされていることを確認します。次のプロンプトを試してください。
「今週の回復はどうですか?」
「今日はハードにトレーニングすべきですか?」
「過去 3 晩の睡眠はどうでしたか?」
「過去 7 日間のワークアウトを見せてください。」
「現在の負荷はどれくらいで、昨日と比べてどうですか?」
「2026 年 3 月の平均負荷はどれくらいでしたか?」(「過去 N 日間」だけでなく、履歴範囲)
1 つの結果(例:今日の回復スコア)を WHOOP アプリと照合して、数値が一致することを確認します。
ツールリファレンス
ツール | 説明 |
| 回復スコア、HRV、安静時心拍数、SpO2、皮膚温 — 平均サマリー付き |
| 睡眠パフォーマンス %、効率 %、ステージ別内訳(レム/浅い/深い) — 平均サマリー付き |
| 日次負荷、平均/最大心拍数、1 日あたりのカロリー — 平均/合計サマリー付き |
| 記録されたワークアウト(スポーツ、時間、負荷、心拍数、カロリー) — サマリー付き |
| 名前、メールアドレス、身長、体重、最大心拍数 |
| 今日の回復 + 過去 3 日間の睡眠を組み合わせて、緑/黄/赤のトレーニング推奨を提供。パフォーマンスが 2 晩以上 80% 未満の場合は睡眠負債の警告を表示 |
4 つの範囲ベースのツールは、days(ローリングウィンドウ、例:days=7 で過去 1 週間)または明示的な start/end 日付ペア(YYYY-MM-DD、終了日は含まない)を受け入れ、特定の履歴期間を照会します(例:start="2026-03-01", end="2026-04-01" で 2026 年 3 月全体)。各ツールは、個々の日次/夜間の records とともに summary オブジェクト(平均/合計)を返します。
トラブルシューティング
「WHOOP トークンが見つかりません」 —
npm run loginを実行してください。以前は動作していたのに 401 / トークンエラーが発生する — サーバーはアクセストークンを自動更新します。更新に失敗した場合、更新トークンが失効している可能性があります(例:WHOOP 設定でアプリのアクセスを削除した)。
npm run loginを再実行してください。403 Forbidden — トークンにスコープが不足しています。スコープはログイン時に固定されるため、
npm run loginを再実行して、完全なスコープセットを持つ新しいトークンを取得してください。429 Too Many Requests — WHOOP のレート制限(100 リクエスト/分、10,000/日)に達しました。しばらく待ってから再試行してください。
Claude Desktop にツールが表示されない —
claude_desktop_config.jsonの絶対パスを再確認し、npm run buildを実行したこと(設定はsrc/server.tsではなくdist/server.jsを指している)、および Claude Desktop を完全に再起動したことを確認してください。
プロジェクト構造
src/
auth.ts # OAuth constants, token load/save, refresh logic
login.ts # One-time login script (npm run login)
whoopClient.ts # Authenticated WHOOP API client + response normalizers
server.ts # MCP server exposing the 6 tools
.env.example # Template for WHOOP_CLIENT_ID / WHOOP_CLIENT_SECRET / WHOOP_REDIRECT_URI.env(認証情報)と token.json(アクセス/更新トークン)はどちらも gitignore 対象です。これらのファイルをコミットしないでください。
Available Tools
6 toolsget_profileA
Get the WHOOP user's basic profile: name, email, height (cm), weight (kg), and max heart rate. Use this for identity or body-metric questions.
Inputs: no named parameters.
get_recoveryA
Get WHOOP recovery data: recovery score (0-100), HRV (ms), resting heart rate, SpO2, and skin temperature, per day. Accepts either the last N days or an explicit historical start/end range (e.g. a specific past month). Returns a summary with averages plus the daily records. Use this to answer questions about how recovered/rested the user is, now or in the past.
Inputs: end, days, start.
get_sleepA
Get WHOOP sleep data: sleep performance %, efficiency %, time in bed, time asleep, and a breakdown of light/deep/REM sleep stages, per night (excludes naps). Accepts either the last N days or an explicit historical start/end range (e.g. a specific past month). Returns a summary with averages plus the nightly records. Use this to answer questions about sleep quality or duration, now or in the past.
Inputs: end, days, start.
get_strainA
Get WHOOP daily strain data: cardiovascular strain score (0-21), average/max heart rate, and calories burned, per day (cycle). Accepts either the last N days or an explicit historical start/end range (e.g. a specific past month). Returns a summary with averages/totals plus the daily records. Use this to answer questions about daily exertion or workload, now or in the past — including things like 'what was my average strain in March'.
Inputs: end, days, start.
get_training_recommendationA
Get a coaching recommendation for today based on today's WHOOP recovery score and the last 3 days of sleep performance. Returns a recovery band (green/yellow/red) with guidance on training load, plus a warning if sleep debt has been building. Use this to answer 'should I train today' or 'how hard should I push today' style questions.
Inputs: no named parameters.
get_workoutsA
Get a list of logged WHOOP workouts, each with sport type, duration, strain, average/max heart rate, and calories burned. Accepts either the last N days or an explicit historical start/end range (e.g. a specific past month). Returns a summary plus the individual workout records. Use this to answer questions about specific exercise sessions, now or in the past.
Inputs: end, days, start.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool addresses a distinct WHOOP domain (recovery, sleep, strain, workouts, profile, training recommendation) with no overlap. The descriptions clearly differentiate the data each returns, making it easy for an agent to select the correct tool for a given question.
All tool names follow a consistent 'get_' prefix with a noun representing the data type (recovery, sleep, strain, etc.). This is predictable and clear. The only minor deviation is the slightly longer 'get_training_recommendation' compared to the others, but it still fits the pattern.
With 6 tools, the set is well-scoped for a WHOOP fitness tracker integration. Each tool represents a core data category a user would query, and there are no extraneous or missing tools that would make the surface too large or too small for the domain.
The tools cover the most common queries about WHOOP data: recovery, sleep, strain, workouts, profile, and training recommendations. A minor gap is the lack of tools to query cycle/physiological data, meal logging, or team features, but the core personal health metrics are well represented.
Maintenance
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Your WHOOP data in the assistant, read-only: recovery, sleep, strain, workouts, cycles and body meas
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Read WHOOP recovery, sleep, cycles, workouts and body measurements.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read your Whoop recovery, sleep, cycle, and workout data through natural language queries.-
- FlicenseAqualityCmaintenanceProvides Claude Desktop with access to WHOOP fitness data including recovery, sleep, strain, and workouts.41-
- FlicenseAqualityDmaintenanceEnables Claude to read your WHOOP health data including recovery, sleep, strain, and workouts through the official WHOOP API, so you can ask natural language questions about your fitness metrics.7-
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to Whoop recovery, sleep, strain, workouts, and profile data, allowing users to query their Whoop metrics through natural language in Claude.-