-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
The package is not yet on PyPI (the name-clash story lives in #34), so install from a clone. Python 3.13 or 3.14 is required.
git clone https://github.com/kurok/whoopmcp
cd whoopmcp
python3.13 -m venv .venv
.venv/bin/pip install -e . # runtime only
.venv/bin/pip install -e ".[keyring]" # optional: store the token in the OS keychainThe entry point is .venv/bin/whoopmcp. Use that absolute path everywhere
below — MCP clients launch the server as a subprocess with no shell profile,
so PATH tricks don't apply.
At developer.whoop.com, create an app and note the client id and secret.
-
Redirect URI: must be
https://…or a custom scheme such aswhoopmcp://callback. Plainhttp://, includinghttp://localhost, is rejected by WHOOP's dashboard — and by this server's own config check, so a mistake fails at startup, not mid-login. -
Scopes: request
offline(or no refresh token is issued and the grant dies hourly). The read scopes map 1:1 to tools;read:profileis the one scope carrying directly identifying information and onlyget_profileneeds it.
Required: WHOOP_CLIENT_ID, WHOOP_CLIENT_SECRET, WHOOP_REDIRECT_URI.
The common optional knobs (full table in docs/SETUP.md):
| Variable | Default | Meaning |
|---|---|---|
WHOOPMCP_SCOPES |
all six read scopes + offline
|
space-separated OAuth scopes |
WHOOPMCP_TOKEN_BACKEND |
file |
file, encrypted-file, or keyring
|
WHOOPMCP_STATE_DIR |
~/.local/state/whoopmcp |
token file + cache location |
WHOOPMCP_CACHE |
false |
opt into the persistent local store |
WHOOPMCP_TRANSPORT |
stdio |
stdio or streamable-http
|
Malformed numeric values fail at startup with the variable named; the outbound rate limits and timeout must be positive, the port 1–65535.
{
"mcpServers": {
"whoop": {
"command": "/path/to/whoopmcp/.venv/bin/whoopmcp",
"env": {
"WHOOP_CLIENT_ID": "your-client-id",
"WHOOP_CLIENT_SECRET": "your-client-secret",
"WHOOP_REDIRECT_URI": "whoopmcp://callback",
"WHOOPMCP_SCOPES": "read:recovery read:sleep read:cycles read:workout read:body_measurement offline"
}
}
}
}claude mcp add whoop /path/to/whoopmcp/.venv/bin/whoopmcp \
-e WHOOP_CLIENT_ID=... -e WHOOP_CLIENT_SECRET=... \
-e WHOOP_REDIRECT_URI=whoopmcp://callbackYour client secret sits in a plaintext client config either way — treat the file like an SSH key.
.venv/bin/whoopmcp doctordoctor reports configuration, credentials, store and sync state as one
honest sentence each. Then either run .venv/bin/whoopmcp login (terminal
OAuth flow — preferred) or ask your MCP client to call whoop_login and
paste the callback URL into whoop_complete_login.
-
ConfigErrornaming a variable — fix that variable; the server refuses to start on a malformed value rather than limping. -
no WHOOP token stored— you haven't logged in yet; runwhoopmcp login. -
Windows — POSIX file modes don't protect the token file there; use
WHOOPMCP_TOKEN_BACKEND=keyring(the server warns about exactly this).