Skip to main content
Glama

Strava MCP Server

A Model Context Protocol (MCP) server that connects to the Strava API, allowing AI agents to retrieve athlete stats, list activities, and get detailed activity information.

Prerequisites

  • Python 3.10+

  • Strava Account

  • Strava API Application (to get Client ID and Secret)

Setup

1. Credentials

  1. Go to Strava API Settings.

  2. Create an application if you haven't already.

  3. Note your Client ID and Client Secret.

  4. You need a Refresh Token.

    • The easiest way to get one for your own account is to use the Strava OAuth playground or follow the Strava authentication docs to authorize your app and get the initial refresh token.

    • Scope required: activity:read_all,read_all (adjust based on needs).

2. Installation

Clone this repository and enter the directory.

Using

uv sync source .venv/bin/activate

Using standard

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

3. Configuration

  1. Copy .env.example to .env.

  2. Fill in your credentials.

cp .env.example .env # Edit .env with your favorite editor

Usage

Run the server using fastmcp:

fastmcp run server.py

Or run it directly with Python (if the main block calls mcp.run()):

python server.py

Available Tools

  • get_athlete_stats: Get statistics for the authenticated athlete.

  • list_activities: List recent activities (default limit: 5).

  • get_activity_details: Get detailed information for a specific activity ID.

Development

  • Modify server.py to add more tools using the stravalib client.

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

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

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