Model Context Protocol (MCP) servers that enable Claude to access your fitness and training data. This project includes servers for both Strava and intervals.icu, providing comprehensive tools and resources for analyzing your athletic performance, activities, and training metrics.
Access your Strava activities, athlete profile, and basic performance statistics.
Advanced training analytics with power curves, detailed workout analysis, wellness tracking, and comprehensive performance metrics.
get_activities- Fetch recent activities with filtering optionsget_activity_details- Get detailed information about specific activitiesget_athlete_stats- Retrieve all-time athlete statisticssearch_activities- Search activities by date range and activity type
strava://activities- Recent activities feedstrava://athlete- Athlete profile informationstrava://stats- All-time statistics summary
get_activities- List activities with advanced filtering (date, type, limit)get_activity_details- Detailed activity data with optional interval analysisget_activity_streams- Time-series data (power, heart rate, GPS, cadence, speed)search_activities- Full-text search across activities and advanced filtersget_power_curve- Athlete's power curve analysis (peak power at all durations)get_activity_power_curve- Activity-specific power analysisget_performance_analysis- Comprehensive performance metrics (power, HR, pace curves)get_best_efforts- Best effort segments and achievements for activitiesget_wellness_data- Sleep, HRV, stress, and wellness metricsget_training_calendar- Planned workouts, races, and training eventsexport_activities_csv- Export training data for external analysis
intervals://activities- Recent activities with detailed metricsintervals://athlete- Complete athlete profile and training settingsintervals://performance- Power curves, heart rate analysis, and performance metricsintervals://wellness- Sleep, HRV, and wellness tracking dataintervals://calendar- Training calendar with planned workouts and races
- Power Analysis: Mean maximal power curves, FTP tracking, power-to-weight ratios
- Heart Rate Analysis: HR curves, zone distribution, decoupling analysis
- Pace Analysis: Pace curves for running, grade-adjusted pace, best efforts
- Interval Analysis: Structured workout analysis, interval statistics, training zones
- Wellness Tracking: Sleep quality, HRV, stress, fatigue, and recovery metrics
- Training Load: CTL/ATL/TSB (fitness/fatigue/form), training stress tracking
- Multi-Sport Support: Cycling, running, swimming with sport-specific zones and metrics
Cycling: Road, Mountain, Track, Gravel, E-bike, Indoor/Trainer Running: Road, Trail, Track, Treadmill Swimming: Pool, Open Water Other: Triathlon, Walking, Hiking, Cross-training, and 30+ sport types
- Python 3.13+
- uv package manager
- Claude Desktop app
- For Strava: Strava Developer Account and API access token
- For intervals.icu: intervals.icu account and API key
- Go to Strava API Settings
- Create a new application:
- Application Name:
fitness-mcp-server - Category:
Data Importer - Authorization Callback Domain:
localhost - Upload any icon image
- Application Name:
- Copy your Access Token (you'll need this for the next step)
# Clone the repository
git clone <repository-url>
cd fitness-mcp-server
# Install dependencies
uv sync
# Copy the example environment file
cp .env.example .env
# Edit .env and add your Strava access token
# STRAVA_ACCESS_TOKEN=your_actual_access_token_here
# Test the Strava server
uv run python run_server.py- Go to intervals.icu Developer Settings
- Click "Create API Key"
- Copy your API key
- Your Athlete ID is in your profile URL:
https://intervals.icu/athletes/[YOUR_ID]
# Edit .env and add your intervals.icu credentials
# INTERVALS_API_KEY=your_intervals_icu_api_key_here
# INTERVALS_ATHLETE_ID=your_athlete_id_here
# Test the intervals.icu connection
python test_intervals.py
# Run the intervals.icu server
python run_intervals_server.pyEdit your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"intervals": {
"command": "uv",
"args": ["--directory", "/path/to/fitness-mcp-server", "run", "python", "run_intervals_server.py"],
"cwd": "/path/to/fitness-mcp-server"
}
}
}{
"mcpServers": {
"strava": {
"command": "uv",
"args": ["--directory", "/path/to/fitness-mcp-server", "run", "python", "run_server.py"],
"cwd": "/path/to/fitness-mcp-server"
},
"intervals": {
"command": "uv",
"args": ["--directory", "/path/to/fitness-mcp-server", "run", "python", "run_intervals_server.py"],
"cwd": "/path/to/fitness-mcp-server"
}
}
}Replace /path/to/fitness-mcp-server with the actual path to your project directory.
Quit and restart Claude Desktop for the MCP server configuration to take effect.
Once configured, you can ask Claude natural language questions about your fitness data. The intervals.icu server provides much more comprehensive analytics than Strava.
- "Show me my recent Strava activities"
- "What are my all-time running statistics?"
- "Get my cycling activities from last week"
- "Show me my longest run this month"
- "Show me my recent training activities"
- "Get my cycling workouts from this month"
- "Find my hardest workout this week"
- "Export my activities from January as CSV"
- "Show me my power curve for cycling"
- "Analyze my heart rate trends over the last month"
- "What are my best 20-minute power efforts this year?"
- "Compare my recent FTP progress"
- "Show my training load and form trends"
- "Analyze the intervals in my workout from yesterday"
- "Get the power data streams for activity ID 12345"
- "Show me the time-series data for my last race"
- "What were my best efforts in my last cycling workout?"
- "How has my sleep quality been this week?"
- "Show my HRV trends for the last month"
- "What's my stress level pattern?"
- "How is my recovery looking based on wellness data?"
- "What workouts do I have planned this week?"
- "Show my upcoming races and events"
- "What's on my training calendar for next month?"
- "Analyze my power-to-weight ratio improvements"
- "Show my cycling efficiency metrics"
- "Compare my running pace across different terrains"
- "What are my zone distribution patterns?"
Claude will automatically use the appropriate MCP tools to fetch and present your comprehensive training data with detailed analytics.
fitness-mcp-servers/
βββ src/
β βββ strava_mcp/ # Strava MCP Server
β β βββ server.py # Strava MCP server implementation
β β βββ models/strava_models.py # Strava data models
β β βββ utils/strava_client.py # Strava API client
β βββ intervals_mcp/ # intervals.icu MCP Server β
β βββ server.py # intervals.icu MCP server implementation
β βββ models/intervals_models.py # intervals.icu data models (comprehensive)
β βββ utils/intervals_client.py # intervals.icu API client (full-featured)
βββ run_server.py # Strava server entry point
βββ run_intervals_server.py # intervals.icu server entry point
βββ test_intervals.py # intervals.icu connection test
βββ .env.example # Environment template (both services)
βββ pyproject.toml # Project configuration
| Feature | Strava MCP | intervals.icu MCP β |
|---|---|---|
| Activities | Basic list, search | Advanced filtering, full-text search |
| Activity Details | Summary data | Detailed metrics + intervals + streams |
| Performance Data | Basic stats | Power curves, HR analysis, pace curves |
| Training Analytics | β | β Training load, CTL/ATL/TSB, zones |
| Wellness Tracking | β | β Sleep, HRV, stress, recovery |
| Workout Analysis | β | β Intervals, segments, structured analysis |
| Time-Series Data | β | β Power, HR, GPS, cadence streams |
| Training Calendar | β | β Planned workouts, races, events |
| Data Export | β | β CSV export with full metrics |
- Manually refresh tokens periodically, or
- Implement OAuth flow with refresh tokens (advanced)
For personal use, manually updating the token in your .env file when it expires is sufficient.
β Simple: intervals.icu API keys are long-lived and don't expire frequently. Much easier to manage for personal use.
"ModuleNotFoundError: No module named 'dotenv'"
- Run
uv syncto install dependencies - Ensure you're using
uv run pythonor justpythonwith proper environment
"Invalid API key" (intervals.icu)
- Verify your
INTERVALS_API_KEYin the.envfile - Check your API key at https://intervals.icu/settings/developer
- Ensure your
INTERVALS_ATHLETE_IDmatches your profile
"Invalid or expired Strava access token"
- Get a new access token from your Strava API application
- Update the
STRAVA_ACCESS_TOKENin your.envfile
"MCP server not connecting in Claude"
- Check the file path in
claude_desktop_config.jsonis correct - Restart Claude Desktop after configuration changes
- Test the server runs without errors:
python test_intervals.py
# Test intervals.icu connection
python test_intervals.py
# Run intervals.icu server directly (recommended)
python run_intervals_server.py
# Run Strava server
uv run python run_server.py- Strava: Extend
@app.list_tools()and@app.call_tool()insrc/strava_mcp/server.py - intervals.icu: Extend handlers in
src/intervals_mcp/server.py(more comprehensive API available)
- Fork the repository
- Create a feature branch
- Add your changes
- Test with your fitness data (Strava and/or intervals.icu)
- Submit a pull request
intervals.icu offers significantly more comprehensive training data access compared to Strava:
- Complete Training Analytics: Power curves, training load modeling, fitness/fatigue tracking
- Detailed Workout Analysis: Interval breakdowns, structured training analysis, best efforts
- Wellness Integration: Sleep, HRV, stress tracking for comprehensive health monitoring
- Advanced Performance Metrics: Sport-specific zones, equipment tracking, weather correlation
- Time-Series Data Access: Full access to power, heart rate, GPS, and sensor data streams
- Training Planning: Calendar integration with planned workouts and periodization
- Better API: More stable, comprehensive, and easier to use than Strava's API
For serious athletes and coaches, the intervals.icu MCP server provides AI assistants with the depth of data needed for meaningful training insights and performance analysis.
MIT License - see LICENSE file for details.
This project is not affiliated with Strava or intervals.icu. It uses the official APIs to access your personal fitness data. Your data remains private and is only accessible through your own MCP server instance. Always review API permissions and terms of service for each platform.