Strava

Provides access to Strava data via an MCP server, enabling activities, athlete stats, routes, and social interactions.
  • python

3

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ctvidic-strava-mcp-server": {
      "command": "python",
      "args": [
        "src/strava_server.py"
      ],
      "env": {
        "STRAVA_CLIENT_ID": "your_client_id",
        "STRAVA_CLIENT_SECRET": "your_client_secret",
        "STRAVA_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

You run a Strava MCP Server that exposes Strava data to language models, enabling you to query activities, athlete stats, routes, and social interactions through an MCP client. This server makes it possible to analyze workouts, visualize routes, track achievements, and engage with social features programmatically.

How to use

Connect your MCP client to the Strava MCP Server to start querying data. You can request recent activities, pull details for a specific activity, view route maps, and fetch athlete statistics. Use these capabilities to perform performance analyses, compare time periods, inspect elevation and heart rate data, and explore social interactions like kudos and comments. The server exposes endpoints via a local process you run or through an HTTP API you can call from your tooling.

How to install

Prerequisites: Python 3.12 or newer, Strava API credentials, and pip.

Step 1: Clone the project and navigate into the directory.

git clone https://github.com/yourusername/strava_mcp.git
cd strava_mcp

Step 2: Create and activate a virtual environment.

python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate

Step 3: Install dependencies.

pip install -r requirements.txt

Configuration

Create a configuration file with your Strava API credentials. You will provide the values to the server when running it.

Example environment variables to set (values are placeholders):

STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REFRESH_TOKEN=your_refresh_token

Usage with the MCP client

To connect your MCP client, start the Strava MCP server process and configure the client to point at the local or remote server. You can then issue queries such as requesting your recent activities, getting details for a specific workout, or fetching athlete statistics.

Configuration example for MCP client

{
  "mcpServers": {
    "Strava": {
      "command": "python",
      "args": ["src/strava_server.py"],
      "cwd": "/path/to/strava_mcp",
      "env": {
        "STRAVA_CLIENT_ID": "your_client_id",
        "STRAVA_CLIENT_SECRET": "your_client_secret",
        "STRAVA_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

Security and best practices

Never commit sensitive credentials into source control. Use environment variables to manage secret values and keep your credentials out of any shared configuration. Use separate credentials for development and production environments.

Notes

If you plan to expose the server via HTTP for remote clients, ensure you secure the endpoint and restrict access appropriately. The provided configuration snippet demonstrates a local, self-contained setup using a Python process.

Available tools

ActivityQuery

Query activities with filters such as time range, distance, pace, and route details.

PerformanceAnalysis

Compute and compare statistics like weekly mileage, elevation gain, and pace across time periods.

SocialQuery

Fetch kudos, comments, and social interactions related to activities and clubs.

RouteInfo

Retrieve route information, elevation profiles, and map visualizations for activities.

DataExposure

Provide data endpoints for activity details, athlete statistics, and route information.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational