whoop-tracker-mcp-server

whoop-tracker-mcp-server

Integrates with Whoop API v2 to access user profile, sleep, recovery, cycles, and workout data via natural language, with OAuth2 authentication and automatic token refresh.

Category
访问服务器

README

Whoop MCP Server

A lightweight MCP (Model Context Protocol) server for integrating with the Whoop API v2. Built for use with Claude Desktop and other MCP clients.

Features

  • 🔐 OAuth 2.0 authentication with Whoop
  • 🔄 Automatic token refresh
  • 📊 Access to all major Whoop data endpoints:
    • User profile and body measurements
    • Sleep, recovery, and cycle data
    • Workout information
  • 🐳 Docker support for easy deployment
  • 💾 Persistent token storage

Quick Start

Prerequisites

  • Node.js >= 22.0.0 (for Method 1) OR Docker (for Method 2)
  • pnpm >= 10.0.0 (for Method 1 only)
  • Whoop Developer Account

Setup for Claude Desktop

Choose one of the two methods below to integrate with Claude Desktop. The MCP server runs as part of Claude Desktop - you don't need to start it separately.

Method 1: Using Node.js

  1. Clone and install:

    git clone https://github.com/alacore/whoop-tracker-mcp-server.git
    cd whoop-tracker-mcp-server
    pnpm install
    
  2. Build the server:

    pnpm run build
    
  3. Configure Claude Desktop - see Claude Desktop Configuration section below

Method 2: Using Docker

  1. Clone the repository:

    git clone https://github.com/alacore/whoop-tracker-mcp-server.git
    cd whoop-tracker-mcp-server
    
  2. Build Docker image:

    docker build -t whoop-mcp .
    
  3. Configure Claude Desktop - see Claude Desktop Configuration section below

Development Mode (Optional)

For testing the MCP server independently or during development:

  1. Configure environment:

    cp .env.example .env
    

    Edit .env with your Whoop OAuth credentials:

    WHOOP_CLIENT_ID=your_whoop_client_id
    WHOOP_CLIENT_SECRET=your_whoop_client_secret
    WHOOP_REDIRECT_URI=http://localhost:3000/callback
    WHOOP_SCOPES=offline read:profile read:body_measurement read:cycles read:recovery read:sleep read:workout
    
  2. Run in development mode:

    pnpm run dev
    

    Note: This runs the server standalone for testing. For actual use with Claude Desktop, follow the configuration instructions below.

Usage

Claude Desktop Configuration

Method 1: Direct Node.js Execution

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "whoop": {
      "command": "node",
      "args": ["/path/to/whoop-tracker-mcp-server/dist/mcp-standalone.js"],
      "env": {
        "WHOOP_CLIENT_ID": "your_client_id",
        "WHOOP_CLIENT_SECRET": "your_client_secret",
        "WHOOP_REDIRECT_URI": "http://localhost:3000/callback",
        "WHOOP_SCOPES": "offline read:profile read:body_measurement read:cycles read:recovery read:sleep read:workout"
      }
    }
  }
}

Prerequisites:

  • Node.js >= 22.0.0 installed
  • Built server (pnpm run build)
  • Replace /path/to/whoop-tracker-mcp-server with your actual project path

Note: The offline scope in WHOOP_SCOPES is required to receive a refresh token during the OAuth2 flow, enabling automatic token renewal without re-authentication.

Method 2: Docker Container

First, build the Docker image:

# Build the Docker image
docker build -t whoop-mcp .

Then add to your Claude Desktop configuration:

{
  "mcpServers": {
    "whoop": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "WHOOP_CLIENT_ID=your_client_id",
        "-e",
        "WHOOP_CLIENT_SECRET=your_client_secret",
        "-e",
        "WHOOP_REDIRECT_URI=http://localhost:3000/callback",
        "-e",
        "WHOOP_SCOPES=offline read:profile read:body_measurement read:cycles read:recovery read:sleep read:workout",
        "-v",
        "${HOME}/.whoop-mcp:/home/node/.whoop-mcp",
        "whoop-mcp"
      ]
    }
  }
}

Prerequisites:

  • Docker installed and running
  • Built Docker image (docker build -t whoop-mcp .)

Notes:

  • The -v flag mounts a local directory for persistent token storage across container restarts. First create the directory on your host machine (e.g., mkdir -p ~/.whoop-mcp), then mount it using the -v flag - this is where auth tokens will be stored
  • The offline scope in WHOOP_SCOPES is required to receive a refresh token during the OAuth2 flow, enabling automatic token renewal without re-authentication

Testing Your Setup

To test either configuration:

  1. Restart Claude Desktop after updating the configuration
  2. In Claude, use the Whoop tools:
    • Start with whoop_auth_url to begin authentication
    • Follow the OAuth flow to authorize
    • Use other tools like whoop_get_profile to verify access

Available MCP Tools

Authentication

  • whoop_auth_url - Generate OAuth authorization URL
  • whoop_exchange_token - Exchange auth code for access token
  • whoop_refresh_token - Refresh expired access token

Data Access

  • whoop_get_profile - Get user profile
  • whoop_get_body_measurement - Get body measurements
  • whoop_get_cycles - Get physiological cycles
  • whoop_get_recovery - Get recovery data
  • whoop_get_sleep - Get sleep data
  • whoop_get_workouts - Get workout data

Authentication Flow

  1. Use whoop_auth_url to get authorization URL
  2. Open URL in browser and authorize
  3. Copy the code parameter from callback URL
  4. Use whoop_exchange_token with the code
  5. Tokens are automatically saved and refreshed

Development

# Development with hot reload
pnpm run dev

# Build for production
pnpm run build

# Run built version
pnpm start

License

MIT

推荐服务器

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

官方
精选