A Model Context Protocol (MCP) server that connects Claude to the XERT API, providing access to your fitness signature, training load, workouts, and activities. - ๐ Fitness Signature - Get your current FTP, LTP, HIE, and Peak Power - ๐ฏ Training Status - Check freshness, training load, and recommended XSS - ๐๏ธ Workout of the Day - AI-powered workout recommendations - ๐ Workouts - List, view det
Add this skill
npx mdskills install Milofax/xert-mcpWell-documented MCP server providing comprehensive access to cycling fitness metrics and training data
1# XERT MCP Server23A Model Context Protocol (MCP) server that connects Claude to the XERT API, providing access to your fitness signature, training load, workouts, and activities.45## Features67- ๐ **Fitness Signature** - Get your current FTP, LTP, HIE, and Peak Power8- ๐ฏ **Training Status** - Check freshness, training load, and recommended XSS9- ๐๏ธ **Workout of the Day** - AI-powered workout recommendations10- ๐ **Workouts** - List, view details, and export (ZWO/ERG)11- ๐ด **Activities** - Browse activities with full XSS metrics and MPA data12- โฌ๏ธ **Upload** - Upload FIT files for analysis1314## Installation1516### Prerequisites1718- Node.js 18 or later19- A XERT account (free or premium)2021### Setup22231. **Clone the repository:**24 ```bash25 git clone https://github.com/Milofax/xert-mcp.git26 cd xert-mcp27 ```28292. **Install dependencies:**30 ```bash31 npm install32 ```33343. **Authenticate with XERT:**35 ```bash36 npm run setup-auth37 ```38 Enter your XERT email and password when prompted. Tokens will be saved to `.env`.39404. **Build the project:**41 ```bash42 npm run build43 ```4445## Configuration4647Add to your Claude Desktop config:4849**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`50**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`5152```json53{54 "mcpServers": {55 "xert": {56 "command": "node",57 "args": ["/path/to/xert-mcp/dist/server.js"]58 }59 }60}61```6263Replace `/path/to/xert-mcp` with the actual path to your installation.6465Restart Claude Desktop to load the server.6667### Docker6869You can also run the server via Docker:7071#### 1. Build the image7273```bash74docker build -t xert-mcp .75```7677#### 2. Get your XERT tokens7879Run the setup script locally first to authenticate:8081```bash82npm install83npm run setup-auth84```8586This creates `xert-tokens.json` with your access and refresh tokens.8788#### 3. Configure Claude Desktop8990```json91{92 "mcpServers": {93 "xert": {94 "command": "docker",95 "args": [96 "run", "-i", "--rm",97 "-e", "XERT_ACCESS_TOKEN",98 "-e", "XERT_REFRESH_TOKEN",99 "xert-mcp"100 ],101 "env": {102 "XERT_ACCESS_TOKEN": "your-access-token-from-xert-tokens.json",103 "XERT_REFRESH_TOKEN": "your-refresh-token-from-xert-tokens.json"104 }105 }106 }107}108```109110**Note:** Access tokens expire after 7 days. When they expire, run `npm run setup-auth` again and update the tokens in your config.111112## Available Tools113114| Tool | Description |115|------|-------------|116| `xert-get-training-info` | Get fitness signature, training status, load, and WOTD |117| `xert-list-workouts` | List all your saved workouts |118| `xert-get-workout` | Get detailed workout intervals |119| `xert-download-workout` | Export workout as ZWO or ERG file |120| `xert-list-activities` | List activities in a time range |121| `xert-get-activity` | Get activity details with XSS metrics |122| `xert-upload-fit` | Upload a FIT file for analysis |123124## Usage Examples125126Ask Claude questions like:127128- "What's my current FTP and training status?"129- "Show me my workout of the day"130- "List my activities from the last 7 days"131- "What was my XSS breakdown for yesterday's ride?"132- "Did I have any breakthroughs this week?"133- "Show me my saved workouts"134- "Export my 'Sunday Endurance' workout as a ZWO file"135136## XERT Concepts137138- **FTP** - Functional Threshold Power (1-hour sustainable power)139- **LTP** - Lower Threshold Power (fat-burning threshold)140- **HIE** - High Intensity Energy (anaerobic work capacity)141- **PP** - Peak Power (maximum instantaneous power)142- **XSS** - Xert Strain Score (training load metric)143- **MPA** - Maximum Power Available (real-time power limit)144145## Development146147```bash148# Run in development mode149npm run dev150151# Build for production152npm run build153154# Start production server155npm start156```157158## Token Management159160The server handles tokens automatically:161162- **Access tokens** expire after 7 days163- **Refresh tokens** expire after 6 months164- Tokens are stored in `xert-tokens.json` (created automatically)165- On 401 errors, tokens are refreshed automatically166- New tokens are persisted to survive server restarts167168If authentication fails completely, run `npm run setup-auth` again.169170### MCP Funnel / Environment Variables171172When using mcp-funnel or similar tools, tokens from `xert-tokens.json` take priority over environment variables. This ensures refreshed tokens are used even when env vars contain outdated values.173174## License175176MIT177178## Credits179180- [XERT](https://www.xertonline.com/) - Advanced cycling analytics181- [Model Context Protocol](https://modelcontextprotocol.io/) - AI integration standard182
Full transparency โ inspect the skill content before installing.