Allows analysis of Strava workouts and provides training recommendations based on Strava data using the Model Context Protocol SDK
Strava API integration with Model Context Protocol (MCP) SDK
Integration for training analysis and recommendations based on Strava data using the Model Context Protocol SDK.
🚀 Features
Analysis of workouts from Strava
Training Recommendations
Automatic token update
Rate limiting for API requests
Related MCP server: Strava MCP Server
📋 Requirements
⚙️ Installation
Installing MCP SDK
🔧 Setting
Setting up Strava API
Go to the API settings page
Create an application:
Application Name: MCP Strava Integration
Category: Training Analysis
Website: http://localhost
Authorization Callback Domain: localhost
Setting up the environment
Create a file with environment variables:
cp .env-template .envGet access tokens:
python scripts/auth.pyCheck the setting:
mcp dev src/server.py curl -X GET "http://localhost:8000/activities"
📚 API and examples
Resources and Tools
Type | Name | Description |
Resource |
| List of activities |
Resource |
| Activity details |
Resource |
| Training zones |
Resource |
| Athlete's clubs |
Resource |
| Equipment Information |
Tool |
| Training Analysis |
Tool |
| Load analysis |
Tool |
| Recommendations |
Examples of use
🛠 Development
CI/CD and Security
Checks in GitHub Actions
Type | Tool | Description |
Linting | ruff | Code formatting and analysis |
Tests | pytest | Unit and integration tests |
Coating | pytest-cov | Code Coverage Report |
Security and Secrets
Token protection:
.envto.gitignoreGitHub Secrets for CI/CD
Rate limiting: 100 requests/15 min
Setting up secrets:
# В GitHub: Settings → Secrets → Actions STRAVA_CLIENT_ID=<client_id> STRAVA_CLIENT_SECRET=<client_secret> STRAVA_REFRESH_TOKEN=<refresh_token>
Contributing
Fork the repository
Install dependencies:
uv pip install -e ".[dev]"Create a branch:
git checkout -b feature/nameCheck the changes:
ruff format . ruff check . pytest --cov=srcCreate a Pull Request
📫 Support
GitHub Issues: create issue
Telegram: @greg_kisel