Get the FREE Ultimate OpenClaw Setup Guide →

strava

An MCP server to interact with Strava

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yorrickjansen-strava-mcp python strava_mcp/main.py \
  --env STRAVA_CLIENT_ID="your_client_id" \
  --env STRAVA_CLIENT_SECRET="your_client_secret"

How to use

This Strava MCP Server provides a dedicated MCP interface to interact with the Strava API. It authenticates via OAuth and exposes a set of tools to fetch user data, activities, and segment leaderboards. The available tools cover common Strava data retrieval tasks: getting the authenticated user's activities, retrieving details for a specific activity, fetching activity segments, and obtaining the leaderboard for a segment. After the initial authentication flow completes, the server stores a refresh token for subsequent requests, enabling seamless access without re-authentication for each call. Use the MCP CLI to interact with the server and invoke the supported endpoints through the provided MCP interface.

How to install

Prerequisites:

  • Python 3.8+ installed
  • MCP tooling available (as part of your environment, e.g., MCP CLI)
  • uvx (optional, if following the UV-based workflow) or equivalent Python environment setup

Step-by-step installation:

  1. Install MCP tooling dependencies (examples follow the project’s guidance, e.g., via UV tooling):

    • uv install
  2. Install Python dependencies for the Strava MCP project if not already handled by the repository setup:

    • pip install -r requirements.txt (or use your preferred environment manager)
  3. Configure environment variables for Strava credentials (you can place these in a .env file or export in your shell):

    • export STRAVA_CLIENT_ID=your_client_id
    • export STRAVA_CLIENT_SECRET=your_client_secret
  4. Run the Strava MCP server:

    • mcp dev strava_mcp/main.py or, if you prefer running directly with Python:
    • python strava_mcp/main.py
  5. Access the MCP endpoints through your MCP interface once the server starts up (look for startup messages indicating successful authentication flow and available endpoints).

Additional notes

Tips and common issues:

  • Ensure STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET are correctly set; the initial authentication flow requires these credentials.
  • The first authentication will prompt you to authorize access in your browser; subsequent runs should reuse the stored refresh token.
  • If you update credentials, recreate tokens by re-authenticating.
  • For development, you may run the server in a local environment and ensure the OAuth redirect domain is accessible (the docs mention localhost for the callback).
  • If you encounter connection or rate-limit errors from Strava, consider adding appropriate error handling or retry logic in your application flow.
  • The server exposes tools for: Get User Activities, Get Activity, Get Activity Segments, and Get Segment Leaderboard; use the MCP CLI or your configured client to call these endpoints with the correct parameters.

Related MCP Servers

Sponsor this space

Reach thousands of developers