
tomekkorbak/strava-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Strava API 통합을 위한 MCP 서버
개요
Strava API에 액세스 할 수있는 Model Context Protocol (MCP) 서버. 그것은 스트라바 API에서 선수 활동 데이터를 쿼리 할 수있는 언어 모델을 허용합니다. - get activities(한도: int = 10): get activities by date range(start date: str, end date: str, limit: int = 30): 특정 날짜 범위 내에서 활동 가져오기 - get activity by id(activity id: int): 특정 활동에 대한 자세한 정보를 얻기 - get recent activities(일: int = 7, limit: int = 10): 과거 X 일에서 활동하기 날짜는 ISO 체재 (YYYYY-MM-DD)에서 제공되어야 합니다. 서버는 일관된 필드 이름과 단위로 활동 데이터를 반환합니다: 이 서버를 사용하려면 Strava API로 인증해야합니다. 이 단계를 따르십시오: 1. Strava API 애플리케이션 만들기: - Strava API 설정으로 이동 - 클라이언트 ID 및 클라이언트 비밀을 얻기 위해 응용 프로그램을 생성 - Authorization Callback Domain을 Localhost로 설정 2. 명세.
개요(AI 번역)
Strava API에 액세스 할 수있는 Model Context Protocol (MCP) 서버. 그것은 스트라바 API에서 선수 활동 데이터를 쿼리 할 수있는 언어 모델을 허용합니다.
사용 가능한 도구
서버는 다음과 같은 도구를 노출:
활동 쿼리
get_activities(limit: int = 10): 정통 선수의 최근 활동 얻기get_activities_by_date_range(start_date: str, end_date: str, limit: int = 30): 특정 날짜 범위 내의 활동get_activity_by_id(activity_id: int): 특정 활동에 대한 자세한 정보 얻기get_recent_activities(days: int = 7, limit: int = 10): 과거 X 일에서 활동하기
날짜는 ISO 형식으로 제공됩니다 (YYYY-MM-DD).
활동 자료 체재
서버는 일관된 필드 이름과 단위로 활동 데이터를 반환합니다:
| 필드 | 설명 | 단위 |
|---|---|---|
| [T5] | 활동명 | - |
| [T6] | 스포츠의 종류 | - |
| [T7] | 시작일 및 시간 | ISO 8601 |
| [T8] | 거리 | 미터 |
| [T9] | 총 탈출 시간 | 초 |
| [T10] | 이동 시간 | 초 |
| [T11] | 평균 속도 | 초당 미터 |
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Strava MCP Server
A Model Context Protocol (MCP) server that provides access to the Strava API. It allows language models to query athlete activities data from the Strava API.
Available Tools
The server exposes the following tools:
Activities Queries
get_activities(limit: int = 10): Get the authenticated athlete’s recent activitiesget_activities_by_date_range(start_date: str, end_date: str, limit: int = 30): Get activities within a specific date rangeget_activity_by_id(activity_id: int): Get detailed information about a specific activityget_recent_activities(days: int = 7, limit: int = 10): Get activities from the past X days
Dates should be provided in ISO format (YYYY-MM-DD).
Activity Data Format
The server returns activity data with consistent field names and units:
| Field | Description | Unit |
|---|---|---|
name |
Activity name | - |
sport_type |
Type of sport | - |
start_date |
Start date and time | ISO 8601 |
distance_metres |
Distance | meters |
elapsed_time_seconds |
Total elapsed time | seconds |
moving_time_seconds |
Moving time | seconds |
average_speed_mps |
Average speed | meters per second |
max_speed_mps |
Maximum speed | meters per second |
total_elevation_gain_metres |
Total elevation gain | meters |
elev_high_metres |
Highest elevation | meters |
elev_low_metres |
Lowest elevation | meters |
calories |
Calories burned | kcal |
start_latlng |
Start coordinates | [lat, lng] |
end_latlng |
End coordinates | [lat, lng] |
Authentication
To use this server, you’ll need to authenticate with the Strava API. Follow these steps:
-
Create a Strava API application:
- Go to Strava API Settings
- Create an application to get your Client ID and Client Secret
- Set the Authorization Callback Domain to
localhost
-
Get your refresh token:
- Use the included
get_strava_token.pyscript:
python get_strava_token.py- Follow the prompts to authorize your application
- The script will save your tokens to a
.envfile
- Use the included
-
Set environment variables: The server requires the following environment variables:
설치
uvx strava-mcp-server설정
{
"mcpServers": {
"strava": {
"command": "uvx",
"args": [
"strava-mcp-server"
],
"env": {
"STRAVA_CLIENT_ID": "YOUR_CLIENT_ID",
"STRAVA_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"STRAVA_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
}
}
}
}