The WHOOP MCP Server provides access to WHOOP fitness and health data through the Model Context Protocol standard, allowing integration with your applications using the complete WHOOP v2 API endpoints with secure OAuth 2.0 authentication.
Before installing the WHOOP MCP Server, ensure you have:
npm install
Client ID
and Client Secret
http://localhost:3000/callback
)Copy the example environment file and add your credentials:
cp env.example .env
Edit the .env
file with your WHOOP API credentials:
# WHOOP API Configuration
WHOOP_CLIENT_ID=your_client_id_here
WHOOP_CLIENT_SECRET=your_client_secret_here
WHOOP_REDIRECT_URI=http://localhost:3000/callback
# MCP Server Configuration
MCP_SERVER_PORT=3001
# Build the project
npm run build
# Run the MCP server
npm start
# Or run in development mode
npm run dev
The server uses OAuth 2.0 authentication with WHOOP. Follow these steps:
whoop-get-authorization-url
tool to get the OAuth URLAfter completing the WHOOP authorization in your browser, you'll be redirected to a URL containing an authorization code that looks like:
http://localhost:3000/callback?code=ABC123XYZ789&scope=read:recovery%20read:cycles...
Copy the code
parameter value (e.g., ABC123XYZ789
) and paste it directly in your chat with Claude to proceed.
whoop-get-user-profile
- Get basic user profile informationwhoop-get-user-body-measurements
- Get body measurements (height, weight, max heart rate)whoop-revoke-user-access
- Revoke user access tokenwhoop-get-cycle-by-id
- Get specific cycle data by IDwhoop-get-cycle-collection
- Get paginated list of cycleswhoop-get-sleep-for-cycle
- Get sleep data for a specific cyclewhoop-get-recovery-collection
- Get paginated recovery datawhoop-get-recovery-for-cycle
- Get recovery data for a specific cyclewhoop-get-sleep-by-id
- Get specific sleep record by IDwhoop-get-sleep-collection
- Get paginated sleep recordswhoop-get-workout-by-id
- Get specific workout record by IDwhoop-get-workout-collection
- Get paginated workout recordswhoop-get-authorization-url
- Get OAuth authorization URLwhoop-exchange-code-for-token
- Exchange authorization code for access tokenwhoop-refresh-token
- Refresh access tokenwhoop-set-access-token
- Set access token for API calls// First set your access token
await callTool('whoop-set-access-token', { accessToken: 'your_access_token' });
// Then get user profile
const profile = await callTool('whoop-get-user-profile', {});
const cycles = await callTool('whoop-get-cycle-collection', {
limit: 10,
start: '2024-01-01T00:00:00Z'
});
const sleepData = await callTool('whoop-get-sleep-collection', {
limit: 5,
end: '2024-01-31T23:59:59Z'
});
const workouts = await callTool('whoop-get-workout-collection', {
limit: 10,
start: '2024-01-01T00:00:00Z'
});
The server provides comprehensive data for:
Most collection endpoints support pagination with these parameters:
limit
: Number of records to return (max 25)start
: Start time filter (ISO 8601)end
: End time filter (ISO 8601)nextToken
: Token for next pageThe MCP server includes comprehensive error handling for:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "whoop" '{"command":"npx","args":["-y","whoop-mcp-server-claude"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"whoop": {
"command": "npx",
"args": [
"-y",
"whoop-mcp-server-claude"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"whoop": {
"command": "npx",
"args": [
"-y",
"whoop-mcp-server-claude"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect