Strava MCP Server logo

Strava MCP Server

by r-huijts

The Strava MCP Server is a TypeScript project that acts as a bridge between Large Language Models (LLMs) and the Strava API, exposing Strava data and functionalities as tools through the Model Context Protocol (MCP) standard. It allows LLMs to interact with your Strava data using natural language.

View on GitHub

Last updated: N/A

What is Strava MCP Server?

The Strava MCP Server is a bridge that allows Large Language Models (LLMs) to access and utilize data from the Strava API. It implements the Model Context Protocol (MCP) to expose Strava functionalities as tools that LLMs can use to answer questions and perform actions related to a user's Strava data.

How to use Strava MCP Server?

To use the server, you need to install it, configure it within your LLM (e.g., Claude), authenticate with the Strava API, and then restart the LLM. Once set up, you can ask the LLM questions about your Strava data or request actions to be performed, using natural language.

Key features of Strava MCP Server

  • Access recent activities, profile, and stats.

  • Fetch detailed activity streams (power, heart rate, cadence, etc.).

  • Explore, view, star, and manage segments.

  • View detailed activity and segment effort information.

  • List and view details of saved routes.

  • Export routes in GPX or TCX format.

  • AI-friendly JSON responses via MCP.

Use cases of Strava MCP Server

  • Asking an AI assistant about recent Strava activities.

  • Requesting heart rate data from a specific run.

  • Finding starred segments near a location.

  • Exporting a saved route as a GPX file.

  • Analyzing workout intensity through heart rate zones

  • Creating a personalized analysis of your most recent Strava activity, complete with professional coaching feedback and a custom visualization dashboard.

FAQ from Strava MCP Server

What is MCP?

Model Context Protocol (MCP) is a standard for enabling LLMs to access and utilize external data and functionalities.

What Strava API version does this server use?

This server uses Strava API V3.

How do I authenticate with the Strava API?

You need to create a Strava API application and then use the provided setup-auth.ts script to complete the authentication flow.

What environment variables are required?

The required environment variables are STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET, STRAVA_ACCESS_TOKEN, and STRAVA_REFRESH_TOKEN. ROUTE_EXPORT_PATH is optional.

How does token refreshing work?

The server automatically refreshes the access token using the refresh token when it expires, updating both the running process and the .env file.

Strava MCP Server - MCP Server | MCP Directory