mcp-server-strava
Allows analysis of Strava workouts and provides training recommendations based on Strava data using the Model Context Protocol SDK
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-stravaanalyze my last 5 running activities and give me training recommendations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
# Клонируем репозиторий
git clone https://github.com/rbctmz/mcp-server-strava.git
cd mcp-server-strava
# Установка через uv (рекомендуется)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install .
# Установка в режиме разработки
uv pip install -e ".[dev]"Installing MCP SDK
uv add "mcp[cli]"🔧 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
from mcp import ClientSession
# Получение активностей
async with ClientSession() as session:
activities = await session.read_resource("strava://activities")
activity = await session.read_resource("strava://activities/12345678")
# Анализ тренировки
result = analyze_activity(activity_id="12345678")
"""
{
"type": "Run",
"distance": 5000,
"moving_time": 1800,
"analysis": {
"pace": 5.5, # мин/км
"effort": "Средняя"
}
}
"""
# Анализ нагрузки
summary = analyze_training_load(activities)
"""
{
"activities_count": 10,
"total_distance": 50.5, # км
"total_time": 5.2, # часы
"heart_rate_zones": {
"easy": 4, # ЧСС < 120
"medium": 4, # ЧСС 120-150
"hard": 2 # ЧСС > 150
}
}
"""
# Получение тренировочных зон
async with ClientSession() as session:
zones = await session.read_resource("strava://athlete/zones")
"""
{
"heart_rate": {
"custom_zones": true,
"zones": [
{"min": 0, "max": 120, "name": "Z1 - Recovery"},
{"min": 120, "max": 150, "name": "Z2 - Endurance"},
{"min": 150, "max": 170, "name": "Z3 - Tempo"},
{"min": 170, "max": 185, "name": "Z4 - Threshold"},
{"min": 185, "max": -1, "name": "Z5 - Anaerobic"}
]
},
"power": {
"zones": [
{"min": 0, "max": 180},
{"min": 181, "max": 250},
{"min": 251, "max": 300},
{"min": 301, "max": 350},
{"min": 351, "max": -1}
]
}
}
"""🛠 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
📄 License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides language models with access to Strava API data, allowing them to query and analyze athlete activities from Strava.422MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.6MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables users to access Strava fitness data, including user activities, activity details, segments, and leaderboards through a structured API interface.34MIT
- AlicenseAqualityAmaintenanceModel Context Protocol server for VK (VKontakte) social network API191499MIT
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
List, fetch, create, edit (replace), delete and schedule structured workouts on Garmin Connect (runn
AI soigneur for cyclists: Strava ride to an Ien-Vitse-validated nutrition plan + orderable box.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rbctmz/mcp-server-strava'
If you have feedback or need assistance with the MCP directory API, please join our Discord server