Purpose
xert-mcp is a Model Context Protocol (MCP) server whose purpose is to connect Claude to the XERT API, allowing users to access fitness signatures, training load, training sessions, and activity data on the XERT platform through conversation.
Main Capabilities
- Fitness Signature: Get the current FTP, LTP, HIE, and peak power (PP).
- Training Status: View freshness, training load, and recommended XSS.
- Daily Training Session: Get AI-driven training session recommendations.
- Training Sessions: List, view details, and export to ZWO/ERG format.
- Activities: Browse activities, including complete XSS metrics and MPA data.
- Upload: Upload FIT files for analysis.
Usage
- Prerequisites: Node.js 18 or later; an XERT account (free or paid).
- Clone the repository:
git clone https://github.com/Milofax/xert-mcp.git, thencd xert-mcp. - Install dependencies:
npm install. - Authenticate XERT: run
npm run setup-auth, and enter your XERT email and password when prompted. The token will be saved to.env. - Build the project:
npm run build. - Add to the Claude Desktop configuration:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%\Claude\claude_desktop_config.jsonReplace/path/to/xert-mcpin the configuration with the actual installation path. - Restart Claude Desktop to load the server.
The server can also be run via Docker. You must first run the setup script locally to complete authentication, which will generate xert-tokens.json, containing the access token and refresh token.
Available Query Examples
You can ask Claude questions such as:
- "What are my current FTP and training status?"
- "Show me today's training session."
- "List my activities from the past 7 days."
- "What was the XSS composition of my ride yesterday?"
- "Did I have a breakthrough this week?"
- "Show my saved training sessions."
- "Export my 'Sunday Endurance' training session as a ZWO file."
Terminology
- FTP: Functional Threshold Power (power sustainable for 1 hour).
- LTP: Lower Threshold Power (fat-burning threshold).
- HIE: High Intensity Energy (anaerobic work capacity).
- PP: Peak Power (maximum instantaneous power).
- XSS: Xert Strain Score (training load metric).
- MPA: Maximum Power Available (real-time power ceiling).
Token Management
The server automatically handles tokens: the access token expires after 7 days, and the refresh token expires after 6 months; tokens are stored in the automatically created xert-tokens.json ; when a 401 error is encountered, the token is automatically refreshed, and the new token is persisted so it can continue to be used after the server restarts. If authentication fails completely, rerun npm run setup-auth.
When using mcp-funnel or similar tools, the token from xert-tokens.json takes precedence over environment variables, ensuring that the refreshed token is used even if the value stored in the environment variables is old.
Applicable Scenarios and Limitations
Suitable for users who want to query and manage XERT cycling training data in natural language through Claude. You need to provide your own XERT account and complete local authentication and configuration. Information regarding cost, platform compatibility, or other matters not mentioned in the materials is not currently provided.