Skip to main content
Glama
TrainingPeaks MCP Server

TrainingPeaks MCP Server

TrainingPeaks MCP Server

MCP server for TrainingPeaks. Reads workouts, fitness metrics (CTL/ATL/TSB), and health data. Creates, updates, and deletes planned workouts. Built with Python/FastMCP with browser-based auth and auto-refresh. Designed for AI-powered training plan management and automated adjustment based on performance, fatigue, and injury.

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Related MCP server: claude-garmin

Usage

python -m training_peaks_mcp

On first run, a browser window opens with the TrainingPeaks login page. Enter your credentials — they're sent to localhost only, saved locally to ~/.config/training-peaks-mcp/credentials.json, and auto-refresh when expired.

CLI Options

python -m training_peaks_mcp              # Start the MCP server
python -m training_peaks_mcp --auth       # Re-authenticate
python -m training_peaks_mcp --auth-status # Check auth status
python -m training_peaks_mcp --auth-clear  # Remove stored credentials

Tools

Auth

Tool

Description

authenticate

Login with username/password via MCP

Read

Tool

Description

get_profile

Athlete profile (ID, name, account type)

get_workouts

Workouts by date range (filter: all/planned/completed)

get_workout

Single workout with full details and structure

get_fitness

CTL/ATL/TSB from the Performance Management Chart

get_metrics

Health metrics (weight, HRV, sleep, SpO2, steps)

get_training_zones

Power, heart rate, and speed/pace zones

get_nutrition

Nutrition data by date range

Write

Tool

Description

create_workout

Create a planned workout

update_workout

Update an existing workout

delete_workout

Delete a workout

log_metrics

Log health metrics (weight, HRV, sleep, injury, etc.)

add_workout_comment

Add a comment to a workout

Authentication

Three methods, checked in order:

  1. Stored credentials — saved automatically after first login, auto-refreshes on expiry

  2. Browser login — opens on first run if no credentials exist

  3. Environment variable — set TP_AUTH_COOKIE to override (for CI/containers)

Credentials are stored at ~/.config/training-peaks-mcp/credentials.json with 0600 permissions.

Architecture

src/training_peaks_mcp/
├── __init__.py
├── __main__.py      # CLI entry point
├── auth.py          # Login flow, credential storage, browser auth page
├── client.py        # Async HTTP client for tpapi.trainingpeaks.com
└── server.py        # FastMCP tool definitions

The server uses the TrainingPeaks internal API (tpapi.trainingpeaks.com). Auth cookies are exchanged for short-lived bearer tokens via /users/v3/token.

Supported Sports

Swim, Bike, Run, Brick, Crosstrain, Race, DayOff, MtnBike, Strength, Custom, XCSki, Rowing, Walk, Other

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.

      https://api.coachicarus.com/mcp
    • TrainingPeaks MCP server for ChatGPT, Claude and any AI agent: list calendar workouts, get workout details, add planned workout, move workout, add workout from library, comment on workout, log metric, get fitness and fatigue and form in your own TrainingPeaks account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to TrainingPeaks yourself; Cotlet does not store your password and you need no TrainingPeaks API key. About the official TrainingPeaks API: TrainingPeaks has an API, but only approved commercial partners get it, and it is not available for personal use (checked 5 Nov 2026). Partners read and write workouts, metrics and events through OAuth, and there is no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/trainingpeaks-api-mcp-server

    • tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).

      https://tri-train.com/api/mcp
    • Fitness MCP for coaches and gyms: build workouts and read clients' training from live Superset data.

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that connects Garmin Connect data to Claude, enabling training analysis, recovery checks, and personalized plans based on real metrics like HRV, training load, and activities.
      24
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for Intervals.icu that enables AI assistants to manage athletic training data, including activities, calendar events, wellness metrics, and workout libraries.
      19
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that connects AI agents to Intervals.icu, enabling access to training data such as activities, wellness metrics, calendar events, gear, power curves, and custom items. Includes a running coach AI template for automated post-session analysis.
      19
      1
      MIT