# r-huijts/strava-mcp [Health: Active]

**Category:** 🏃 Sports  
**Repository:** https://github.com/r-huijts/strava-mcp  
**GitHub Stars:** 509  
**npm Downloads (last month):** 2521  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/r-huijts-strava-mcp

## Description
A Model Context Protocol (MCP) server that connects to Strava API, providing tools to access Strava data through LLMs

## Tools
Capabilities this server exposes over MCP:

- **get-athlete-profile** — Fetches the profile information for the authenticated athlete, including their unique numeric ID needed for other tools like get-athlete-stats.
- **get-athlete-stats** — Fetches the activity statistics (recent, YTD, all-time) for a specific athlete using their ID. Requires the athleteId obtained from the get-athlete-profile tool.
- **get-activity-details** — Fetches detailed information about a specific activity using its ID.
- **get-recent-activities** — Fetches the most recent activities for the authenticated athlete.
- **list-athlete-clubs** — Lists the clubs the authenticated athlete is a member of.
- **list-starred-segments** — Lists the segments starred by the authenticated athlete.
- **get-segment** — Fetches detailed information about a specific segment using its ID.
- **explore-segments** — Searches for popular segments within a given geographical area.
- **star-segment** — Stars or unstars a specific segment for the authenticated athlete.
- **get-segment-effort** — Fetches detailed information about a specific segment effort using its ID.
- **list-segment-efforts** — Lists the authenticated athlete's efforts on a specific segment, optionally filtering by date.
- **list-athlete-routes** — Lists the routes created by the authenticated athlete, with pagination.
- **get-route** — Fetches detailed information about a specific route using its ID.
- **export-route-gpx** — Exports a specific Strava route in GPX format and saves it to a pre-configured local directory.
- **export-route-tcx** — Exports a specific Strava route in TCX format and saves it to a pre-configured local directory.
- **get-activity-streams** — Retrieves detailed time-series data streams from a Strava activity. Perfect for analyzing workout metrics, visualizing routes, or performing detailed activity analysis.

Key Features:
1. Multiple Data Types: Access various metrics like heart rate, power, speed, GPS coordinates, etc.
2. Flexible Resolution: Choose data density from low (~100 points) to high (~10000 points)
3. Smart Pagination: Get data in manageable chunks optimized for LLM context limits
4. Rich Statistics: Includes min/max/avg for numeric streams
5. Dual Format Support: Compact (LLM-optimized) or verbose (human-readable)
6. Intelligent Downsampling: Automatically reduce large datasets while preserving key features

Format Options:
- compact (default): Raw arrays, minified JSON, ~70-80% smaller payloads, ideal for LLM processing
- verbose: Human-readable objects with formatted values, backward compatible with legacy format

Common Use Cases:
- Analyzing workout intensity through heart rate zones
- Calculating power metrics for cycling activities
- Visualizing route data using GPS coordinates
- Analyzing pace and elevation changes
- Detailed segment analysis

Output Format:
1. Metadata: Activity overview, available streams, data points, units, format info
2. Statistics: Summary stats for each stream type (max/min/avg where applicable)
3. Data: Time-series data in compact arrays or verbose objects (based on format parameter)

Notes:
- Requires activity:read scope
- Not all streams are available for all activities
- Older activities might have limited data
- Large activities are automatically chunked to ~50KB per message
- Use max_points parameter to downsample very large activities intelligently
- **get-activity-laps** — 
Retrieves detailed lap data for a specific Strava activity.

Use Cases:
- Get complete lap data including timestamps, speeds, and metrics
- Access raw values for detailed analysis or visualization
- Extract specific lap metrics for comparison or tracking

Parameters:
- id (required): The unique identifier of the Strava activity.

Output Format:
Returns both a human-readable summary and complete JSON data for each lap, including:
1. A text summary with formatted metrics
2. Raw lap data containing all fields from the Strava API:
   - Unique lap ID and indices
   - Timestamps (start_date, start_date_local)
   - Distance and timing metrics
   - Speed metrics (average and max)
   - Performance metrics (heart rate, cadence, power if available)
   - Elevation data
   - Resource state information
   - Activity and athlete references

Notes:
- Requires activity:read scope for public/followers activities, activity:read_all for private activities
- Returns complete data as received from Strava API without omissions
- All numeric values are preserved in their original precision

- **get-athlete-zones** — Retrieves the authenticated athlete's configured heart rate and power zones.

Output includes both a formatted summary and the raw JSON data.
- **get-all-activities** — Fetches complete activity history with optional filtering by date range and activity type. Supports pagination to retrieve all activities.
- **get-activity-photos** — 
Retrieves photos associated with a specific Strava activity.

Use Cases:
- Fetch all photos uploaded to an activity
- Get photo URLs for display or download
- Access photo metadata including location and timestamps

Parameters:
- id (required): The unique identifier of the Strava activity.
- size (optional): Size of photos to return in pixels (e.g., 100, 600, 2048). If not specified, returns all available sizes.

Output Format:
Returns both a human-readable summary and complete JSON data for each photo, including:
1. A text summary with photo count and URLs
2. Raw photo data containing all fields from the Strava API:
   - Photo ID and unique identifier
   - URLs for different sizes
   - Source (1 = Strava, 2 = Instagram)
   - Timestamps (uploaded_at, created_at)
   - Location coordinates if available
   - Caption if provided

Notes:
- Requires activity:read scope for public/followers activities, activity:read_all for private activities
- Photos may come from Strava uploads or linked Instagram posts
- Returns empty array if activity has no photos

- **get-server-version** — Returns the Strava MCP server version and related metadata.
- **connect-strava** — Connect your Strava account to enable activity tracking. This will open a browser window for secure authentication. Use this when the user asks to connect, link, or authenticate their Strava account.
- **disconnect-strava** — Disconnect your Strava account and remove stored credentials. Use this when the user wants to logout, disconnect, or remove their Strava connection.
- **check-strava-connection** — Check if Strava is connected and show the current connection status. Use this when the user asks about their connection status.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "strava-mcp": {
    "command": "npx",
    "args": ["-y","@r-huijts/strava-mcp-server"]
  }
}
```

## Documentation

## What r-huijts/strava-mcp MCP server does

The r-huijts/strava-mcp MCP server exposes Strava account and activity data as MCP tools for an AI client. It can retrieve the authenticated athlete's profile, recent or filtered activity history, statistics, configured heart-rate and power zones, clubs, routes, and starred segments. Activity-focused tools provide detailed records, laps, photos, and time-series streams such as heart rate, power, speed, GPS coordinates, pace, and elevation.

The server also supports segment discovery and management. Agents can search for popular segments in a geographic area, inspect segment and effort details, list an athlete's efforts, and star or unstar segments. Route tools list created routes, retrieve route details, and export routes as GPX or TCX files to a configured local directory.

## How it works

The package runs as a standard stdio MCP server. A client starts it with `npx`, a globally installed executable, or a locally built Node.js entry point. After the server is available, the `connect-strava` tool opens a browser-based setup flow. The user enters Strava API application credentials, authorizes access on Strava, and returns to the client. Connection status and disconnection are handled through separate tools.

Activity stream retrieval is designed for large datasets. The caller can select a resolution with `max_points`; large results are downsampled and divided into messages of about 50 KB. Responses include activity metadata, available streams, units, and statistics such as minimum, maximum, and average values where applicable. Compact output uses smaller arrays and minified JSON, while verbose output provides more readable objects. Stream availability depends on the activity and its recorded data.

## Setup and configuration

The documented quick-start configuration uses Claude Desktop with `npx -y @r-huijts/strava-mcp-server`. Claude Code can add the same stdio server with `claude mcp add --transport stdio`. The package can also be installed globally with npm or built from the GitHub source using `npm install` and `npm run build`.

The r-huijts/strava-mcp MCP server requires a Strava API application with a localhost authorization callback domain. Client ID and client secret are entered through the browser setup flow rather than supplied as documented environment variables. Configuration and saved credentials are stored locally at `~/.config/strava-mcp/config.json`.

Use `check-strava-connection` to inspect the current status, `connect-strava` to authenticate or reconnect, and `disconnect-strava` to remove the stored connection.

## Tools and capabilities

- Retrieve athlete profiles, stats, zones, clubs, and complete or recent activity lists.
- Fetch activity details, laps, photos, and detailed time-series streams.
- Analyze stream data in compact or verbose formats with statistics and downsampling.
- List, inspect, search, star, and unstar Strava segments and review segment efforts.
- List routes, inspect route details, and export routes as GPX or TCX files.
- Connect, inspect, and disconnect the Strava account.
- Return the server version and related metadata.

## Limitations and notes

The r-huijts/strava-mcp MCP server depends on the permissions granted by Strava. Activity streams require the `activity:read` scope. Lap and photo access for private activities requires `activity:read_all`; public or follower-visible data can use `activity:read` as documented. Older activities may contain fewer streams, and not every activity provides every metric.

The athlete statistics tool requires the numeric athlete ID returned by the profile tool. Large activity responses are automatically chunked, and callers can use `max_points` to control data density. Route exports are saved locally, so the client environment must provide the configured destination.

_Full upstream README: https://allmcps.com/mcp/r-huijts-strava-mcp/readme_

