modelscope·@JedPattersonn/whoop-mcp
暂无描述。
A Model Context Protocol (MCP) server for accessing Whoop fitness data. Integrate your WHOOP biometric data into Claude, LLMs, and other MCP-compatible applications.
git clone https://github.com/yourusername/whoop-mcp.git
cd whoop-mcp
.env file with your WHOOP credentials:echo "WHOOP_EMAIL=your-email@example.com" > .env
echo "WHOOP_PASSWORD=your-password" >> .env
echo "PORT=3000" >> .env
Or set as environment variables:
export WHOOP_EMAIL='your-email@example.com'
export WHOOP_PASSWORD='your-password'
bun install
bun run start
Or for development with hot reload:
bun run dev
The server will run on http://localhost:3000/mcp by default.
.env file with your credentials:cp .env.example .env
# Edit .env with your actual credentials
docker build -t whoop-mcp .
docker run -d \
--name whoop-mcp \
whoop-mcp
The --env-file .env flag automatically loads all environment variables from your .env file.
docker logs -f whoop-mcp
docker stop whoop-mcp
The Docker image is based on the official Bun Alpine image. The container includes health checks to monitor the server's status.
This server is configured to work with Smithery, a platform for deploying MCP servers. When deployed on Smithery:
Configuration via Query Parameters: Smithery passes your credentials as query parameters to the /mcp endpoint (defined in smithery.yaml):
whoopEmail - Your Whoop account emailwhoopPassword - Your Whoop account passwordmcpAuthToken - Optional authentication tokenAutomatic Configuration: The server automatically extracts these from query parameters when running on Smithery, so you don't need to set environment variables manually.
Deploy Button: Use the Railway deploy button above for quick deployment, or follow Smithery's documentation for other deployment options.
The smithery.yaml file in the repository root defines the configuration schema that Smithery uses to collect your credentials securely.
The server supports two methods for providing credentials:
Query Parameters (used by Smithery): Pass credentials as query parameters to the /mcp endpoint
whoopEmail - Your Whoop account emailwhoopPassword - Your Whoop account passwordmcpAuthToken - Optional authentication tokenEnvironment Variables (used for local/Docker deployment):
| Variable | Required | Default | Description |
|---|---|---|---|
WHOOP_EMAIL | Yes | - | Your Whoop account email |
WHOOP_PASSWORD | Yes | - | Your Whoop account password |
MCP_AUTH_TOKEN | No | - | Optional authentication token for MCP requests |
PORT | No | 3000 | Server port |
The server will check query parameters first, then fall back to environment variables if not provided.
To protect your MCP server from unauthorized access, you can set the MCP_AUTH_TOKEN environment variable. When set, all requests to the /mcp endpoint must include a matching Bearer token:
export MCP_AUTH_TOKEN='your-secret-token-here'
Or add it to your .env file:
echo "MCP_AUTH_TOKEN=your-secret-token-here" >> .env
Clients must then include the token in the Authorization header:
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer your-secret-token-here" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Note: If MCP_AUTH_TOKEN is not set, the server will accept all requests (useful for local development).
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"whoop": {
"command": "bun",
"args": ["run", "/absolute/path/to/whoop-mcp/index.ts"],
"env": {
"WHOOP_EMAIL": "your-email@example.com",
"WHOOP_PASSWORD": "your-password"
}
}
}
}
{
"mcpServers": {
"whoop": {
"command": "bun",
"args": ["run", "/absolute/path/to/whoop-mcp/index.ts"],
"env": {
"WHOOP_EMAIL": "your-email@example.com",
"WHOOP_PASSWORD": "your-password",
"MCP_AUTH_TOKEN": "your-secret-token-here"
}
}
}
}
Replace /absolute/path/to/whoop-mcp/ with the actual path to this directory.
The server provides five main tools for accessing your Whoop data:
Retrieves comprehensive Whoop overview data for a specific date in a single API call.…