
用于连接 Claude 和 ChatGPT 与 Intervals.icu API 的模型上下文协议(MCP)服务器。
概览
模型上下文协议(MCP)服务器,用于连接 Claude 和 ChatGPT 与 Intervals.icu API。它提供活动、事件、健康数据、功率曲线和自定义项目的认证和数据检索工具。 如果您觉得模型上下文协议(MCP)服务器有用,请考虑通过捐赠支持其持续开发。 - Python 3.12 或更高版本 - 模型上下文协议(MCP)Python SDK - httpx - python-dotenv 安装完成后,找到通往 uv 的完整路径——你以后在配置 Claude Desktop 时会需要它: 复制一个 .env.example 并命名为 .env,执行以下命令: 然后编辑 .env 文件,设置你的 Intervals.icu 运动员 ID 和 API 密钥: 1. 登录您的 Intervals.icu 账户 2.进入设置> API 3.生成新的 API 密钥 当你登录 Intervals.icu 时,你的运动员ID通常会显示在URL中。它看起来像:
概述(AI 翻译)
模型上下文协议(MCP)服务器,用于连接 Claude 和 ChatGPT 与 Intervals.icu API。它提供活动、事件、健康数据、功率曲线和自定义项目的认证和数据检索工具。
如果您觉得模型上下文协议(MCP)服务器有用,请考虑通过捐赠支持其持续开发。
要求
- Python 3.12 或更高版本
- 模型上下文协议(MCP)Python SDK
- httpx
- Python-dotenv
布置
1.安装UV(推荐)
macOS/Linux:
Windows (PowerShell):
安装后,找到完整路径到 uv —— 你以后在配置 Claude Desktop 时会需要它:
2.克隆这个仓库
3.创建并激活虚拟环境
4.同步项目依赖
5.设置环境变量
复制.env.example,并命名为.env,执行以下命令:
macOS/Linux:
Windows (PowerShell):
然后编辑.env文件,设置你的 Intervals.icu 运动员ID和API密钥:
获取你的 Intervals.icu API密钥
- 登录您的 Intervals.icu 账户
- 进入设置> API
- 生成新的 API 密钥
寻找你的运动员身份证
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Intervals.icu MCP Server
Model Context Protocol (MCP) server for connecting Claude and ChatGPT with the Intervals.icu API. It provides tools for authentication and data retrieval for activities, events, wellness data, power curves, and custom items.
If you find the Model Context Protocol (MCP) server useful, please consider supporting its continued development with a donation.
Requirements
- Python 3.12 or higher
- Model Context Protocol (MCP) Python SDK
- httpx
- python-dotenv
Setup
1. Install uv (recommended)
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"
After installation, find the full path to uv — you’ll need it later when configuring Claude Desktop:
where.exe uv
# Example output: C:\Users\\.local\bin\uv.exe
2. Clone this repository
git clone https://github.com/mvilanova/intervals-mcp-server.git
cd intervals-mcp-server
3. Create and activate a virtual environment
# 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. Sync project dependencies
uv sync
5. Set up environment variables
Make a copy of .env.example and name it .env by running the following command:
macOS/Linux:
cp .env.example .env
Windows (PowerShell):
Copy-Item .env.example .env
Then edit the .env file and set your Intervals.icu athlete id and API key:
API_KEY=your_intervals_api_key_here
ATHLETE_ID=your_athlete_id_here
Getting your Intervals.icu API Key
- Log in to your Intervals.icu account
- Go to Settings > API
- Generate a new API key
Finding your Athlete ID
Your athlete ID is typically visible in the URL when you’re logged into Intervals.icu. It looks like:
https://intervals.icu/athlete/i12345/...wherei12345is your athlete ID
Updating
This project is actively developed, with new features and fixes added regularly. To stay up to date, follow these steps:
1. Pull the latest changes from main
⚠️ Make sure you don’t have uncommitted changes before running this command.
macOS/Linux:
git checkout main && git pull
Windows (PowerShell):
git checkout main; git pull
2. Update Python dependencies
Activate your virtual environment and sync dependencies:
macOS/Linux:
source .venv/bin/activate
uv sync
Windows (PowerShell):
.venv\Scripts\activate
uv sync
Troubleshooting
If Claude Desktop fails due to configuration changes, follow these steps:
- Delete the existing
Intervals.icuentry inclaude_desktop_config.json.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"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"
}
}
}
}