Skip to main content
Glama
Intervals.icu MCP Server

Intervals.icu MCP Server

by mvilanova

Intervals.icu MCP 서버

Claude 및 ChatGPT를 Intervals.icu API와 연결하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 활동, 이벤트 및 웰니스 데이터에 대한 인증 및 데이터 검색 도구를 제공합니다.

모델 컨텍스트 프로토콜(MCP) 서버가 유용하다고 생각되시면, 기부를 통해 지속적인 개발을 지원해 주시기 바랍니다.

요구 사항

Related MCP server: Intervals.icu MCP Server

설정

1. uv 설치 (권장)

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

설치 후 uv의 전체 경로를 찾으세요. 나중에 Claude Desktop을 구성할 때 필요합니다:

where.exe uv
# Example output: C:\Users\<USERNAME>\.local\bin\uv.exe

2. 이 저장소 복제

git clone https://github.com/mvilanova/intervals-mcp-server.git
cd intervals-mcp-server

3. 가상 환경 생성 및 활성화

# Create virtual environment with Python 3.12
uv venv --python 3.12

# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

4. 프로젝트 종속성 동기화

uv sync

5. 환경 변수 설정

다음 명령어를 실행하여 .env.example을 복사하고 .env로 이름을 변경합니다:

macOS/Linux:

cp .env.example .env

Windows (PowerShell):

Copy-Item .env.example .env

그런 다음 .env 파일을 편집하여 Intervals.icu 선수 ID와 API 키를 설정합니다:

API_KEY=your_intervals_api_key_here
ATHLETE_ID=your_athlete_id_here

Intervals.icu API 키 가져오기

  1. Intervals.icu 계정에 로그인합니다.

  2. 설정(Settings) > API로 이동합니다.

  3. 새 API 키를 생성합니다.

선수 ID 찾기

선수 ID는 일반적으로 Intervals.icu에 로그인했을 때 URL에서 확인할 수 있습니다. 형식은 다음과 같습니다:

  • https://intervals.icu/athlete/i12345/... 여기서 i12345가 선수 ID입니다.

업데이트

이 프로젝트는 활발히 개발 중이며 새로운 기능과 수정 사항이 정기적으로 추가됩니다. 최신 상태를 유지하려면 다음 단계를 따르세요:

1. main에서 최신 변경 사항 가져오기

⚠️ 이 명령을 실행하기 전에 커밋되지 않은 변경 사항이 없는지 확인하세요.

macOS/Linux:

git checkout main && git pull

Windows (PowerShell):

git checkout main; git pull

2. Python 종속성 업데이트

가상 환경을 활성화하고 종속성을 동기화합니다:

macOS/Linux:

source .venv/bin/activate
uv sync

Windows (PowerShell):

.venv\Scripts\activate
uv sync

문제 해결

구성 변경으로 인해 Claude Desktop이 실패하는 경우 다음 단계를 따르세요:

  1. claude_desktop_config.json에서 기존 Intervals.icu 항목을 삭제합니다.

  2. intervals-mcp-server 디렉토리에서 Claude Desktop을 다시 구성합니다.

macOS/Linux:

mcp install src/intervals_mcp_server/server.py --name "Intervals.icu" --with-editable . --env-file .env

Windows: Windows 구성 섹션에 설명된 대로 항목을 수동으로 다시 추가합니다.

일반적인 오류

spawn uv ENOENT — Claude Desktop이 uv 실행 파일을 찾을 수 없습니다. command 필드에 uv의 전체 경로를 사용하세요. which uv(macOS/Linux) 또는 where.exe uv(Windows)를 실행하여 경로를 확인하세요.

Windows에서 spawn /Users/... ENOENT — 구성 파일에 macOS/Linux 스타일 경로가 포함되어 있습니다. 아래 Windows 구성 섹션에 설명된 대로 백슬래시를 사용하여 올바른 Windows 경로로 바꾸세요.

Windows 스토어 설치: 구성 변경 사항이 적용되지 않음 — 잘못된 구성 파일을 편집하고 있을 수 있습니다. Microsoft Store에서 설치된 Claude Desktop은 AppData\Roaming\Claude\가 아니라 AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json에서 읽어옵니다.

Claude와 함께 사용하기

1. Claude Desktop 구성

이 서버를 Claude Desktop과 함께 사용하려면 Claude Desktop 구성에 추가해야 합니다.

macOS/Linux

  1. intervals-mcp-server 디렉토리에서 다음을 실행하여 Claude Desktop을 구성합니다:

mcp install src/intervals_mcp_server/server.py --name "Intervals.icu" --with-editable . --env-file .env
  1. Claude Desktop 앱 구성 파일 claude_desktop_config.json을 열면 다음과 같이 보여야 합니다:

{
  "mcpServers": {
    "Intervals.icu": {
      "command": "/Users/<USERNAME>/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/path/to/intervals-mcp-server",
        "mcp",
        "run",
        "/path/to/intervals-mcp-server/src/intervals_mcp_server/server.py"
      ],
      "env": {
        "INTERVALS_API_BASE_URL": "https://intervals.icu/api/v1",
        "ATHLETE_ID": "<YOUR_ATHLETE_ID>",
        "API_KEY": "<YOUR_API_KEY>",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

여기서 /path/to/는 시스템의 intervals-mcp-server 코드 폴더 경로입니다.

Windows

mcp install 명령은 환경 또는 권한 문제로 인해 Windows에서 실패할 수 있습니다. 대신 Claude Desktop을 수동으로 구성하세요:

  1. Claude Desktop 구성 파일을 찾습니다. Microsoft Store에서 Claude Desktop을 설치한 경우 구성 파일은 다음 위치에 있습니다:

    C:\Users\<USERNAME>\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

    표준 설치 프로그램을 통해 설치한 경우 다음 위치에 있을 수 있습니다:

    C:\Users\<USERNAME>\AppData\Roaming\Claude\claude_desktop_config.json

    파일이나 폴더가 없으면 만드세요.

  2. claude_desktop_config.json에 다음 항목을 추가하고 자리 표시자를 실제 값으로 바꿉니다:

{
  "mcpServers": {
    "Intervals.icu": {
      "command": "C:\\Users\\<USERNAME>\\.local\\bin\\uv.exe",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "C:\\path\\to\\intervals-mcp-server",
        "mcp",
        "run",
        "C:\\path\\to\\intervals-mcp-server\\src\\intervals_mcp_server\\server.py"
      ],
      "env": {
        "INTERVALS_API_BASE_URL": "https://intervals.icu/api/v1",
        "ATHLETE_ID": "<YOUR_ATHLETE_ID>",
        "API_KEY": "<YOUR_API_KEY>",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}
  • JSON의 모든 Windows 경로에는 이중 백슬래시(\\)를 사용하세요.

  • uv.exe의 전체 경로를 찾으려면 PowerShell에서 where.exe uv를 실행하세요.

  • 복제된 저장소의 전체 경로를 찾으려면 intervals-mcp-server 폴더 안에서 pwd를 실행하세요.

Windows 스토어 설치 참고: Microsoft Store에서 설치된 Claude Desktop은 AppData\Local\Packages\... 아래에 구성을 샌드박스 처리합니다. AppData\Roaming\Claude\claude_desktop_config.json을 편집해도 아무런 효과가 없으므로 올바른 파일을 편집하고 있는지 확인하세요.

  1. Claude Desktop을 다시 시작합니다.

2. Claude와 함께 MCP 서버 사용

서버가 실행되고 Claude Desktop이 구성되면 다음 도구를 사용하여 과거 및 미래의 활동, 이벤트 및 웰니스 데이터에 대해 질문할 수 있습니다.

  • get_activities: 활동 목록 검색

  • get_activity_details: 특정 활동에 대한 자세한 정보 가져오기

  • get_activity_intervals: 특정 활동에 대한 자세한 인터벌 데이터 가져오기

  • get_wellness_data: 웰니스 데이터 가져오기

  • get_events: 예정된 이벤트(운동, 경주 등) 검색

  • get_event_by_id: 특정 이벤트에 대한 자세한 정보 가져오기

ChatGPT와 함께 사용하기

ChatGPT의 베타 MCP 커넥터도 SSE 전송을 통해 이 서버와 통신할 수 있습니다.

  1. /sse 및 /messages/ 엔드포인트를 노출하도록 SSE 모드에서 서버를 시작합니다:

    export FASTMCP_HOST=127.0.0.1 FASTMCP_PORT=8765 MCP_TRANSPORT=sse FASTMCP_LOG_LEVEL=INFO
    python src/intervals_mcp_server/server.py

    시작 로그에 전체 URL(예: http://127.0.0.1:8765/sse)이 출력됩니다. ChatGPT는 해당 공개 URL이 필요하므로 서버를 직접 노출하지 않는 경우 ngrok http 8765와 같은 도구로 포트를 포워딩하세요.

  2. ChatGPT에서 **설정(Settings) → 기능(Features) → 사용자 지정 MCP 커넥터(Custom MCP Connectors)**를 열고 **추가(Add)**를 클릭합니다. 다음을 입력하세요:

    • 이름: Intervals.icu

    • MCP 서버 URL: https://<your-public-host>/sse

    • 인증: 터널을 보호하지 않은 경우 *인증 없음(No authentication)*으로 둡니다.

    여기서 동일한 ngrok http 8765 터널 URL을 재사용할 수 있습니다. 위에서 내보낸 호스트/포트로 포워딩되는지 확인하세요.

  3. 커넥터를 저장하고 새 채팅을 엽니다. ChatGPT는 SSE 연결을 열어두고 서버가 알린 /messages/ 엔드포인트로 후속 요청을 POST합니다. MCP 서버나 터널을 다시 시작하면 SSE 명령을 다시 실행하고 URL이 변경되면 커넥터 URL을 업데이트하세요.

개발 및 테스트

개발 종속성을 설치하고 다음 명령으로 테스트 모음을 실행합니다:

uv sync --all-extras
pytest -v tests

로컬에서 서버 실행

서버를 수동으로 시작하려면(개발 또는 테스트 시 유용) 다음을 실행합니다:

mcp run src/intervals_mcp_server/server.py

디버그 로깅 활성화

디버깅을 위해 서버 로그를 캡처하려면 명령을 셸로 래핑하고 stderr을 파일로 리디렉션하세요.

macOS/Linux — claude_desktop_config.json을 다음과 같이 수정합니다:

{
  "mcpServers": {
    "Intervals.icu": {
      "command": "/bin/bash",
      "args": [
        "-c",
        "/Users/<USERNAME>/.local/bin/uv run --with 'mcp[cli]' --with-editable /path/to/intervals-mcp-server mcp run /path/to/intervals-mcp-server/src/intervals_mcp_server/server.py 2>> /path/to/intervals-mcp-server/mcp-server.log"
      ],
      "env": {
        "INTERVALS_API_BASE_URL": "https://intervals.icu/api/v1",
        "ATHLETE_ID": "<YOUR_ATHLETE_ID>",
        "API_KEY": "<YOUR_API_KEY>",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

그런 다음 로그 파일을 tail하여 실시간으로 출력을 확인합니다:

tail -f /path/to/intervals-mcp-server/mcp-server.log

Windows — claude_desktop_config.json을 다음과 같이 수정합니다:

{
  "mcpServers": {
    "Intervals.icu": {
      "command": "powershell",
      "args": [
        "-Command",
        "C:\\Users\\<USERNAME>\\.local\\bin\\uv.exe run --with 'mcp[cli]' --with-editable C:\\path\\to\\intervals-mcp-server mcp run C:\\path\\to\\intervals-mcp-server\\src\\intervals_mcp_server\\server.py 2>> C:\\path\\to\\intervals-mcp-server\\mcp-server.log"
      ],
      "env": {
        "INTERVALS_API_BASE_URL": "https://intervals.icu/api/v1",
        "ATHLETE_ID": "<YOUR_ATHLETE_ID>",
        "API_KEY": "<YOUR_API_KEY>",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

그런 다음 PowerShell을 사용하여 실시간으로 로그 파일을 모니터링합니다:

Get-Content C:\path\to\intervals-mcp-server\mcp-server.log -Wait

라이선스

GNU General Public License v3.0

추천

Glama.ai

Available Tools

10 tools
add_or_update_eventB

Post event for an athlete to Intervals.icu this follows the event api from intervals.icu If event_id is provided, the event will be updated instead of created.

Many arguments are required as this MCP tool function maps directly to the Intervals.icu API parameters.

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) event_id: The Intervals.icu event ID (optional, will use event_id from .env if not provided) start_date: Start date in YYYY-MM-DD format (optional, defaults to today) name: Name of the activity workout_doc: steps as a list of Step objects (optional, but necessary to define workout steps) workout_type: Workout type (e.g. Ride, Run, Swim, Walk, Row) moving_time: Total expected moving time of the workout in seconds (optional) distance: Total expected distance of the workout in meters (optional)

Example: "workout_doc": { "description": "High-intensity workout for increasing VO2 max", "steps": [ {"power": {"value": "80", "units": "%ftp"}, "duration": "900", "warmup": true}, {"reps": 2, "text": "High-intensity intervals", "steps": [ {"power": {"value": "110", "units": "%ftp"}, "distance": "500", "text": "High-intensity"}, {"power": {"value": "80", "units": "%ftp"}, "duration": "90", "text": "Recovery"} ]}, {"power": {"value": "80", "units": "%ftp"}, "duration": "600", "cooldown": true} {"text": ""}, # Add comments or blank lines for readability ] }

Step properties: distance: Distance of step in meters {"distance": "5000"} duration: Duration of step in seconds {"duration": "1800"} power/hr/pace/cadence: Define step intensity Percentage of FTP: {"power": {"value": "80", "units": "%ftp"}} Absolute power: {"power": {"value": "200", "units": "w"}} Heart rate: {"hr": {"value": "75", "units": "%hr"}} Heart rate (LTHR): {"hr": {"value": "85", "units": "%lthr"}} Cadence: {"cadence": {"value": "90", "units": "rpm"}} Pace by ftp: {"pace": {"value": "80", "units": "%pace"}} Pace by zone: {"pace": {"value": "Z2", "units": "pace_zone"}} Zone by power: {"power": {"value": "Z2", "units": "power_zone"}} Zone by heart rate: {"hr": {"value": "Z2", "units": "hr_zone"}} Ranges: Specify ranges for power, heart rate, or cadence: {"power": {"start": "80", "end": "90", "units": "%ftp"}} Ramps: Instead of a range, indicate a gradual change in intensity (useful for ERG workouts): {"ramp": True, "power": {"start": "80", "end": "90", "units": "%ftp"}} Repeats: include the reps property and add nested steps {"reps": 3, "steps": [ {"power": {"value": "110", "units": "%ftp"}, "distance": "500", "text": "High-intensity"}, {"power": {"value": "80", "units": "%ftp"}, "duration": "90", "text": "Recovery"} ]} Free Ride: Include free to indicate a segment without ERG control, optionally with a suggested power range: {"free": true, "power": {"value": "80", "units": "%ftp"}} Comments and Labels: Add descriptive text to label steps: {"text": "Warmup"}

How to use steps: - Set distance or duration as appropriate for step - Use "reps" with nested steps to define repeat intervals (as in example above) - Define one of "power", "hr" or "pace" to define step intensity

Inputs: workout_type (required), name (required), athlete_id, api_key, +5 more. Returns: result

delete_eventB

Delete event for an athlete from Intervals.icu Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) event_id: The Intervals.icu event ID

Inputs: event_id (required), athlete_id, api_key. Returns: result

delete_events_by_date_rangeA

Delete events for an athlete from Intervals.icu in the specified date range.

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) start_date: Start date in YYYY-MM-DD format end_date: End date in YYYY-MM-DD format

Inputs: start_date (required), end_date (required), athlete_id, api_key. Returns: result

get_activitiesA

Get a list of activities for an athlete from Intervals.icu

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) start_date: Start date in YYYY-MM-DD format (optional, defaults to 30 days ago) end_date: End date in YYYY-MM-DD format (optional, defaults to today) limit: Maximum number of activities to return (optional, defaults to 10) include_unnamed: Whether to include unnamed activities (optional, defaults to False)

Inputs: athlete_id, api_key, start_date, end_date, +2 more. Returns: result

get_activity_detailsA

Get detailed information for a specific activity from Intervals.icu

Args: activity_id: The Intervals.icu activity ID api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided)

Inputs: activity_id (required), api_key. Returns: result

get_activity_intervalsA

Get interval data for a specific activity from Intervals.icu

This endpoint returns detailed metrics for each interval in an activity, including power, heart rate, cadence, speed, and environmental data. It also includes grouped intervals if applicable.

Args: activity_id: The Intervals.icu activity ID api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided)

Inputs: activity_id (required), api_key. Returns: result

get_activity_streamsA

Get stream data for a specific activity from Intervals.icu

This endpoint returns time-series data for an activity, including metrics like power, heart rate, cadence, altitude, distance, temperature, and velocity data.

Args: activity_id: The Intervals.icu activity ID api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) stream_types: Comma-separated list of stream types to retrieve (optional, defaults to all available types) Available types: time, watts, heartrate, cadence, altitude, distance, core_temperature, skin_temperature, velocity_smooth

Inputs: activity_id (required), api_key, stream_types. Returns: result

get_event_by_idB

Get detailed information for a specific event from Intervals.icu

Args: event_id: The Intervals.icu event ID athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided)

Inputs: event_id (required), athlete_id, api_key. Returns: result

get_eventsA

Get events for an athlete from Intervals.icu

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) start_date: Start date in YYYY-MM-DD format (optional, defaults to today) end_date: End date in YYYY-MM-DD format (optional, defaults to 30 days from today)

Inputs: athlete_id, api_key, start_date, end_date. Returns: result

get_wellness_dataB

Get wellness data for an athlete from Intervals.icu

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) start_date: Start date in YYYY-MM-DD format (optional, defaults to 30 days ago) end_date: End date in YYYY-MM-DD format (optional, defaults to today)

Inputs: athlete_id, api_key, start_date, end_date. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: add_or_update_event creates/updates events, delete_event and delete_events_by_date_range handle deletion, get_activities and get_events retrieve lists, get_event_by_id and get_activity_details fetch specific items, get_activity_intervals and get_activity_streams provide specialized data, and get_wellness_data covers a separate domain. The descriptions clearly differentiate between events and activities, and between summary and detailed data.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case: add_or_update_event, delete_event, delete_events_by_date_range, get_activities, get_activity_details, get_activity_intervals, get_activity_streams, get_event_by_id, get_events, get_wellness_data. The verbs (add_or_update, delete, get) are used predictably, and nouns (event, activity, wellness_data) are clearly specified, making the naming highly consistent and readable.

    Tool Count5/5

    With 10 tools, this server is well-scoped for managing athlete data in Intervals.icu, covering events, activities, and wellness data. Each tool serves a specific function (e.g., CRUD for events, detailed queries for activities), and none seem redundant or missing for the domain. This count aligns with typical server sizes (3-15 tools) and supports comprehensive workflows without being overwhelming.

    Completeness4/5

    The tool set provides strong coverage for the Intervals.icu domain, including CRUD for events (add/update, delete, get), detailed activity retrieval (list, details, intervals, streams), and wellness data. Minor gaps exist, such as no update or delete tools for activities (only get operations) and no tools for athlete management (e.g., list athletes), but agents can likely work around these with the available event and data tools.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers