convez.ai
MCP ServerIntegração & APIsAvançado
tgf-between-your-legs

WHOOP MCP Server

tgf-between-your-legs/whoop-mcp

Sincronize dados WHOOP para Postgres e questione Claude sobre suas métricas

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP auto-hospedado que sincroniza seus dados de biometria WHOOP em Postgres e os expõe para Claude (desktop, mobile, web) como conector remoto. Analise recuperação, sono, esforço e variabilidade cardíaca com privacidade total — seus dados ficam em infraestrutura sob seu controle.

Instalação

$npx convez-ai tgf-between-your-legs/whoop-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Analisar tendências de recuperação e sono ao longo do tempo
  • Correlacionar métricas biométricas com mudanças de treino, suplementação ou viagens
  • Rastrear estado subjetivo diário e criar análises comparativas antes/depois
  • Acessar dados de saúde pessoais via Claude em qualquer dispositivo sem enviar para servidores terceirizados

Veredito

Solução robusta para quem quer autonomia total sobre dados biométricos. Requer servidor próprio com Docker, domínio e conhecimento técnico, mas entrega privacidade genuína e integração profunda com Claude. Ideal para health-tech builders e quantified-self enthusiasts.

README

A tradução para o português deste README ainda está na fila.

whoop-mcp

A self-hosted MCP server that syncs your WHOOP data into your own Postgres and exposes it to Claude — desktop, mobile, and web — as a remote connector. Ask Claude about your recovery, sleep, strain, and HRV, and correlate them against anything (supplements, training blocks, travel, life changes) from any device.

Personal, single-user, privacy-first: your biometric data lives on infrastructure you control. Not affiliated with or endorsed by WHOOP. For informational use only — not medical advice.

Features

  • 🔄 Automatic background sync of recovery, sleep, workouts, and cycles (WHOOP API v2)
  • 🗄️ Data stored in your own Postgres — idempotent upserts, full raw payloads retained
  • 🔌 Remote MCP connector with OAuth 2.1 + PKCE — works on Claude phone, desktop, and web
  • 🔐 Single-owner access; the WHOOP refresh token is encrypted at rest
  • 📊 Tools for raw data, weekly trends, and before/after comparisons around a date
  • 📝 Writable compound/supplement event log — pivot analyses on the day you started something, and reconstruct your active protocol at any past date
  • 🧠 Writable subjective daily-state log (mood, energy, focus, calm, libido, sleep onset, AM temp…) as a first-class outcome variable
  • 🐳 One-command Docker deploy with automatic HTTPS via Caddy

How it works

WHOOP API ──(cron pull)──▶ whoop-mcp ──▶ Postgres (your data)
                              │
Claude (phone/desktop/web) ───┘
   └─HTTPS─▶ Caddy (auto-TLS) ─▶ whoop-mcp ─ OAuth 2.1 + PKCE

Prerequisites

  • A server with Docker + Docker Compose, reachable on ports 80 and 443
  • A domain or subdomain you can point at that server
  • A free WHOOP developer app (5 minutes to create)

Quick start

1. Create a WHOOP developer app

At developer.whoop.com, create an app:

  • Redirect URI: https://YOUR_DOMAIN/auth/whoop/callback
  • Scopes: read:recovery, read:sleep, read:workout, read:cycles, read:profile, read:body_measurement, and offline (required for a refresh token)
  • Copy the Client ID and Client Secret

2. Configure

git clone https://github.com/tgf-between-your-legs/whoop-mcp.git
cd whoop-mcp
cp .env.example .env
# edit .env: PUBLIC_DOMAIN, POSTGRES_PASSWORD, WHOOP_CLIENT_ID/SECRET,
#            OWNER_EMAIL/OWNER_PASSWORD, TOKEN_SIGNING_SECRET (openssl rand -hex 32)

3. Point DNS

Create an A record for YOUR_DOMAIN pointing to your server's IP, and make sure ports 80 and 443 are open. Caddy fetches a TLS certificate automatically on first start.

4. Launch

docker compose up -d --build
curl https://YOUR_DOMAIN/health      # {"status":"ok","whoop_authorized":false}

5. Authorize WHOOP (once)

Open https://YOUR_DOMAIN/auth/whoop/start, sign in with your OWNER_EMAIL / OWNER_PASSWORD, and approve on WHOOP. A historical backfill (SYNC_INITIAL_BACKFILL_DAYS, default 180) starts automatically.

6. Connect Claude (once)

In Claude → Settings → Connectors → Add custom connector → URL: https://YOUR_DOMAIN/mcp. Complete the OAuth sign-in with the same owner credentials. Done — now ask Claude:

"What's my recovery trend over the last month?" "Compare my HRV 30 days before vs after 2026-04-01."

Tools

ToolDescription
whoop_recoveryDaily recovery score, HRV, resting HR, SpO2, skin temp
whoop_sleepSleep performance/efficiency, stages, respiratory rate, disturbances
whoop_workoutsStrain, average/max HR, kilojoules, distance per workout
whoop_cyclesDaily strain cycles
whoop_recovery_trendWeekly averages of recovery, HRV, resting HR
whoop_compare_around_dateMean of any metric N days before vs after a pivot date
whoop_data_statusRow counts, date coverage, and last sync time per dataset

Compound / supplement event log

A writable log of compound/supplement events (start, stop, dose_change, one_time). The active protocol on any date is computed by replaying events, so corrections and retroactive logging are trivial. Compound names are free-text (normalized to lowercase, fuzzy-matched on read). Dates accept ISO or relative phrases (today, yesterday, 3 days ago, last monday). All writes go through Claude chat and are recorded in an append-only audit table.

ToolDescription
compound_log_addLog an event (start / stop / dose_change / one_time)
compound_log_queryList events by date range, compound (fuzzy), class, or type
compound_log_activeActive protocol on a given date — dose, start date, days on dose
compound_log_updateEdit an event by id
compound_log_deleteDelete an event by id (two-step confirm)
whoop_compare_around_compound_eventCompare a WHOOP metric before/after a logged event

Subjective state tracking

A writable daily log of subjective state, treated as a first-class outcome variable alongside WHOOP physiology — query, trend, and pivot it around compound events the same way. One row per day (upsert by date: provided fields write, omitted fields preserve). Likert fields are 1–10 (5 = neutral baseline, 10 = maximal) and every field is optional, so partial entries are fine. calm_index is the canonical tracker for the "calm, methodical, strategic" phenotype goal.

ToolDescription
subjective_log_addUpsert a day's state (mood, energy, focus, anxiety, libido, motivation, irritability, calm_index, jaw_tension, sleep_onset_min, am_core_temp_c, notes)
subjective_log_queryList entries in a date range
subjective_log_recentLast N entries (default 7)
subjective_log_trendPer-field mean / median / stddev / min / max + boolean counts
subjective_log_updateEdit an entry by id
subjective_log_deleteDelete an entry by id
subjective_compare_around_compound_eventCompare a subjective metric before/after a logged compound event

Configuration

VariableDefaultNotes
PUBLIC_DOMAIN—Domain Claude/WHOOP reach you at (compose derives the rest)
POSTGRES_PASSWORD—Bundled Postgres password
WHOOP_CLIENT_ID / WHOOP_CLIENT_SECRET—From your WHOOP developer app
OWNER_EMAIL / OWNER_PASSWORD—The single user allowed to authorize + connect
TOKEN_SIGNING_SECRET—openssl rand -hex 32; keep stable
WHOOP_SCOPESrecovery/sleep/workout/cycles/profile/body_measurement/offline
DB_SCHEMAwhoopSchema used inside the database
SYNC_CRON0 */3 * * *Sync cadence (every 3h)
SYNC_LOOKBACK_DAYS14Re-pull window each run
SYNC_INITIAL_BACKFILL_DAYS180History pulled on first authorization
TZUTCServer timezone for relative dates in the compound log (e.g. America/New_York)

Security & privacy

  • The /mcp endpoint always requires a valid bearer token (OAuth 2.1 + PKCE).
  • Only OWNER_EMAIL can authorize WHOOP or connect Claude.
  • The WHOOP refresh token is AES-256-GCM encrypted at rest.
  • All your data stays on your server. Revoke anytime from WHOOP's connected-apps settings. A privacy policy is served at https://YOUR_DOMAIN/privacy.

Advanced

Reuse an existing Postgres instead of the bundled one: run sql/00-provision-role.sql once, set DATABASE_URL in .env, and remove the db service from docker-compose.yml.

Run without Docker: npm ci && npm run build && npm start with all env vars set (including PUBLIC_BASE_URL, WHOOP_REDIRECT_URI, DATABASE_URL). Put it behind any TLS reverse proxy that forwards to PORT (default 3002).

License

MIT

Ver o original no GitHub

Bom para

Relacionados