Skip to main content

Model Context Protocol server for Intervals.icu — access training data, wellness metrics, and performance analysis from Claude, ChatGPT, and other LLMs.

Project description

Intervals.icu MCP Server

intervals-icu-mcp demo

A Model Context Protocol (MCP) server for Intervals.icu integration. Access your training data, wellness metrics, and performance analysis through Claude, ChatGPT, and other LLMs.

Originally based on eddmann/intervals-icu-mcp (MIT licensed). This project is an independent continuation with significant bug fixes and new features — see CHANGELOG.md for details.

Tests intervals-icu-mcp MCP server License: MIT Docker

Overview

60 tools spanning activities, activity analysis, activity messages, athlete profile, wellness, events/calendar, performance curves, workout library, gear, sport settings, and custom items — plus 4 MCP Resources (athlete profile, workout syntax, event categories, custom item schemas) and 7 MCP Prompts (training analysis, recovery check, weekly planning, and more). See Available Tools for the per-category breakdown.

Quick Start

Install in Cursor

Or for Claude Desktop, in 30 seconds:

  1. Get your API key and athlete ID
  2. Add this to your Claude Desktop config:
{
  "mcpServers": {
    "intervals-icu": {
      "command": "uvx",
      "args": ["intervals-icu-mcp"],
      "env": {
        "INTERVALS_ICU_API_KEY": "your-api-key-here",
        "INTERVALS_ICU_ATHLETE_ID": "i123456"
      }
    }
  }
}
  1. Restart Claude and ask "Show me my activities from the last 7 days."

Prefer Claude Code, Cursor, or ChatGPT? See Client Configuration. Want to run from source or with Docker? See Installation & Setup.

Prerequisites

Install uv — it handles Python, dependencies, and execution in one tool. brew install uv on macOS/Linux, or powershell -c "irm https://astral.sh/uv/install.ps1 | iex" on Windows. From there, uvx fetches Python and the package automatically. Docker is also supported as an alternative.

Intervals.icu API Key Setup

Before installation, obtain your Intervals.icu API key:

  1. Go to https://intervals.icu/settingsDeveloperCreate API Key.
  2. Copy the key, and note your Athlete ID from your profile URL (format: i123456).

Installation & Setup

Nothing to install separately if you use the recommended setup. uvx (which ships with uv) automatically downloads and caches the intervals-icu-mcp package the first time your MCP client launches it — just paste the config snippet from Client Configuration into your client and you're done.

Alternative: from source — for development or local modifications
git clone https://github.com/hhopke/intervals-icu-mcp.git
cd intervals-icu-mcp
uv sync
uv run intervals-icu-mcp-auth  # interactive credential setup; or create .env manually:
#   INTERVALS_ICU_API_KEY=your_api_key_here
#   INTERVALS_ICU_ATHLETE_ID=i123456

Then point your MCP client at this checkout — see the From source snippet inside each client below.

Alternative: Docker
docker build -t intervals-icu-mcp .

# Interactive credential setup (creates intervals-icu-mcp.env in the current directory):
touch intervals-icu-mcp.env  # pre-create the file so Docker mounts it as a file, not a dir
docker run -it --rm \
  -v "$(pwd)/intervals-icu-mcp.env:/app/.env" \
  --entrypoint= intervals-icu-mcp:latest \
  python -m intervals_icu_mcp.scripts.setup_auth

Or create intervals-icu-mcp.env manually (same format as the .env above).

Then point your MCP client at the Docker image — see the Docker snippet inside each client below.

Client Configuration

The server speaks MCP over stdio and works with any compliant client. Click a client to expand. If you followed Quick Start (uvx), use the first config block; if you used the source or Docker alternative above, use the matching variant inside the same collapsible.

Claude Desktop

Add to your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "intervals-icu": {
      "command": "uvx",
      "args": ["intervals-icu-mcp"],
      "env": {
        "INTERVALS_ICU_API_KEY": "your-api-key-here",
        "INTERVALS_ICU_ATHLETE_ID": "i123456"
      }
    }
  }
}

From source (requires git clone + uv sync + uv run intervals-icu-mcp-auth):

{
  "mcpServers": {
    "intervals-icu": {
      "command": "uv",
      "args": ["run", "--directory", "/ABSOLUTE/PATH/TO/intervals-icu-mcp", "intervals-icu-mcp"]
    }
  }
}

Docker:

{
  "mcpServers": {
    "intervals-icu": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-v", "/ABSOLUTE/PATH/TO/intervals-icu-mcp.env:/app/.env", "intervals-icu-mcp:latest"]
    }
  }
}
Claude Code

Register the server as a user-scoped MCP server:

claude mcp add intervals-icu --scope user \
  --env INTERVALS_ICU_API_KEY=your-key \
  --env INTERVALS_ICU_ATHLETE_ID=i123456 \
  -- uvx intervals-icu-mcp

Then in any Claude Code session, run /mcp to confirm intervals-icu is connected.

Cursor

Add to ~/.cursor/mcp.json (or the project-local .cursor/mcp.json):

{
  "mcpServers": {
    "intervals-icu": {
      "command": "uvx",
      "args": ["intervals-icu-mcp"],
      "env": {
        "INTERVALS_ICU_API_KEY": "your-api-key-here",
        "INTERVALS_ICU_ATHLETE_ID": "i123456"
      }
    }
  }
}

Restart Cursor and open Settings → MCP to verify the server is listed.

ChatGPT — requires a paid plan, Developer Mode, and a publicly reachable URL (walkthrough not yet verified end-to-end)

ChatGPT's custom MCP connector flow requires running the server over HTTP and exposing it via a tunnel, then registering the URL in ChatGPT's Developer Mode settings. See docs/chatgpt-connector.md for the full walkthrough, plan-tier requirements, and security notes.

Usage

Ask Claude to interact with your Intervals.icu data in natural language. A few starter prompts:

"Show me my activities from the last 30 days"
"Am I overtraining? Check my CTL, ATL, and TSB"
"How's my recovery this week? Show HRV and sleep trends"
"Create a sweet spot cycling workout for tomorrow"
"What's my 20-minute power and FTP?"

For the full catalogue of example prompts by category, see docs/examples.md.

Available Tools

60 tools, 4 resources, and 7 prompt templates. One-line summary below — full reference in docs/tools.md.

Category Tools Summary
Activities 12 Query, search, update, delete, download activities
Activity Analysis 8 Streams, intervals, best efforts, histograms
Activity Messages 2 Read and post notes/comments/coach feedback on activities
Athlete 2 Profile and CTL/ATL/TSB fitness analysis
Wellness 3 HRV, sleep, recovery metrics
Events / Calendar 11 Planned workouts, races, notes, ATP periodization (bulk ops supported)
Performance / Curves 3 Power, HR, and pace curves with zones
Workout Library 2 Browse workout folders and training plans
Gear Management 6 Track equipment and maintenance reminders
Sport Settings 5 FTP, FTHR, pace thresholds, and zones
Custom Items 5 User customizations: custom charts, fields, zones, dashboard panels

Delete Safety Mode

Destructive tools are gated by the optional INTERVALS_ICU_DELETE_MODE env var (safe / full / none, default safe) — a server-side gate outside the model's reach, so unregistered tools can't be invoked. See docs/tools.md for the full mode table, response envelope, and TZ-buffer rationale.

Remote Deployment (HTTP / SSE)

The server runs over stdio by default — the right transport for local clients like Claude Desktop, Claude Code, and Cursor. HTTP and SSE transports are available for remote or hosted use.

⚠️ MCP has no built-in authentication — never expose an HTTP-mode server to an untrusted network without a tunnel (Tailscale, Cloudflare Tunnel) or an authenticating reverse proxy.

See docs/remote-deployment.md for transport flags and the full security model.

Documentation

Contributing

Issues and pull requests are welcome. Before opening a PR, run make can-release locally to match what CI enforces (ruff, pyright, pytest). For new tools, follow the pattern in .claude/skills/add-tool/SKILL.md and add a respx-mocked test file alongside the implementation.

License

MIT License - see the LICENSE file for details.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Intervals.icu. All product names, logos, and brands are property of their respective owners.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intervals_icu_mcp-4.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intervals_icu_mcp-4.1.0-py3-none-any.whl (85.1 kB view details)

Uploaded Python 3

File details

Details for the file intervals_icu_mcp-4.1.0.tar.gz.

File metadata

  • Download URL: intervals_icu_mcp-4.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for intervals_icu_mcp-4.1.0.tar.gz
Algorithm Hash digest
SHA256 ae6c190343e67d1f89de4abb2036a18bbaffb6f351b03502f21e9563273cccda
MD5 7c6874f6bee8b87178799c0e68a86a9f
BLAKE2b-256 2614d6e405c29d7a99b23894807c990409b9bd00c685dc58edcaf3dbecd6af4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for intervals_icu_mcp-4.1.0.tar.gz:

Publisher: publish.yml on hhopke/intervals-icu-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file intervals_icu_mcp-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for intervals_icu_mcp-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68fd9e5c0d9a917e03f8b3ed3fbb5658764ab645e6dca4194ab723f77c6922ad
MD5 be404c9ac6d08a1a11896fc5bf04aa91
BLAKE2b-256 05e995e82e1f380b79e619d62bfddcb88380e04fd7739a059f3b8d8b835af938

See more details on using hashes here.

Provenance

The following attestation bundles were made for intervals_icu_mcp-4.1.0-py3-none-any.whl:

Publisher: publish.yml on hhopke/intervals-icu-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page