TrainingPeaks MCP Server

TrainingPeaks MCP Server

MCP server for TrainingPeaks that reads workouts, fitness metrics (CTL/ATL/TSB), and health data, and creates/updates/deletes planned workouts. Enables AI-powered training plan management and automated adjustment based on performance, fatigue, and injury.

Category
Visit Server

README

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 .

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured