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 с Model Context Protocol (MCP) SDK
Интеграция для анализа тренировок и получения рекомендаций на основе данных Strava с использованием Model Context Protocol SDK.
🚀 Возможности
Анализ тренировок из Strava
Рекомендации по тренировкам
Автоматическое обновление токенов
Rate limiting для API запросов
Related MCP server: Strava MCP Server
📋 Требования
⚙️ Установка
# Клонируем репозиторий
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]"Установка MCP SDK
uv add "mcp[cli]"🔧 Настройка
Настройка Strava API
Перейдите на страницу настроек API
Создайте приложение:
Application Name: MCP Strava Integration
Category: Training Analysis
Website: http://localhost
Authorization Callback Domain: localhost
Настройка окружения
Создайте файл с переменными окружения:
cp .env-template .envПолучите токены доступа:
python scripts/auth.pyПроверьте настройку:
mcp dev src/server.py curl -X GET "http://localhost:8000/activities"
📚 API и примеры
Ресурсы и инструменты
Тип | Название | Описание |
Ресурс |
| Список активностей |
Ресурс |
| Детали активности |
Ресурс |
| Тренировочные зоны |
Ресурс |
| Клубы атлета |
Ресурс |
| Информация о снаряжении |
Инструмент |
| Анализ тренировки |
Инструмент |
| Анализ нагрузки |
Инструмент |
| Рекомендации |
Примеры использования
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}
]
}
}
"""🛠 Разработка
CI/CD и безопасность
Проверки в GitHub Actions
Тип | Инструмент | Описание |
Линтинг | ruff | Форматирование и анализ кода |
Тесты | pytest | Unit и интеграционные тесты |
Покрытие | pytest-cov | Отчет о покрытии кода |
Безопасность и секреты
Защита токенов:
.envв.gitignoreGitHub Secrets для CI/CD
Rate limiting: 100 запросов/15 мин
Настройка секретов:
# В GitHub: Settings → Secrets → Actions STRAVA_CLIENT_ID=<client_id> STRAVA_CLIENT_SECRET=<client_secret> STRAVA_REFRESH_TOKEN=<refresh_token>
Contributing
Форкните репозиторий
Установите зависимости:
uv pip install -e ".[dev]"Создайте ветку:
git checkout -b feature/nameПроверьте изменения:
ruff format . ruff check . pytest --cov=srcСоздайте Pull Request
📫 Поддержка
GitHub Issues: создать issue
Telegram: @greg_kisel
📄 Лицензия
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.Last updated422MIT
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.Last updated6MIT
- 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.Last updated34MIT
- AlicenseBqualityDmaintenanceIntegrates with the Strava API to allow AI assistants to access fitness data including athlete profiles, activity history, and segment statistics. It enables users to query detailed performance metrics and explore geographic segment data through natural language commands.Last updated8108MIT
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