intervals
Model Context Protocol (MCP) server for connecting Claude and ChatGPT with the Intervals.icu API.
claude mcp add --transport stdio mvilanova-intervals-mcp-server uv run --with mcp[cli] --with-editable . mcp run src/intervals_mcp_server/server.py \ --env API_KEY="<YOUR_API_KEY>" \ --env LOG_LEVEL="INFO" \ --env ATHLETE_ID="<YOUR_ATHLETE_ID>" \ --env INTERVALS_API_BASE_URL="https://intervals.icu/api/v1"
How to use
This MCP server provides a bridge to the Intervals.icu API, enabling Claude and ChatGPT to authenticate and fetch data about activities, events, and wellness. It exposes tools such as get_activities, get_activity_details, get_activity_intervals, get_wellness_data, get_events, and get_event_by_id. You can run the server locally using uv (the recommended Python environment manager) and then configure Claude Desktop or ChatGPT’s MCP connectors to communicate with it over the SSE transport. The server authenticates requests against your Intervals.icu API key and athlete ID you supply via environment variables, and uses the Intervals.icu API base URL as the data source.
How to install
Prerequisites:
- Python 3.12 or higher
- uv (Python environment manager)
- Intervals.icu API key and athlete ID
Installation steps:
-
Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
-
Clone the repository and enter the project: git clone https://github.com/mvilanova/intervals-mcp-server.git cd intervals-mcp-server
-
Create and activate a Python virtual environment using uv: uv venv --python 3.12 source .venv/bin/activate # macOS/Linux .venv\Scripts\activate # Windows
-
Sync project dependencies: uv sync
-
Create and configure environment variables: cp .env.example .env
Edit .env and set:
API_KEY=your_intervals_api_key_here
ATHLETE_ID=your_athlete_id_here
-
Run the MCP server (example using uv in CLI as described in the readme): mcp run src/intervals_mcp_server/server.py
Additional notes
Tips and notes:
- Ensure you set INTERVALS_API_BASE_URL, ATHLETE_ID, and API_KEY in your environment (.env) or via the hosting environment. The server uses these values to authenticate and fetch data from Intervals.icu.
- If Claude Desktop or ChatGPT reports missing endpoints, verify the server is reachable and that the SSE transport URL is correctly forwarded (you may need to expose the port or use a tunneling service like ngrok).
- The recommended startup method for local development is to run the server with uv as described in the installation steps, then configure Claude Desktop’s MCP entry with the appropriate command, arguments, and env vars.
- For troubleshooting, ensure you have the latest equivalents of the MCP SDK installed, and re-sync dependencies after any environment changes (uv sync).
- The environment variable INTERVALS_API_BASE_URL can be customized if you’re using a different base URL for Intervals.icu services.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP