npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

whoop-mcp-server

v0.0.5

Published

MCP server for the WHOOP Developer Platform API

Readme

WHOOP MCP Server

An MCP (Model Context Protocol) server that exposes the WHOOP Developer Platform API, enabling AI assistants to access your physiological data — recovery, sleep, strain, and workouts.

Supported Tools

Authentication Tools (2)

| Tool | Description | |---|---| | whoop_check_auth | Check authentication status and token expiry | | whoop_authenticate | Start OAuth flow — returns a URL to authorize in browser |

Raw API Tools (12)

| Tool | Description | |---|---| | get_profile | User profile (name, email) | | get_body_measurements | Height, weight, max heart rate | | revoke_oauth_access | Revoke OAuth token (destructive) | | list_cycles | List physiological cycles with strain data | | get_cycle | Get a specific cycle by ID | | list_recoveries | List recovery scores (HRV, RHR, SpO2) | | get_recovery_for_cycle | Get recovery for a specific cycle | | list_sleeps | List sleep activities with stage data | | get_sleep | Get a specific sleep by ID | | get_sleep_for_cycle | Get sleep for a specific cycle | | list_workouts | List workouts with HR zones | | get_workout | Get a specific workout by ID |

Aggregation Tools (5)

| Tool | Description | |---|---| | get_today_summary | Unified view of today's strain, recovery, sleep, and workouts | | get_recent_health_summary | Multi-day averages and trends (recovery, HRV, sleep, strain) | | compare_recovery_and_sleep | Correlation between sleep quality and recovery | | get_training_load_summary | Training volume, strain totals, top sports | | get_sleep_performance_summary | Sleep duration, efficiency, stage breakdown |

Prerequisites

  1. A WHOOP membership with an active device
  2. A developer application at developer.whoop.com
  3. Node.js >= 18
  4. pnpm

Setup

# Install dependencies
pnpm install

# Build
pnpm build

Configuration

Copy .env.example to .env and fill in your WHOOP developer app credentials:

cp .env.example .env

| Variable | Required | Default | |---|---|---| | WHOOP_CLIENT_ID | Yes | — | | WHOOP_CLIENT_SECRET | Yes | — | | WHOOP_REDIRECT_URI | No | http://localhost:3000/callback |

OAuth Setup

Authentication is handled automatically. When you ask the AI to access your WHOOP data and no token is found, it will call the whoop_authenticate tool, which returns an authorization URL. Click the link, authorize in your browser, and you're done.

You can also authenticate manually via the CLI:

pnpm auth

Tokens are saved to ~/.whoop-mcp/tokens.json with restricted file permissions and refresh automatically. WHOOP rotates both access and refresh tokens on each refresh.

Running the Server

pnpm start

Or directly:

node dist/index.js

MCP Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "whoop": {
      "command": "npx",
      "args": ["-y", "whoop-mcp-server"],
      "env": {
        "WHOOP_CLIENT_ID": "your_client_id",
        "WHOOP_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Claude Code (CLI)

Add to .claude/settings.json or ~/.claude/settings.json:

{
  "mcpServers": {
    "whoop": {
      "command": "npx",
      "args": ["-y", "whoop-mcp-server"],
      "env": {
        "WHOOP_CLIENT_ID": "your_client_id",
        "WHOOP_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Development

# Watch mode for TypeScript
pnpm dev

# Run tests
pnpm test

# Watch tests
pnpm test:watch

Known Limitations

  • Read-only: The WHOOP API only supports reading data, not writing
  • Single user: Designed for personal use with one WHOOP account
  • No webhooks: Push notifications require a public HTTP server, out of scope
  • Sport IDs: Workout sport types are returned as numeric IDs (see WHOOP docs for mapping)
  • Rate limits: WHOOP enforces API rate limits; the server returns friendly error messages with reset times

Extending

To add a new tool:

  1. Add the API method to src/client/whoop-client.ts
  2. Create the tool function in the appropriate src/tools/*.ts file
  3. Register it in src/server.ts with a Zod schema
  4. Add tests in tests/