whoop-mcp

whoop-mcp

Enables 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.

Category
访问服务器

README

whoop-mcp

A small Model Context Protocol server that gives Claude read access to your WHOOP health data — recovery, sleep, strain, and workouts — through the official WHOOP API v2.

Ask Claude things like "Did I sleep well?", "Am I recovered enough to train hard today?", or "What's my resting heart rate trend this week?" and it will pull live data from your WHOOP.

Note on "current heart rate": WHOOP's API exposes completed summaries (last night's sleep, today's recovery, per-workout HR), not a live real-time pulse. daily_summary gives the freshest snapshot available — the latest recovery score, resting heart rate, HRV, and today's accumulated strain.

Tools

Tool What it returns
daily_summary One-call snapshot: latest recovery (score, HRV, resting HR), last night's sleep, today's strain. Start here.
get_recovery Recovery records for the last N days (default 7).
get_sleep Sleep records with stage breakdown for the last N days.
get_strain Daily strain / cycle data (day strain, avg & max HR).
get_workouts Workout activities for the last N days (default 14).
get_profile Name, email, user id.
get_body_measurement Height, weight, max heart rate.

Setup

1. Create a WHOOP developer app

  1. Go to the WHOOP Developer Dashboard and sign in with your WHOOP account.
  2. Create an app. Copy the Client ID and Client Secret.
  3. Add a Redirect URI of exactly http://localhost:8080/callback.
  4. Make sure these scopes are enabled: read:recovery, read:cycles, read:sleep, read:workout, read:profile, read:body_measurement, and offline.

2. Configure credentials

cp .env.example .env
# edit .env and paste in your Client ID + Secret

3. Authorize once

uv run whoop-authorize

This opens your browser, you approve access, and tokens are saved to ~/.whoop-mcp/tokens.json (readable only by you). The server refreshes them automatically from then on — you won't need to log in again.

4. Register the server with Claude

claude mcp add whoop -- uv --directory /Users/adam/dev/whoop-mcp run whoop-mcp

Restart Claude, then ask: "How's my WHOOP recovery today?"

Using it from the Claude apps (remote connector)

The stdio setup above only works in Claude Code, which can launch the server as a local subprocess. To use WHOOP from claude.ai, the desktop app, and mobile, run the server remotely over HTTP and add it as a custom connector.

The same code serves an HTTP transport via the whoop-mcp-http entrypoint. The MCP endpoint lives at /mcp behind a minimal single-user OAuth 2.1 layer (see oauth.py) — claude.ai custom connectors force an OAuth handshake and won't connect to a no-auth server. When you add the connector, Claude bounces you to a login page; enter your WHOOP_MCP_SHARED_SECRET and it's authorized. Tokens are stateless HMAC-signed blobs, so nothing is stored and auth survives restarts.

Deploy (Render free tier — no monthly cost)

  1. Create a free Upstash Redis database (upstash.com) and copy its REST URL and REST token. This is where the rotating WHOOP token is persisted, so it survives restarts without a paid disk.
  2. Push this repo to GitHub and create a Render Blueprint from render.yaml (uses the free web plan).
  3. Set the secret env vars in the Render dashboard (all marked sync: false):
    • UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN — from step 1.
    • WHOOP_CLIENT_ID, WHOOP_CLIENT_SECRET — from the WHOOP dashboard.
    • WHOOP_REFRESH_TOKEN — the refresh_token field from your local ~/.whoop-mcp/tokens.json after uv run whoop-authorize.
  4. Render generates WHOOP_MCP_SHARED_SECRET for you — copy it from the dashboard.

Why Redis? WHOOP rotates refresh tokens on every use, so the rotated token must outlive restarts. The free Render web tier has no persistent disk, so the server stores the token blob in Upstash instead (see the token-backend section of auth.py). Locally, with no Redis env vars set, it falls back to a 0600 file in ~/.whoop-mcp/.

Cold starts: free web services sleep after ~15 min idle, so the first query after a lull takes ~30-60s and may need one retry. To keep it warm, ping /healthz every ~10 min from a free scheduler like cron-job.org.

Prefer a persistent disk instead? On a paid Starter plan you can drop the Upstash vars, add a disk: mounted at /data, and set WHOOP_MCP_HOME=/data.

Add the connector

In claude.ai → Settings → Connectors → Add custom connector, paste:

https://<your-app>.onrender.com/mcp

Claude opens a login page — enter your WHOOP_MCP_SHARED_SECRET to authorize. Once connected there it syncs to the desktop and mobile apps too.

Run the HTTP server locally to test first:

WHOOP_MCP_SHARED_SECRET=$(uuidgen) PORT=8080 uv run whoop-mcp-http
# health check: curl localhost:8080/healthz  ->  ok

How auth works

WHOOP uses OAuth 2.0 with rotating refresh tokens — each refresh returns a new refresh token and invalidates the old one. auth.py persists the new token after every refresh, so the connection stays alive indefinitely without re-authorizing. No secrets are stored in your Claude config; everything lives in ~/.whoop-mcp/.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选