Get the FREE Ultimate OpenClaw Setup Guide →

xert

Model Context Protocol (MCP) server for XERT API - access fitness signature, training load, workouts and activities

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio milofax-xert-mcp node /path/to/xert-mcp/dist/server.js

How to use

This MCP server integrates Claude with the XERT API, exposing your fitness signature, training status, workouts, activities, and the ability to upload FIT files for analysis. The server provides a set of tools that Claude can invoke to fetch your current FTP, LTP, HIE, and Peak Power, assess training load and freshness, retrieve or export workouts, and browse activities with XSS metrics and MPA data. Available commands include xert-get-training-info, xert-list-workouts, xert-get-workout, xert-download-workout, xert-list-activities, xert-get-activity, and xert-upload-fit. You can query Claude for personalized insights like your current training status, your Workout of the Day, or to export a specific workout as a ZWO or ERG file. The server handles token management and will automatically refresh tokens when needed, provided you have tokens configured correctly.

How to install

Prerequisites:

  • Node.js 18 or later
  • A XERT account (free or premium)

Setup steps:

  1. Clone the repository and install dependencies: git clone https://github.com/Milofax/xert-mcp.git cd xert-mcp npm install

  2. Authenticate with XERT (generates tokens in .env or xert-tokens.json): npm run setup-auth Enter your XERT email and password when prompted. Tokens will be saved to .env or xert-tokens.json as configured.

  3. Build the project (if applicable): npm run build

  4. Start the server (development): npm run dev

  5. Start the production server: npm start

  6. Optional: configure Claude Desktop to connect to the MCP server using the provided command and path to your built server.

Additional notes

Notes and tips:

  • Access tokens expire after 7 days; refresh tokens expire after 6 months. The server is designed to refresh tokens automatically on 401 errors. If authentication fails entirely, re-run npm run setup-auth to re-authenticate and update tokens.
  • If using Docker, you will need to provide token environment variables (XERT_ACCESS_TOKEN and XERT_REFRESH_TOKEN) or ensure tokens are mounted from a file. Tokens are stored in xert-tokens.json by the setup process.
  • When using mcp-funnel or similar tooling, tokens from xert-tokens.json take priority over environment variables to ensure refreshed tokens are used.
  • The MCP configuration example for Claude Desktop expects the server to be reachable at the given path and may require updating the path to dist/server.js after a build. Replace /path/to/xert-mcp with your actual installation path.

Related MCP Servers

Sponsor this space

Reach thousands of developers