Strava MCP Server is a server based on the Model Context Protocol (MCP), designed to connect the Strava API with large language models (such as Claude), enabling users to access and analyze their own Strava activity data through natural language conversations. This project was developed by r-huijts, with the code hosted on GitHub and licensed under the MIT License.
Purpose The main purpose of this tool is to allow AI assistants to directly access a user's Strava account data, so they can answer questions about activity records, training analysis, route exploration, and more. Users only need to ask questions in everyday language, such as "How many kilometers did I run this month?", "Analyze my last ride", or "Show my fastest segments", and the AI can call Strava data and return the results.
Main Capabilities Through this MCP server, the AI can perform a variety of operations related to Strava data, including: tracking progress (such as counting monthly running volume, comparing data from different months, and finding the longest ride); analyzing workouts (such as breaking down cycling power, heart rate, and cadence, viewing heart rate zones, and calculating average pace per lap); exploring routes and segments (such as finding popular segments, displaying starred segments, and exporting GPX files); and obtaining coaching insights (such as analyzing training load, comparing current fitness, and summarizing annual performance). The server implements about 25 tools, covering data such as account and profile, activities, segments, and statistics. It also specifically optimizes activity stream data, using a compact format by default, which can reduce payload size by 70-80%, and automatically processes large activities in chunks.
How to Use Using this tool requires several steps. First, users need to add the MCP server configuration in Claude Desktop or Claude Code. For Claude Desktop, edit the configuration file (the Mac path is ~/Library/Application Support/Claude/claude_desktop_config.json, and the Windows path is %APPDATA%\Claude\claude_desktop_config.json), add the server configuration, and then restart Claude. For Claude Code, it can be added via the command line. Second, users need to create a Strava API application to obtain the Client ID and Client Secret (at strava.com/setcreated by tings/api, the callback domain must be localhost). Then, say "Connect my Strava account" in Claude, and the browser will open the settings page, where you enter your credentials and authorize. The credentials will be saved locally in ~/.config/strava-mcp/config.json. Environment variables can also be used for authentication, and the server will automatically refresh expired tokens. There are three installation methods: use npx directly (recommended, no installation required), global installation (npm install -g @r-huijts/strava-mcp-server), or build from source (for developers).
Use Cases This tool is suitable for various sports enthusiasts, coaches, or data analysts who want to use AI to quickly query and analyze Strava data. Specific scenarios include: quick review after daily training, monthly or annual workout statistics, detailed heart rate and power analysis, finding nearby new routes or challenging segments, exporting route files, etc. Through natural language interaction, it lowers the barrier to data access, with no need to manually operate the Strava interface or export data.
Limitations and Notes Users need to have their own Strava account and create an API application, which requires a one-time setup. The authentication process relies on a browser and a local port (8111), and may be affected by firewalls. The tool itself does not provide data storage or analysis algorithms; all data comes from the Strava API. In addition, some features may be limited by the Strava API (such as rate limits), and the AI platform needs to support the MCP protocol (such as Claude). For other LLM platforms, additional adaptation may be required. The documentation does not mention mobile support or detailed pricing information; the project is free and open source.
Troubleshooting Common issues include the browser failing to open (check the firewall and port), authentication failure (expired token, need to reconnect), missing credentials (need to complete the OAuth flow), etc. Detailed solutions can be found in the documentation of the GitHub repository.