WHOOP MCP Server

WHOOP MCP Server

Enables Claude to query personal WHOOP health data including recovery, sleep, strain, workouts, and profile via WHOOP's OAuth 2.0 REST API.

Category
访问服务器

README

WHOOP MCP Server

An MCP (Model Context Protocol) server that lets Claude query your personal WHOOP health data — recovery, sleep, strain, workouts, and profile — via WHOOP's official OAuth 2.0 REST API (v2).

Each person who uses this runs their own copy against their own WHOOP account: you register your own free developer app with WHOOP, and your tokens/credentials stay in local files on your machine (gitignored, and written with restrictive permissions) — they're never sent anywhere except directly between your machine and WHOOP's API.

That said, the health data these tools return is a different story: once a tool call happens, its result is returned to whatever MCP client/model you're using (e.g. Claude), so it's subject to that service's own privacy and data-handling policies from that point on. Only the credentials and tokens are guaranteed to stay local — the recovery scores, sleep data, etc. you ask about necessarily become visible to the model answering your question.

git clone https://github.com/vaibhavgoel63-arch/Whoop-MCP.git
cd Whoop-MCP

1. Get WHOOP API credentials

  1. Go to the WHOOP Developer Dashboard and sign in.
  2. Create (or open) an app.
  3. Under the app's API settings, set the Redirect URI to exactly:
    http://localhost:8080/callback
    
  4. Copy the Client ID and Client Secret — you'll paste these into .env in step 3 below.

2. Prerequisites

  • Node.js 18+ (needed for the built-in fetch API). Check with node --version.

3. Install and configure

npm install
cp .env.example .env

Open .env and paste in your Client ID and Client Secret from step 1:

WHOOP_CLIENT_ID=your-client-id-here
WHOOP_CLIENT_SECRET=your-client-secret-here
WHOOP_REDIRECT_URI=http://localhost:8080/callback

⚠️ You must manually fill in WHOOP_CLIENT_ID and WHOOP_CLIENT_SECRET — the server will refuse to start any OAuth flow until these are set.

4. Build and log in (one-time)

npm run build
npm run login

This will:

  1. Start a temporary local server on http://localhost:8080.
  2. Open your browser to WHOOP's consent screen (requesting recovery, sleep, cycle, workout, profile, body-measurement, and offline/refresh scopes).
  3. After you approve, WHOOP redirects back to localhost:8080/callback with an authorization code.
  4. The script exchanges that code for an access + refresh token and saves them to token.json (gitignored) in the project root.

You only need to do this once. The MCP server automatically refreshes the access token using the refresh token when it expires (WHOOP access tokens last about 1 hour). If your refresh token is ever revoked or expires, just re-run npm run login.

5. Connect to Claude Desktop

Open your Claude Desktop config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Note: if you installed Claude Desktop from the Microsoft Store, the file above may just be a stub — the app actually reads %LOCALAPPDATA%\Packages\<Claude package folder>\LocalCache\Roaming\Claude\claude_desktop_config.json. If tools don't show up after following the steps below, check there.

Add a whoop entry under mcpServers. Replace the path below with the absolute path to this project's dist/server.js on your machine (find it with pwd on macOS/Linux or cd on Windows from inside the project folder):

{
  "mcpServers": {
    "whoop": {
      "command": "node",
      "args": ["/absolute/path/to/whoop-mcp/dist/server.js"]
    }
  }
}

⚠️ You must manually fill in this absolute path to wherever you cloned this repo. Use forward slashes even on Windows (e.g. C:/Users/you/whoop-mcp/dist/server.js) — they work fine inside this JSON file.

Then fully restart Claude Desktop (quit from the system tray, not just close the window).

6. Test it

  1. In Claude Desktop, click the tools/hammer icon in the chat box and confirm you see whoop with 6 tools listed: get_recovery, get_sleep, get_strain, get_workouts, get_profile, get_training_recommendation.
  2. Try these prompts:
    • "How was my recovery this week?"
    • "Should I train hard today?"
    • "How did I sleep the last 3 nights?"
    • "Show me my workouts from the last 7 days."
    • "What's my current strain and how does it compare to yesterday?"
    • "What was my average strain in March 2026?" (historical range, not just "last N days")
  3. Spot-check one result (e.g. today's recovery score) against the WHOOP app to confirm the numbers match.

Tools reference

Tool Description
get_recovery(days | start+end) Recovery score, HRV, resting heart rate, SpO2, skin temp — plus an averages summary
get_sleep(days | start+end) Sleep performance %, efficiency %, stage breakdown (light/deep/REM), and sleep_onset (full ISO timestamp of when sleep began, not just the date) — plus an averages summary
get_strain(days | start+end) Daily strain, average/max heart rate, calories per day — plus an averages/totals summary
get_workouts(days | start+end) Logged workouts with sport, duration, strain, heart rate, calories — plus a summary
get_profile() Name, email, height, weight, max heart rate
get_training_recommendation() Combines today's recovery + last 3 days of sleep into a green/yellow/red training recommendation, with a sleep-debt warning if performance has been under 80% for 2+ nights

The four range-based tools accept either days (rolling window, e.g. days=7 for the last week) or an explicit start/end date pair (YYYY-MM-DD, end exclusive) for querying a specific historical period, e.g. start="2026-03-01", end="2026-04-01" for all of March 2026. Each returns a summary object (averages/totals) alongside the individual daily/nightly records.

Troubleshooting

  • "No WHOOP tokens found" — run npm run login.
  • 401 / token errors after working before — the server auto-refreshes access tokens; if you see a refresh failure, your refresh token was likely revoked (e.g. you removed app access in WHOOP settings). Re-run npm run login.
  • 403 Forbidden — your token is missing a scope. Scopes are fixed at login time, so re-run npm run login to get a fresh token with the full scope set.
  • 429 Too Many Requests — you've hit WHOOP's rate limit (100 requests/minute, 10,000/day). Wait and try again.
  • Tools don't show up in Claude Desktop — double-check the absolute path in claude_desktop_config.json, that you ran npm run build (the config points at dist/server.js, not src/server.ts), and that you fully restarted Claude Desktop.

Project structure

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 (credentials) and token.json (access/refresh tokens) are both gitignored — never commit either file.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选