WHOOP MCP Server

WHOOP MCP Server

Gives Claude access to your WHOOP health data including recovery, sleep, workouts, cycles, body measurements, and profile via the WHOOP Developer API.

Category
访问服务器

README

WHOOP MCP Server

A Model Context Protocol server that gives Claude access to your WHOOP health data via the WHOOP Developer API (API v2).

Tools

Tool Description
authenticate Start the OAuth 2.0 flow — call this once to connect your WHOOP account
get_recovery Latest recovery score, HRV, resting heart rate, SpO2, skin temperature
get_sleep Sleep duration, efficiency, stage breakdown, disturbances, respiratory rate
get_workouts Recent workouts with strain, sport type, HR zones, calories
get_cycles Physiological cycles (days) with strain and recovery summary
get_body_measurements Height, weight, and max heart rate
get_profile Basic profile (name, email)

Parameters: the data tools (get_recovery, get_sleep, get_workouts, get_cycles) accept optional filters:

  • limit — number of records to return (default 1 for recovery/sleep, 5 for workouts/cycles; max 25)
  • start_date / end_date — ISO 8601 timestamps, e.g. 2024-01-01T00:00:00.000Z
  • include_napsget_sleep only; include nap records (default false)

get_body_measurements and get_profile take no parameters.

Prerequisites

  • Node.js 18 or later
  • A WHOOP Developer account and OAuth app

Setup

1. Create a WHOOP Developer App

  1. Go to https://developer.whoop.com/ and sign in.
  2. Create a new application.
  3. Add http://localhost:8080/callback as a Redirect URI (or use a custom port — just keep it consistent with WHOOP_REDIRECT_URI).
  4. Enable the following scopes on the app — the server requests all of them, and data tools will return empty or fail if any are missing:
    • offline (required — grants the refresh token so you only authenticate once)
    • read:recovery
    • read:sleep
    • read:workout
    • read:cycles
    • read:body_measurement
    • read:profile
  5. Copy your Client ID and Client Secret.

2. Install and build

git clone <this-repo>
cd whoop-mcp
npm install
npm run build

3. Configure environment variables

cp .env.example .env

Edit .env:

WHOOP_CLIENT_ID=your_client_id_here
WHOOP_CLIENT_SECRET=your_client_secret_here
WHOOP_REDIRECT_URI=http://localhost:8080/callback

Security note: .env is never committed. Tokens are stored in ~/.whoop-mcp-tokens.json with 600 permissions (owner read/write only).

4. Add to Claude's MCP configuration

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "whoop": {
      "command": "node",
      "args": ["/absolute/path/to/whoop-mcp/dist/index.js"],
      "env": {
        "WHOOP_CLIENT_ID": "your_client_id_here",
        "WHOOP_CLIENT_SECRET": "your_client_secret_here",
        "WHOOP_REDIRECT_URI": "http://localhost:8080/callback"
      }
    }
  }
}

You can either set the env vars here or rely on a .env file in the project root (loaded by dotenv).

Claude Code (.claude/settings.json or via claude mcp add)

claude mcp add whoop node /absolute/path/to/whoop-mcp/dist/index.js \
  -e WHOOP_CLIENT_ID=your_client_id \
  -e WHOOP_CLIENT_SECRET=your_client_secret \
  -e WHOOP_REDIRECT_URI=http://localhost:8080/callback

Or manually in .claude/settings.json:

{
  "mcpServers": {
    "whoop": {
      "command": "node",
      "args": ["/absolute/path/to/whoop-mcp/dist/index.js"],
      "env": {
        "WHOOP_CLIENT_ID": "...",
        "WHOOP_CLIENT_SECRET": "...",
        "WHOOP_REDIRECT_URI": "http://localhost:8080/callback"
      }
    }
  }
}

5. Authenticate

Once the server is running in Claude, call the authenticate tool:

You: Use the authenticate tool to connect my WHOOP account.

Claude will display an authorization URL. Open it in your browser, approve access, and the tokens will be saved automatically to ~/.whoop-mcp-tokens.json.

Tokens refresh automatically — you only need to authenticate once.

Example prompts

What was my recovery score this morning?
Show me my last 7 days of sleep data.
How has my HRV trended over the past month?
What workouts did I do this week and what was my strain?
What are my body measurements on WHOOP?

Token storage

  • Tokens are stored in ~/.whoop-mcp-tokens.json (or the path in WHOOP_TOKEN_FILE).
  • The file is created with 0600 permissions so only your user can read it.
  • Access tokens are refreshed automatically 60 seconds before expiry using the stored refresh token.

Development

# Compile TypeScript in watch mode
npm run dev

# Run directly (after building)
npm start

Troubleshooting

Problem Fix
Missing required environment variable Ensure WHOOP_CLIENT_ID and WHOOP_CLIENT_SECRET are set in .env or the MCP config env block
Not authenticated Call the authenticate tool and complete the browser flow
Port 8080 already in use Change WHOOP_REDIRECT_URI to use a different port (e.g. http://localhost:9090/callback) and update your WHOOP app's redirect URI list
Token refresh fails Delete ~/.whoop-mcp-tokens.json and re-authenticate

推荐服务器

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

官方
精选