A Model Context Protocol (MCP) server that integrates Strava data for marathon coaching and training analysis. This server enables Claude Desktop to access your Strava activities and provide personalized running insights.
- Recent Activity Analysis - Fetch and analyze your recent running activities
- Weekly Mileage Tracking - Calculate weekly mileage totals and trends
- Pace Trend Analysis - Analyze pace improvements and patterns over time
- Automatic Token Management - Handles Strava API token refresh automatically
- Python 3.8 or higher
- Strava account with API access
- Claude Desktop application
git clone <repository-url>
cd strava-mcp
pip install -r requirements.txt- Create a Strava API application at developers.strava.com
- Copy
.env-templateto.env:cp .env-template .env
- Fill in your actual Strava API credentials in
.env:STRAVA_CLIENT_ID=your_actual_client_id STRAVA_CLIENT_SECRET=your_actual_client_secret STRAVA_REFRESH_TOKEN=your_actual_refresh_token
python strava_mcp_server.pyThe server should start without errors. Press Ctrl+C to stop it.
Add this configuration to your Claude Desktop MCP settings:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"strava-marathon-coach": {
"command": "python",
"args": ["/absolute/path/to/strava_mcp_server.py"],
"env": {
"STRAVA_CLIENT_ID": "your_client_id",
"STRAVA_CLIENT_SECRET": "your_client_secret",
"STRAVA_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}Important: Use the absolute path to your strava_mcp_server.py file.
Restart Claude Desktop completely for the MCP server to be recognized.
| Tool | Description | Default Parameters |
|---|---|---|
get_recent_runs |
Fetches recent running activities | Last 30 days |
get_weekly_mileage |
Calculates weekly mileage totals | Last 4 weeks |
analyze_pace_trends |
Analyzes pace trends over time | Last 30 days |
Once configured, ask Claude:
- "What are my recent runs?"
- "Show me my weekly mileage for the past 4 weeks"
- "Analyze my pace trends"
- "How is my marathon training progressing?"
- Never commit your
.envfile to version control - Keep your Strava API credentials secure
- The
.env-templatefile shows the required format but contains example values only
- Verify all environment variables are set in
.env - Check Python package installation:
pip install -r requirements.txt - Validate Strava API credentials
- Ensure absolute path in Claude Desktop config
- Verify environment variables in config match your actual credentials
- Restart Claude Desktop after config changes
- Check Claude Desktop logs for connection errors
- Refresh token may be expired - re-authorize your Strava app
- Verify your Strava API app has "read activities" permissions
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details