home / mcp / strava mcp server
A Model Context Protocol (MCP) server that connects to Strava API, providing tools to access Strava data through LLMs
Configuration
View docs{
"mcpServers": {
"r-huijts-strava-mcp": {
"command": "npx",
"args": [
"-y",
"@r-huijts/strava-mcp-server"
],
"env": {
"STRAVA_CLIENT_ID": "YOUR_CLIENT_ID",
"ROUTE_EXPORT_PATH": "PATH_FOR_GPX_TCX_EXPORTS",
"STRAVA_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN",
"STRAVA_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"STRAVA_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
}
}
}
}You can connect Strava data to Claude and ask in natural language to analyze your workouts, explore routes, and receive coaching insights. This MCP server acts as a bridge between your Strava account and Claude, enabling you to fetch activities, segments, routes, and performance metrics on demand while keeping control of your credentials locally.
With the Strava MCP Server integrated, you can interact with your Strava data through Claude as if you are chatting with a knowledgeable assistant. You can connect your Strava account once and then ask questions like how far you ran this month, analyze a recent ride, or export a route as a GPX file. Practical usage patterns include tracking progress over time, analyzing workout details such as power and heart rate, exploring popular routes near a location, and getting coaching insights like training load and fitness trends.
To get started, ensure the MCP server is running locally and is connected to Claude. Once connected, simply say commands like “Connect my Strava account” to initiate OAuth, authorize the app in the browser, and begin querying your activities. You will be able to view your Strava profile, training zones, recent activities, laps, heart rate data, segment details, and exported routes directly from Claude.
Prerequisites you need before installation: Node.js and npm installed on your machine, and Claude Desktop configured to use an MCP server.
Step 1. Add the Strava MCP server to Claude’s configuration (stdio). You can use the Quick Start method that relies on npx to fetch and run the server.
{
"mcpServers": {
"strava": {
"command": "npx",
"args": ["-y", "@r-huijts/strava-mcp-server"]
}
}
}Step 2. Alternatively, add the MCP server to Claude Code so Claude can start it via the CLI. Use the following command:
claude mcp add --transport stdio strava -- npx @r-huijts/strava-mcp-serverStep 3. Confirm the MCP server is installed and healthily connected by listing MCP servers:
% claude mcp list
Checking MCP server health...
strava: npx @r-huijts/strava-mcp-server - ✓ ConnectedStep 4. Restart Claude Desktop to load the new configuration. Then you can connect your Strava account by telling Claude, “Connect my Strava account.” A browser window will open for you to authorize the app on Strava.
Step 5. After the connection succeeds, Claude can access your Strava data based on the permissions you granted. You can ask to see your running stats, analyze a workout, view transcripts of heart rate zones, and export routes. You can also manage your connection by asking to reconnect, check status, or disconnect.
If you prefer alternatives, you can install the MCP server locally via npm and point Claude to the local build. The quick start behavior uses npx to download and run the latest release.
Your Strava API credentials are stored locally and accessed only with your explicit authorization during the OAuth flow. You may also configure environment variables to provide credentials directly if you choose to bypass the browser-based flow.
If you ever need to reset the connection, you can reconnect by issuing the command to connect again, which will prompt a new OAuth flow.
If the Strava browser window doesn’t open, ensure Claude Desktop is running the MCP server and try restarting Claude Desktop. Check that your firewall isn’t blocking the MCP port (8111 by default). If authentication fails, reconnection may be necessary as tokens can expire.
If Claude doesn’t recognize the Strava tools, verify that the configuration file is valid JSON and that Claude Desktop has been restarted after changes. Open the developer console for error messages to diagnose further.
Link your Strava account to Claude and establish an OAuth connection for data access.
Check whether the Strava link is currently active.
Fetch basic Strava profile information.
Display heart rate and power zones for training guidance.
Show recent activities or fetch by filters such as date ranges.
Provide a detailed breakdown of a specific activity.
Show lap-by-lap data for the latest or selected activity.
Return time-series heart rate and performance data.
Display photos associated with a specific activity.
Provide running statistics, totals, and trends.
Provide cycling totals and year-to-date progress.
Identify and report your longest ride personal record.
Save favorite segments for quick access.
Find popular segments near a given location.
Get details and leaderboard information for a segment.
Show your attempts on a specific segment.
List your saved routes and basic route details.
Get details for a specific route.
Export a route as a GPX file.
Export a route as a TCX file.
Show clubs you are a member of in Strava.