I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

mcp-server-strava
Интеграция Strava API с Model Context Protocol SDK
3 years
Works with Finder
1
Github Watches
1
Github Forks
0
Github Stars
Интеграция Strava API с Model Context Protocol (MCP) SDK
Интеграция для анализа тренировок и получения рекомендаций на основе данных Strava с использованием Model Context Protocol SDK.
🚀 Возможности
- Анализ тренировок из Strava
- Рекомендации по тренировкам
- Автоматическое обновление токенов
- Rate limiting для API запросов
📋 Требования
- Python 3.10+
- Claude Desktop
- Strava аккаунт
- uv (рекомендуется)
⚙️ Установка
# Клонируем репозиторий
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 и примеры
Ресурсы и инструменты
Тип | Название | Описание |
---|---|---|
Ресурс | strava://activities |
Список активностей |
Ресурс | strava://activities/{id} |
Детали активности |
Ресурс | strava://athlete/zones |
Тренировочные зоны |
Ресурс | strava://athlete/clubs |
Клубы атлета |
Ресурс | strava://gear/{gear_id} |
Информация о снаряжении |
Инструмент | analyze_activity(activity_id) |
Анализ тренировки |
Инструмент | analyze_training_load(activities) |
Анализ нагрузки |
Инструмент | get_activity_recommendations() |
Рекомендации |
Примеры использования
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
в.gitignore
- GitHub 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
📄 Лицензия
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Therapist adept at identifying core issues and offering practical advice with images.
Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.
Mirror ofhttps://github.com/agentience/practices_mcp_server
Mirror ofhttps://github.com/bitrefill/bitrefill-mcp-server
Reviews

user_AnvSFjln
As a dedicated MCP application user, I highly recommend the Learning Assistant Server by ktwome. This tool has significantly improved my learning experience by offering seamless integration and user-friendly interfaces. The functionality and support for various learning modules are exceptional, making it a must-have for any serious learner. Check it out at https://mcp.so/server/Learning-Assistant-Server/ktwome.