WHOOP Connect for Grok Bot
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
WHOOP Connect for Grok Bot (Remote MCP on Cloudflare Workers)
Zero-database,
$0Cloudflare Workers remote MCP server connecting WHOOP API v2 to Grok Bot via Streamable HTTP (POST /mcp) + OAuth 2.1 — complete with an automated Grok Bot setup routine and one-click Cloudflare deploy.
Connect your personal WHOOP recovery, sleep, HRV, strain, and workout metrics directly to Grok Bot (or any remote MCP OAuth 2.1 client like Claude or ChatGPT) using your own free WHOOP Developer Sandbox app—no multi-user approval queue, no database, and no paid hosting required.
Why This Exists
Survives Grok Bot VM updates & resets: Your custom connector lives on your Grok account and your WHOOP tokens live inside Cloudflare's SQLite Durable Object—not on an ephemeral VM disk.
Hands-free setup via Grok Bot (Path 1): Includes a ready-to-import onboarding routine (
grokbot/ROUTINE_SETUP.md) where Grok Bot creates your free WHOOP Sandbox app, deploys the Worker to your free Cloudflare account, wires the Redirect URI, and hands you your/mcpURL.Atomic WHOOP v2 refresh token rotation: WHOOP invalidates the old
refresh_tokenimmediately on every refresh. A per-userTokenManagerSQLite Durable Object (new_sqlite_classes— runs on the $0 Cloudflare Free Plan) serializes refreshes with a single-flight mutex and compare-and-swap retry so parallel tool calls never race.Only 2 secrets required: Just
WHOOP_CLIENT_IDandWHOOP_CLIENT_SECRET. AES-256-GCM token encryption and session signing keys are derived automatically via Web CryptoHKDF-SHA256(noopensslcommands needed).Zero health data storage: Stateless live pass-through to WHOOP API v2—no health payloads ever touch KV, D1, R2, or logs.
Zero Auto Review popups: Every read tool is annotated
{ readOnlyHint: true, destructiveHint: false, idempotentHint: true }.
Related MCP server: WHOOP MCP Server
Architecture
Grok Bot (or Claude / ChatGPT)
│ Streamable HTTP (POST /mcp) + OAuth 2.1 (CIMD / DCR + PKCE S256)
▼
Cloudflare Worker ($0 Free Plan)
├── @cloudflare/workers-oauth-provider ──► OAUTH_KV (MCP grants & single-use state)
├── TokenManager SQLite Durable Object ──► AES-256-GCM sealed WHOOP tokens (atomic refresh lock)
└── Stateless MCP v2 Server (6 read-only tools)
│ Live HTTPS pass-through (zero health payloads stored)
▼
WHOOP Developer API v2 (https://api.prod.whoop.com/developer/v2)Quickstart — Path 1: Automated via Grok Bot Template (Recommended, ~2 min)
Turn this repo into a shareable Grok Bot template so any new user sets everything up in ~2 minutes with zero CLI commands:
Create your Grok Bot and paste:
Instructions / Role Prompt:
grokbot/ROLE_PROMPT.mdOn-Demand Routine (
Set up my WHOOP):grokbot/ROUTINE_SETUP.mdScheduled Routine (
Morning Recovery Briefing):grokbot/ROUTINE_MORNING.md
Type
"Set up my WHOOP"in chat. Grok Bot will:Open
developer.whoop.comand hand browser control to you to sign into WHOOP safely (passwords never enter chat), then create your free Sandbox app automatically.Clone this repo into its VM, open Cloudflare's 1-click login approval, deploy the Worker (
OAUTH_KV+ SQLiteTokenManagerauto-provisioned), uploadWHOOP_CLIENT_ID&WHOOP_CLIENT_SECRET, and update your WHOOP app's Redirect URI tohttps://<worker>.workers.dev/callback.Reply with your live MCP URL:
https://<worker>.workers.dev/mcp.
Add the Custom Connector in Grok Bot:
Open Connect apps → Add a custom connector → Remote HTTPS
Paste
https://<worker>.workers.dev/mcpand saveClick Sign in with WHOOP → Grant
Done! Ask "How am I doing today?"
Quickstart — Path 2: One-Click "Deploy to Cloudflare" Button (~3 min)
Prefer deploying directly from GitHub without the Grok Bot setup routine?
Create a free WHOOP Sandbox app:
Sign in at developer.whoop.com/dashboard → Create App (free Sandbox tier allows up to 10 users immediately).
Enter a temporary Redirect URI (e.g.
https://example.com/callback) and copy your Client ID and Client Secret.
Click the Deploy to Cloudflare button at the top of this README:
Paste
WHOOP_CLIENT_IDandWHOOP_CLIENT_SECRETinto the two secret fields and click Deploy.
Wire the Redirect URI & connect Grok Bot:
Open your deployed Worker URL (
https://whoop-mcp.<your-subdomain>.workers.dev).Click Copy next to the Redirect URI (
.../callback), paste it into your WHOOP Developer App settings, and click Save.Click Copy next to the MCP URL (
.../mcp), paste it into Grok Bot → Connect apps → Add a custom connector → Remote HTTPS, and click Sign in with WHOOP → Grant.
Authentication Modes
Mode A — OAuth 2.1 Broker (Default, Recommended)
Powered by @cloudflare/workers-oauth-provider:
Automatic RFC 9728 (
/.well-known/oauth-protected-resource/mcp) and RFC 8414 (/.well-known/oauth-authorization-server) discoverySupports Client ID Metadata Documents (CIMD) and Dynamic Client Registration (
POST /register) with mandatory PKCES256Single-use KV OAuth
statebound to anHttpOnly; SameSite=Laxbrowser cookie to block login-CSRF and callback replayUnauthenticated
POST /mcpreturns HTTP401withWWW-Authenticate: Bearer resource_metadata="..."so Grok Bot auto-triggers its sign-in card
Mode B — Static Bearer Token Fallback (Optional)
For Grok CLI, xAI Responses API, or custom header connector setups:
Add an optional Worker secret named
MCP_BEARER_TOKENin Cloudflare Dashboard → Workers → Settings → Variables and Secrets (ornpx wrangler secret put MCP_BEARER_TOKEN).Visit
https://<your-worker>.workers.dev/setuponce and click Connect WHOOP.Send
Authorization: Bearer <your MCP_BEARER_TOKEN>tohttps://<your-worker>.workers.dev/mcp.
MCP Tools (POST /mcp)
All 6 tools are stateless live pass-throughs annotated { readOnlyHint: true, destructiveHint: false, idempotentHint: true }. Bare dates (YYYY-MM-DD) passed for start/end are automatically normalized to ISO-8601 UTC bounds.
Tool | WHOOP API v2 Endpoint(s) | Description |
|
| Single-call daily snapshot (latest recovery, sleep, cycle strain, and recent workouts in parallel) |
|
| Basic profile and body measurements (height, weight, max HR) |
|
| Recovery scores (0–100), HRV RMSSD (ms), RHR, SpO2, skin temp ( |
|
| Sleep & nap sessions, stages, efficiency, performance %, sleep debt ( |
|
| Physiological cycles / day strain (0–21), kJ, avg/max HR ( |
|
| Workouts, sport, strain, kJ, HR zones ( |
Local Development & Testing
npm install
cp .dev.vars.example .dev.vars
# Add WHOOP_CLIENT_ID and WHOOP_CLIENT_SECRET to .dev.vars
npm run typecheck
npm test
npm run devFor local OAuth testing, add http://localhost:8787/callback as a Redirect URI in your WHOOP Developer App.
Privacy & Instant Disconnect
Use
https://<your-worker>.workers.dev/privacyas your WHOOP Developer App's Privacy Policy URL.Zero health data is stored on Cloudflare; only AES-256-GCM encrypted OAuth tokens live inside your private
TokenManagerDurable Object.Revoke access anytime via Disconnect & Wipe Tokens on
/(after signing in via/setup) or directly inside the WHOOP mobile app under Connected Apps.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Your WHOOP data in the assistant, read-only: recovery, sleep, strain, workouts, cycles and body meas
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
WHOOP MCP server for ChatGPT, Claude and any AI agent: get day summary, list recoveries, list sleeps, list workouts, list cycles and get membership in your own WHOOP account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to WHOOP yourself; Cotlet does not store your password and you need no WHOOP API key. About the official WHOOP API: WHOOP has an official developer API (v2, OAuth 2.0, read-only) but no official MCP server (checked 27 Oct 2026). The API returns recovery, sleep, cycles and workouts to an app you register in the WHOOP Developer Dashboard, and an app WHOOP has not approved serves 10 members. Setup and FAQ: https://cotlet.dev/integrations/whoop-api-mcp-server
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLMs to retrieve and analyze sleep, recovery, and physiological cycle data from the WHOOP API. It provides tools for accessing detailed metrics such as strain, HRV, and readiness scores through secure OAuth 2.0 authentication.414 npm1MIT
- AlicenseAqualityDmaintenanceEnables Claude to query personal WHOOP health data including recovery, sleep, strain, workouts, and profile via WHOOP's OAuth 2.0 REST API.6MIT
- AlicenseAqualityDmaintenanceEnables Claude, Cursor, or any MCP client to query your own recovery scores, sleep, strain cycles, workouts, profile, and body measurements through every WHOOP API v2 read endpoint. Tools return records exactly as WHOOP sends them, with paging and date-range filtering, and refresh tokens automatically after a one-time login.1111 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables read-only access to WHOOP health data through MCP clients, including recovery, HRV, sleep, strain, workouts, cycles, trends, and period comparisons, with resilient handling of outages, token refresh, and natural-language dates.MIT