Intervals.icu MCP Server

Intervals.icu MCP Server

Provides access to the Intervals.icu API for interacting with training data, activities, events, and wellness information.

Category
访问服务器

README

Intervals.icu MCP Server

A Model Context Protocol (MCP) server that provides access to the Intervals.icu API. Interact with your training data, activities, events, and wellness information.

Intervals.icu is a powerful training platform for cyclists, runners, and other athletes that provides detailed analytics, workout planning, and performance tracking.

Inspiration

This project was inspired by the excellent Python-based intervals-mcp-server by @mvilanova and the community discussion on the Intervals.icu forum. I decided to rewrite it in TypeScript and add different tools to provide an alternative implementation.

Alternative: ChatGPT Connector

If you prefer not to use MCP, there's also a ChatGPT connector for Intervals.icu available that provides similar functionality through ChatGPT's GPTs feature.

Features

  • Activity Management: Retrieve and analyze your training activities
  • Event Creation: Schedule workouts, races, and other events
  • Athlete Profile: Access your athlete details and statistics
  • Wellness Data: Get insights into your health and recovery metrics
  • Bulk Operations: Create and delete multiple events efficiently

Requirements

  • Node.js 22.x or higher
  • Claude Desktop with MCP support
  • Intervals.icu Account with API access
  • API Key from Intervals.icu

Setup

1. Install the Package

Clone the repository:

git clone git@github.com:mrgeorgegray/intervals-icu-mcp
cd intervals-icu-mcp
npm install

2. Build the Project

npm run build

3. Environment Configuration

If you use this with the inspector copy the example environment file and update it with your credentials, else we'll just add env vars to the Claude config later:

cp .env.example .env

Then edit the .env file with your actual values:

INTERVALS_API_KEY=your_api_key_here
INTERVALS_ATHLETE_ID=your_athlete_id_here
DEBUG=false

Getting your API credentials:

You get an API key from your intervals settings page (look for "Developer Settings" near the bottom), or follow details here.

4. Configure Claude Desktop

Add the MCP server to your Claude Desktop configuration along with the correct paths and env vars:

NOTE: make sure you use the full path to your node version in the command key, to get this please run:

which node
{
  "mcpServers": {
    "intervals-icu-mcp": {
      "command": "/path/to/your/node",
      "args": ["/path/to/intervals-icu-mcp/dist/index.js"],
      "env": {
        "INTERVALS_API_KEY": "your_api_key_here",
        "INTERVALS_ATHLETE_ID": "your_athlete_id_here"
      }
    }
  }
}

Using with Claude

Once configured, Claude can access the following tools:

Activity Tools

  • getActivities - Retrieve a list of your training activities

    • Filter by date range, limit results, include/exclude unnamed activities
    • Returns formatted activity summaries with key metrics
  • getActivityDetails - Get detailed information about a specific activity

    • Provides comprehensive data including power, heart rate, GPS data
    • Useful for analyzing performance and training effectiveness

Event Management

  • createEvent - Schedule a new training event or workout

    • Supports all Intervals.icu activity types (Ride, Run, Swim, etc.)
    • Configure event categories, descriptions, and scheduling
  • createBulkEvents - Create multiple events at once

    • Efficient for setting up training blocks or recurring workouts
  • deleteEvent - Remove a specific event from your calendar

  • deleteBulkEvents - Remove multiple events efficiently

Profile and Wellness

  • getAthleteDetails - Access your athlete profile information

    • View statistics, achievements, and account details
  • getWellnessData - Retrieve health and recovery metrics

    • Includes sleep, stress, fatigue, and other wellness indicators

Event Information

  • getEvents - List scheduled events and workouts

    • Filter by date range and event types
  • getEventDetails - Get detailed information about a specific event

Development

Available Commands

# Build the project
npm run build

# Start the server in development mode
npm run dev

# Run the MCP inspector for debugging
npm run inspector

# Generate TypeScript client from OpenAPI spec
npm run generate-client

# Linting and formatting
npm run lint
npm run lint:fix
npm run prettier:fix

Project Structure

src/
├── client/          # Generated API client
├── tools/           # MCP tool implementations
├── utils/           # Utility functions
└── index.ts         # Main server entry point

API Client Generation

The project uses @hey-api/openapi-ts to generate a TypeScript client from the Intervals.icu OpenAPI specification:

npm run generate-client

This generates the client in src/client/generated/ based on the openapi-spec.json file. The entire API is currently available, but only certain tools have been added so far.

Debugging

Enable debug mode by setting DEBUG=true in your environment variables. This will provide detailed logging of server operations.

Use the MCP Inspector for testing and debugging:

npm run inspector

Troubleshooting

Common Issues

  1. "INTERVALS_ATHLETE_ID environment variable is not set"

    • Ensure your .env file contains the correct athlete ID
    • Verify the athlete ID in your Intervals.icu profile
  2. API authentication errors

    • Check that your API key is valid and has the necessary permissions
    • Ensure the API key is correctly set in your environment variables
  3. Build errors

    • Make sure you're using Node.js 22.x or higher
    • Run npm install to ensure all dependencies are installed

License

This project is licensed under the GNU General Public License v3.0.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选