by yuridivonis
Connects Whoop health data to Claude, providing real‑time recovery, sleep, strain and workout information through a self‑hosted MCP server.
Connects a user's Whoop wearable data to Claude (or any MCP‑compatible client) so the AI can answer questions about recovery, sleep, strain and workouts. The server runs under the user's control, fetches data live from the Whoop API, stores only encrypted tokens and sign‑in credentials, and protects the MCP endpoint with a password.
https://your-app.up.railway.app/callback).WHOOP_CLIENT_ID, WHOOP_CLIENT_SECRET, WHOOP_REDIRECT_URI, MCP_AUTH_PASSWORD, optionally ENCRYPTION_SECRET, etc.). Mount a persistent volume at /data to keep tokens across redeploys./mcp URL. Sign in using the password you set.get_auth_url tool, follow the link, log into Whoop, and grant the requested scopes. The server stores the encrypted refresh token./mcp is guarded by a password (OAuth 2.1 style)get_today, get_recovery_trends, get_sleep_analysis, get_strain_history, get_workouts, get_auth_urlQ: Does the server store any of my health data? A: No. Only encrypted Whoop refresh tokens and sign‑in credentials are persisted. All health data is fetched on demand and sent directly to the signed‑in client.
Q: How is the /mcp endpoint protected?
A: A password (MCP_AUTH_PASSWORD) is required to sign in. The sign‑in flow uses OAuth 2.1; failed attempts are rate‑limited.
Q: What if I change my Whoop client secret?
A: Update WHOOP_CLIENT_SECRET in the environment and run get_auth_url once to re‑authorize. If ENCRYPTION_SECRET isn’t set, existing tokens become unusable until re‑connected.
Q: Can I run the server locally without HTTPS?
A: The Whoop OAuth flow requires an HTTPS redirect URL. Use a tunneling service (e.g., ngrok or cloudflared) to expose a secure callback while running the server on http://localhost:3000.
Q: How do I upgrade from version 1.0.0?
A: Sync the fork with upstream, add MCP_AUTH_PASSWORD, redeploy, and re‑add the Claude connector. Old servers without authentication exposed data publicly.
Q: Which environment variables are mandatory?
A: WHOOP_CLIENT_ID, WHOOP_CLIENT_SECRET, WHOOP_REDIRECT_URI, and MCP_AUTH_PASSWORD (for HTTP mode). Optional: ENCRYPTION_SECRET, PUBLIC_URL, MCP_ALLOWED_REDIRECT_HOSTS, TRUST_PROXY, DB_PATH, PORT, MCP_MODE.
Q: Is this project affiliated with Whoop? A: No. It uses the public Whoop API under the developer terms and is not endorsed by Whoop.
A Model Context Protocol (MCP) server that connects your Whoop health data to Claude. You host it yourself and add it to Claude.ai as a custom connector. The server fetches your data from Whoop when Claude asks and keeps no copy, Claude signs in with a password you choose, and it receives only the answers to the tools it calls.
Built on the Whoop Developer API v2.
This is an independent open-source project. It uses the WHOOP API to access data from WHOOP products, and is not affiliated with, endorsed by, or sponsored by WHOOP.
| Tool | Description |
|---|---|
get_today |
Morning briefing with recovery, sleep, and strain |
get_recovery_trends |
Recovery patterns over time with HRV/RHR |
get_sleep_analysis |
Sleep trends: time asleep, performance, and efficiency |
get_strain_history |
Daily strain and calorie trends |
get_workouts |
Recent workouts with activity, duration, strain, heart rate, and calories |
get_auth_url |
Link to connect your Whoop account (works once, expires in 10 minutes) |
https://github.com/<you>/whoop-mcp-server/blob/main/PRIVACY.md. People see this link when they approve the app.https://your-app.up.railway.app/callbackread:recovery, read:cycles, read:sleep, and read:workout. The server doesn't use the others. The login also asks for offline, which lets the server renew its Whoop access without you logging in again; the dashboard doesn't list it.WHOOP_CLIENT_ID: Your Whoop app client IDWHOOP_CLIENT_SECRET: Your Whoop app client secretWHOOP_REDIRECT_URI: https://your-app.up.railway.app/callbackMCP_AUTH_PASSWORD: the password Claude will ask for when you connect. Generate one with openssl rand -base64 24 and keep it in your password manager. The server refuses to start without it (at least 16 characters).ENCRYPTION_SECRET (optional, recommended): generate one with openssl rand -base64 32. It encrypts your stored Whoop tokens, so rotating the Whoop client secret later won't disconnect your account./data. It holds the sign-ins and your encrypted Whoop tokens; without it, every redeploy signs Claude out and disconnects Whoop.https://your-app.up.railway.app/health to check it's running.https://your-app.up.railway.app/mcpMCP_AUTH_PASSWORD.Claude stays signed in across redeploys. Anyone without the password gets 401 Unauthorized from /mcp.
Other MCP clients
claude mcp add --transport http whoop https://your-app.up.railway.app/mcp, then /mcp in Claude Code to sign in./mcp address.MCP_ALLOWED_REDIRECT_HOSTS first.get_auth_url and gives you a link.1.1.0 puts a sign-in in front of /mcp. Version 1.0.0 had no authentication there, so any 1.0.0 server that worked with Claude over HTTP served its data to anyone who knew the URL. (Unmodified 1.0.0 also had a request-parsing bug that stopped Claude from connecting over HTTP at all; 1.1.0 fixes both.) To upgrade:
main branch).MCP_AUTH_PASSWORD in your Railway variables (see Setup, step 2). Without it, the new version won't start. That's deliberate.get_auth_url once to reconnect.read:profile and read:body_measurement. 1.1.0 no longer uses them.If your 1.0.0 server worked with Claude on a public URL, assume your data could have been read. As a precaution, rotate your client secret in the Whoop developer dashboard, update WHOOP_CLIENT_SECRET, and run get_auth_url once afterwards. Unless ENCRYPTION_SECRET is set, the stored Whoop tokens were encrypted with the old client secret. The server starts anyway and treats Whoop as disconnected until you reconnect.
/mcp only answers signed-in clients. Sign-in codes and refresh tokens work once and are stored as hashes; if one is ever used twice, the whole sign-in is revoked.MCP_ALLOWED_REDIRECT_HOSTS. The sign-in page shows where you'll return: only sign in if you started the connection yourself.MCP_AUTH_PASSWORD signs every client out.See SECURITY.md for the full security model and how to report a vulnerability privately, and PRIVACY.md for what a deployment stores and shares.
When you deploy this server, you register your own Whoop developer app, so you are the developer under WHOOP's API Terms of Use and responsible for following them. Among other things, unless the owner of the WHOOP data or applicable law allows it, the terms prohibit using WHOOP data to create, train, test, or improve AI or machine-learning models or systems (§4.2(c)). They also require you to report a security incident to WHOOP within 48 hours (§2.4). Read them before you deploy.
Each release is published as an image for amd64 and arm64 on GitHub's container registry. It runs the same server as the Railway setup above:
docker run -d --name whoop-mcp -p 3000:3000 -v whoop-data:/data \
-e WHOOP_CLIENT_ID=your_client_id \
-e WHOOP_CLIENT_SECRET=your_client_secret \
-e WHOOP_REDIRECT_URI=https://your-server.example.com/callback \
-e MCP_AUTH_PASSWORD=a-password-of-16-or-more-characters \
ghcr.io/yuridivonis/whoop-mcp-server:latest
WHOOP_REDIRECT_URI to that address's /callback, and connect Claude to its /mcp, as with Railway./callback. Add -e PUBLIC_URL=http://localhost:3000, so MCP clients on the same computer connect to http://localhost:3000/mcp.whoop-data volume, so restarts and upgrades keep you connected.To check that an image was built by this repository's release workflow, run gh attestation verify oci://ghcr.io/yuridivonis/whoop-mcp-server:latest --owner yuridivonis.
The server is also listed in the official MCP Registry as io.github.yuridivonis/whoop-mcp-server.
Requires Node.js 22 or later.
# Install dependencies
npm install
# Create .env file (npm run dev loads it)
cat > .env << EOF
WHOOP_CLIENT_ID=your_client_id
WHOOP_CLIENT_SECRET=your_client_secret
# Whoop needs an https address: use your tunnel's (see below)
WHOOP_REDIRECT_URI=https://your-tunnel.example.com/callback
MCP_AUTH_PASSWORD=choose-a-local-password
MCP_MODE=http
EOF
# Run in development mode (restarts on changes)
npm run dev
# Run the tests and the type check
npm test
npm run typecheck
Whoop's redirect URLs must be https (or an app scheme), so a server on your computer needs an https tunnel, for example cloudflared tunnel --url http://localhost:3000 or ngrok http 3000. Then:
WHOOP_REDIRECT_URI to the tunnel's /callback address./mcp address.Quick tunnels get a new address every time they start, so you'd repeat steps 1 to 3; a named tunnel keeps one address. The tunnel provider carries the traffic, including the tools' answers.
MCP_MODE=stdio runs the server for MCP clients that start it as a local command. It has no sign-in, because only the app that started it can reach it. It can't receive the Whoop login either, so connect Whoop once with the server in http mode and the same DB_PATH, stop it, then start the stdio server. Don't run both at once: Whoop replaces the refresh token on every use, so two servers sharing one database log each other out.
| Variable | Description | Default |
|---|---|---|
WHOOP_CLIENT_ID |
Whoop OAuth client ID | Required |
WHOOP_CLIENT_SECRET |
Whoop OAuth client secret | Required |
WHOOP_REDIRECT_URI |
OAuth callback URL | http://localhost:3000/callback |
MCP_AUTH_PASSWORD |
Password for the sign-in page that protects /mcp (16+ characters) |
Required in http mode |
PUBLIC_URL |
Public address of the server, if it differs from WHOOP_REDIRECT_URI's. Claude must connect to PUBLIC_URL/mcp. |
Origin of WHOOP_REDIRECT_URI |
ENCRYPTION_SECRET |
Key for encrypting stored Whoop tokens | WHOOP_CLIENT_SECRET |
MCP_ALLOWED_REDIRECT_HOSTS |
Extra web clients allowed to receive sign-in codes, as host names separated by commas (e.g. app.example.com). Claude, ChatGPT, and desktop apps on your own computer (local addresses, and Cursor, VS Code, and Windsurf links) are always allowed. |
None |
TRUST_PROXY |
Proxies allowed to report the client's IP (used by the sign-in rate limits): a hop count, false, or addresses/subnets |
1 on Railway, otherwise false |
DB_PATH |
SQLite database path (sign-ins and encrypted Whoop tokens) | ./whoop.db |
PORT |
HTTP server port | 3000 |
MCP_MODE |
http for a server, or stdio for an MCP client that starts it as a local command (see Running on Your Own Computer) |
http |
┌─────────────────────────────────────────────────┐
│ Claude.ai (custom connector) │
│ "How did I sleep last night?" │
└────────────────────────┬────────────────────────┘
│ signs in once (OAuth 2.1),
│ then calls tools on /mcp
▼
┌─────────────────────────────────────────────────┐
│ Whoop MCP Server │
│ │
│ ┌─────────────┐ ┌──────────────────┐ │
│ │ Sign-in │─────►│ SQLite Database │ │
│ │ (OAuth 2.1) │ │ - sign-ins │ │
│ └─────────────┘ │ - Whoop tokens │ │
│ ┌─────────────┐ │ (encrypted) │ │
│ │ MCP tools │ └──────────────────┘ │
│ └──────┬──────┘ ▲ │
│ ▼ │ │
│ ┌─────────────┐ │ │
│ │ Whoop API │─── tokens ────┘ │
│ │ Client │ (no health data is stored) │
│ └─────────────┘ │
└─────────┬───────────────────────────────────────┘
│ Whoop OAuth + API v2, live on every call
▼
┌─────────────────────────────────────────────────┐
│ Whoop API │
└─────────────────────────────────────────────────┘
GET /v2/cycle - Physiological cycles (strain data)GET /v2/recovery - Recovery scoresGET /v2/activity/sleep - Sleep recordsGET /v2/activity/workout - Workout recordsIssues and pull requests are welcome. Before opening a pull request, run npm test and npm run typecheck; CI runs both, along with a Docker smoke test.
See CHANGELOG.md.
MIT - See LICENSE for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by headroomlabs-ai
Compress tool outputs, logs, files, RAG chunks, and conversation history before they reach the LLM, keeping answers identical while saving up to 95% of tokens for JSON payloads.
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
{
"mcpServers": {
"whoop-mcp-server": {
"command": "npx",
"args": [
"-y",
"whoop-mcp-server"
],
"env": {
"WHOOP_CLIENT_ID": "<YOUR_WHOOP_CLIENT_ID>",
"WHOOP_CLIENT_SECRET": "<YOUR_WHOOP_CLIENT_SECRET>",
"WHOOP_REDIRECT_URI": "https://your-app.example.com/callback",
"MCP_AUTH_PASSWORD": "<YOUR_PASSWORD_16+_CHARS>",
"ENCRYPTION_SECRET": "<OPTIONAL_ENCRYPTION_KEY>",
"PUBLIC_URL": "https://your-app.example.com",
"MCP_ALLOWED_REDIRECT_HOSTS": "app.example.com,otherhost.com",
"TRUST_PROXY": "1",
"DB_PATH": "./whoop.db",
"PORT": "3000",
"MCP_MODE": "http"
}
}
}
}claude mcp add whoop-mcp-server npx -y whoop-mcp-server