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

MCP-Server-Strava
Интеver
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.
This GPT assists in finding a top-rated business CPA - local or virtual. We account for their qualifications, experience, testimonials and reviews. Business operators provide a short description of your business, services wanted, and city or state.
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Converts Figma frames into front-end code for various mobile frameworks.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.
Die All-in-One-Desktop & Docker-AI-Anwendung mit integriertem Lappen, AI-Agenten, No-Code-Agent Builder, MCP-Kompatibilität und vielem mehr.
Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.
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.