Skip to main content
Glama

Strava MCP Server

by tomekkorbak

Strava MCP サーバー

Pythonパッケージ ライセンス: MIT Python 3.10

Strava APIへのアクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。言語モデルがStrava 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 ) で指定する必要があります。

アクティビティデータ形式

サーバーは、一貫したフィールド名と単位を持つアクティビティ データを返します。

分野

説明

ユニット

name

アクティビティ名

-

sport_type

スポーツの種類

-

start_date

開始日時

ISO 8601

distance_metres

距離

メートル

elapsed_time_seconds

合計経過時間

moving_time_seconds

移動時間

average_speed_mps

平均速度

メートル毎秒

max_speed_mps

最高速度

メートル毎秒

total_elevation_gain_metres

総標高差

メートル

elev_high_metres

最高標高

メートル

elev_low_metres

最低標高

メートル

calories

消費カロリー

キロカロリー

start_latlng

開始座標

[緯度、経度]

end_latlng

終了座標

[緯度、経度]

認証

このサーバーを使用するには、Strava APIで認証する必要があります。以下の手順に従ってください。

  1. Strava API アプリケーションを作成します。

    • Strava API設定に移動

    • クライアントIDとクライアントシークレットを取得するためのアプリケーションを作成する

    • 認証コールバックドメインをlocalhostに設定する

  2. リフレッシュトークンを取得します:

    • 付属のget_strava_token.pyスクリプトを使用します: GXP1

    • 指示に従ってアプリケーションを承認してください

    • スクリプトはトークンを.envファイルに保存します

  3. 環境変数を設定する: サーバーには次の環境変数が必要です。

    • STRAVA_CLIENT_ID : Strava APIクライアントID

    • STRAVA_CLIENT_SECRET : Strava APIクライアントシークレット

    • STRAVA_REFRESH_TOKEN : Strava API リフレッシュトークン

使用法

デスクトップ版クロード

claude_desktop_config.json (macOS では~/Library/Application\ Support/Claude/claude_desktop_config.json 、Windows では%APPDATA%/Claude/claude_desktop_config.jsonにあります) を更新して、以下を追加します。

{ "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" } } } }

クロード・ウェブ

Claude Web の場合、サーバーをローカルで実行し、MCP 拡張機能を使用して接続できます。

クエリの例

接続すると、次のような質問をクロードに尋ねることができます。

  • 「私の最近の活動は何ですか?」

  • 「先週のアクティビティを見せてください」

  • 「過去 1 か月間での最長ランニング距離はどれくらいでしたか?」

  • 「最近のサイクリングアクティビティの詳細を取得する」

エラー処理

サーバーは、一般的な問題に関して人間が判読できるエラー メッセージを提供します。

  • 無効な日付形式

  • API認証エラー

  • ネットワーク接続の問題

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

言語モデルに Strava API データへのアクセスを提供し、Strava からアスリートのアクティビティをクエリおよび分析できるようにするモデル コンテキスト プロトコル サーバー。

  1. 利用可能なツール
    1. アクティビティクエリ
  2. アクティビティデータ形式
    1. 認証
      1. 使用法
        1. デスクトップ版クロード
        2. クロード・ウェブ
      2. クエリの例
        1. エラー処理
          1. ライセンス

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              Integration Strava API с Model Context Protocol SDK
              Last updated -
              4
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that provides language models with access to personal Whoop fitness data, allowing queries for cycles, recovery, strain, and workout information from the Whoop API.
              Last updated -
              12
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.
              Last updated -
              2
              MIT License
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              A 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 updated -
              3
              4
              MIT License
              • Apple

            View all related MCP servers

            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/tomekkorbak/strava-mcp-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server