TrainingPeaks MCP Server
README.md
# TrainingPeaks MCP Server
<a href="https://glama.ai/mcp/servers/@tildecomunicacion/TrainingPeaks-MCP">
<img width="380" height="200" src="https://glama.ai/mcp/servers/@tildecomunicacion/TrainingPeaks-MCP/badge" alt="TrainingPeaks MCP server" />
</a>
Connect TrainingPeaks to Claude and other AI assistants via the Model Context Protocol (MCP). Query workouts, build structured intervals, track fitness trends, and write comments/feedback on your calendar through natural conversation.
**No more expired cookies.** This server features **automatic login** using your TrainingPeaks username and password. The credentials remain local on your machine and are only transmitted directly to TrainingPeaks over secure HTTPS.
---
## What You Can Do
Ask your AI assistant things like:
- "Build me a 4x8min threshold session for Tuesday with warm-up and cool-down"
- "Show my workouts for this week and check if I've completed them"
- "Analyze my compliance for yesterday's run and add a feedback comment in TrainingPeaks"
- "What's my CTL, ATL, and TSB trend for the last 90 days?"
- "Get my profile and account type"
---
## Tools (8)
### Workouts & Intervals
- **`tp_get_workouts`**: List planned and completed workouts in a date range (max 90 days).
- **`tp_create_workout`**: Create planned workouts on a calendar date (supports complex nested interval structures, auto-computed TSS/IF, and planned start times).
- **`tp_delete_workout`**: Delete planned workouts by ID.
### Comments & Feedback
- **`tp_get_workout_comments`**: Fetch the list of comments from a workout.
- **`tp_add_workout_comment`**: Add a text comment (e.g. analysis, compliance review) to a workout.
### Performance & Summary
- **`tp_get_profile`**: Get athlete profile info (Athlete ID, Name, Email, Premium/Basic account status).
- **`tp_get_weekly_summary`**: Aggregate view of workouts, total TSS, total duration, and end-of-week fitness.
- **`tp_get_fitness`**: Fetch CTL (Fitness), ATL (Fatigue), and TSB (Form) performance metrics.
---
## Setup in Claude Desktop
Add the server to your `claude_desktop_config.json`:
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"trainingpeaks": {
"command": "python",
"args": [
"-m",
"tp_mcp",
"serve"
],
"env": {
"TP_USERNAME": "YOUR_TRAININGPEAKS_USERNAME",
"TP_PASSWORD": "YOUR_TRAININGPEAKS_PASSWORD"
}
}
}
}
```
> [!NOTE]
> Ensure you run this inside the virtual environment where `tp-mcp` is installed, or point the `"command"` path directly to the `python.exe`/`python` binary of the virtual environment.
---
## Security & Privacy
This server is designed to be completely secure and private:
1. **100% Local:** Runs on your local machine. No external databases, no middleware, no credential sharing.
2. **Direct Connection:** Authenticates directly with TrainingPeaks official servers using HTTPS.
3. **No exposed ports:** Uses standard input/output (stdio) to communicate with Claude Desktop. It does not open any network ports.
---
## Development & Testing
To set up the project locally and run the tests:
```bash
# Clone the repository
git clone https://github.com/tildecomunicacion/trainingpeaks_mcp.git
cd trainingpeaks-mcp
# Create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
# Run unit tests
pytest
```
---
## License
MIT
TDQS
A3.8/5.0
Scored across 8 tools
Disambiguation5/5
Each tool targets a distinct operation: workout CRUD, comments, fitness metrics, profile, and weekly summary. No overlap in purpose.
Naming Consistency5/5
All tools follow the tp_verb_noun pattern in snake_case, with verbs like add, create, delete, get, and clear nouns. Consistent and predictable.
Tool Count5/5
8 tools is well-scoped for a training data server, covering workouts, comments, metrics, and profile without bloat or deficiency.
Completeness4/5
Covers core workflows: workout create/delete/get, comments add/get, fitness metrics, profile. Slight gaps like update workout and delete comment, but not critical for basic use.
Maintenance
ActivityInactive
ResponsivenessNo issues