Skip to main content
Glama
albiruby

TrackLab MCP Ultimate Edition

by albiruby
README.md
# TrackLab MCP Ultimate Edition ๐Ÿƒโšก

> Enterprise-Grade Model Context Protocol (MCP) Server & AI Running Engine for Claude, Cursor, Windsurf, VS Code, and Gemini CLI.

![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)
![MCP Standard](https://img.shields.io/badge/MCP-1.6.1-green)
![License](https://img.shields.io/badge/License-MIT-purple)
![Zero Cost](https://img.shields.io/badge/Hosting-100%25%20Free-success)

TrackLab MCP turns any AI Assistant into a physiological AI Running Coach. Built with a plugin architecture, it abstracts raw fitness APIs (Intervals.icu, Garmin, Strava, COROS, TrainingPeaks) and exposes 70+ structured analytical MCP tools powered by literature-backed endurance models (Daniels VDOT, Norwegian Double Threshold, Casado, Seiler TID, Riegel Predictions, ACWR Injury Risk).

---

## ๐ŸŒŸ Key Features

- **๐Ÿ”Œ Plugin Architecture Layer**: Built with provider abstraction (`ProviderInterface`). Defaults to Intervals.icu API with zero extra DB costs. Future-proofed for Garmin, Strava, COROS, and TrainingPeaks.
- **๐Ÿงฌ 13 Physiological Analytical Engines**:
  - **Threshold Engine**: Multi-model synthesis (Daniels, Norwegian Method, Casado, Seiler, Critical Speed, LT1, LT2).
  - **TID Engine**: Polarized (80/20), Pyramidal, and Threshold distribution classification.
  - **Performance & PMC Engine**: CTL (Fitness), ATL (Fatigue), TSB (Form), VDOT, Running Economy.
  - **Prediction Engine**: Riegel exponential race time predictor (1K to Marathon).
  - **Recovery Engine**: Readiness scoring (0-100), HRV balance, resting HR trends, deload recommendation.
  - **Injury Risk Engine**: ACWR (Acute:Chronic Workload Ratio 7d vs 28d EWMA), Monotony, Strain.
  - **Workout Builder Engine**: Structured step workout generator (Easy, Threshold Cruise Intervals, VO2max, Reps).
  - **Nutrition Engine**: Carb Loading (g/kg), hydration (mL/hr), sodium, intra-race gel schedule.
  - **Race Planner Engine**: Negative split strategy planner & KM split table.
  - **Report Engine**: Full GitHub Markdown performance report generator.
- **โšก 70+ Dedicated MCP Tools**: Native support for Stdio (Claude Desktop/Cursor/Windsurf) and Express SSE (Claude.ai / Remote Connectors).
- **๐Ÿ’ธ 100% Free Hosting Deployment**: Zero database dependencies required. Ready for Railway, Render, Fly.io, or Docker.

---

## ๐Ÿš€ Quick Start

### 1. Installation
```bash
git clone https://github.com/your-username/tracklab-mcp.git
cd tracklab-mcp
npm install
```

### 2. Environment Setup
Copy `.env.example` to `.env`:
```bash
INTERVALS_API_KEY=your_intervals_api_key
INTERVALS_ATHLETE_ID=i00000
MCP_TRANSPORT=stdio
```

### 3. Build & Run
```bash
npm run build
npm start
```

---

## ๐Ÿ’ป Client Integrations

See detailed configuration instructions in [`docs/CLIENT_SETUP.md`](file:///d:/MCPIntervals.IcuAlbireo/docs/CLIENT_SETUP.md).

- **Claude Desktop**: Connect via STDIO transport in `claude_desktop_config.json`.
- **Cursor / Windsurf**: Add `node dist/index.js` under MCP Settings.
- **Claude.ai**: Deploy via Docker/Railway and point to `https://your-app.up.railway.app/sse`.

---

## ๐Ÿงช Testing & Verification

Run Vitest unit tests for engines:
```bash
npm test
```

Typecheck TypeScript strict build:
```bash
npm run typecheck
```

---

## ๐Ÿ“š Documentation & Specs

- [Architecture Blueprint](file:///d:/MCPIntervals.IcuAlbireo/docs/ARCHITECTURE.md)
- [Client Setup Guide](file:///d:/MCPIntervals.IcuAlbireo/docs/CLIENT_SETUP.md)
- [Deployment Guide](file:///d:/MCPIntervals.IcuAlbireo/docs/DEPLOYMENT.md)
- [AI Prompting Guide](file:///d:/MCPIntervals.IcuAlbireo/docs/PROMPT_GUIDE.md)
- [Full MCP Tools Catalog](file:///d:/MCPIntervals.IcuAlbireo/docs/API_TOOLS.md)

---

## ๐Ÿ“„ License
MIT License.

TDQS

B3.4/5.0

Scored across 21 tools

Disambiguation4/5

Most tools target distinct analytical functions (e.g., calculate_vdot vs predict_race), but some pairs like get_latest_activity vs list_recent_activities and get_fitness_fatigue_form vs get_training_readiness could be confused. Descriptions generally clarify the differences.

Naming Consistency3/5

The majority follow a verb_noun pattern (get_*, calculate_*, analyze_*), but several deviate: provider_status, provider_ping, and training_dashboard are noun-led. This mixed convention is readable but not fully predictable.

Tool Count4/5

With 21 tools, the server is at the higher end of the reasonable range for a comprehensive endurance analytics platform. Each tool has a specific purpose, and the count aligns with the 'Ultimate Edition' scope, though it feels slightly heavy.

Completeness3/5

The domain of training analytics is well covered with load metrics, threshold analysis, and race planning, but there are notable gaps: no tool to fetch a single activity's detailed stream (only analyze_activity_drift references streams), and no explicit activity detail view. This could force workarounds.

Maintenance

ActivitySlowing
ResponsivenessNo issues