Strava MCP provides Claude with access to personal Strava fitness data, enabling natural language queries about running and cycling activities, workouts, routes, and performance metrics. The server offers tools to retrieve activity summaries, analyze workout details including heart rate and power data, explore segments and routes, and generate coaching insights by connecting users' Strava accounts through OAuth authentication. It solves the problem of making fitness data analysis conversational and accessible without requiring users to manually navigate Strava's interface or perform complex data aggregations.
Public tool metadata for what this MCP can expose to an agent.
get_recent_activitiesGet recent Strava activities (default: last 10)1 paramsGet recent Strava activities (default: last 10)
limitnumberget_activity_detailsGet detailed info for a specific activity1 paramsGet detailed info for a specific activity
activity_idstringget_weekly_statsWeekly training statistics (distance, time, training load)1 paramsWeekly training statistics (distance, time, training load)
weeksnumberget_training_load_analysisAnalyze training load with ATL, CTL, TSB and get REST or TRAIN adviceAnalyze training load with ATL, CTL, TSB and get REST or TRAIN advice
No parameter schema in public metadata yet.
get_weekly_training_planGet a weekly plan with recommended hours, workout types and intensitiesGet a weekly plan with recommended hours, workout types and intensities
No parameter schema in public metadata yet.
get_gear_maintenanceList all bikes and shoes with total km and maintenance warningsList all bikes and shoes with total km and maintenance warnings
No parameter schema in public metadata yet.
get_power_curveAnalyze best power outputs (5s, 1min, 5min, 20min, 60min), estimate FTP, and compare with previous monthAnalyze best power outputs (5s, 1min, 5min, 20min, 60min), estimate FTP, and compare with previous month
No parameter schema in public metadata yet.
get_hr_zone_distributionAnalyze time spent in each HR zone (last 4 weeks) with training balance adviceAnalyze time spent in each HR zone (last 4 weeks) with training balance advice
No parameter schema in public metadata yet.
get_hr_drift_analysisMeasure cardiac drift in steady rides — indicator of aerobic efficiencyMeasure cardiac drift in steady rides — indicator of aerobic efficiency
No parameter schema in public metadata yet.
check_workout_qualityAnalyze interval consistency, power decoupling, and recovery for a specific activity1 paramsAnalyze interval consistency, power decoupling, and recovery for a specific activity
activity_idstringTalk to your Strava data using AI.
Connect Claude to your Strava account and ask questions in plain English: "How far did I run this month?", "Analyze my last ride", or "Show me my fastest segments."
Once connected, just talk to Claude like you're talking to a friend who has access to all your Strava data:
"How many kilometers did I run this month?"
"Compare my running stats from January to December"
"What's my longest ride ever?"
"Break down my last cycling workout - show me power, heart rate, and cadence"
"How did my heart rate zones look during yesterday's run?"
"What was my average pace for each lap in my interval training?"
"What are the most popular cycling segments near Central Park?"
"Show me my starred segments"
"Export my Sunday morning route as a GPX file"
"Analyze my training load this week"
"How does my current fitness compare to last month?"
"Give me a summary of my cycling performance this year"
Open your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this to the file:
{
"mcpServers": {
"strava": {
"command": "npx",
"args": ["-y", "@r-huijts/strava-mcp-server"]
}
}
}
You can add this MCP server to claude code with the following command:
claude mcp add --transport stdio strava -- npx @r-huijts/strava-mcp-server
You can confirm successful instalation as follows:
% claude mcp list
Checking MCP server health...
strava: npx @r-huijts/strava-mcp-server - ✓ Connected
Close and reopen Claude Desktop to load the new configuration.
Just say to Claude:
"Connect my Strava account"
A browser window will open. Enter your Strava API credentials, authorize the app, and you're done!
That's it! Start asking about your activities.
When you say "Connect my Strava account", here's what happens:
Your credentials are saved locally at ~/.config/strava-mcp/config.json and persist across sessions.
You need to create a free Strava API application (one-time setup):
http://localhost)localhostThat's it! You only need to do this once.
force: true to reconnect)No installation needed! The npx command in the Quick Start automatically downloads and runs the latest version.
If you prefer to install it once:
npm install -g @r-huijts/strava-mcp-server
Then update your Claude config to use:
{
"mcpServers": {
"strava": {
"command": "strava-mcp-server"
}
}
}
Note: Even though the package name is @r-huijts/strava-mcp-server, the executable name remains strava-mcp-server for backward compatibility.
For developers who want to modify the code:
git clone https://github.com/r-huijts/strava-mcp.git
cd strava-mcp
npm install
npm run build
Then point Claude to your local build:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/path/to/strava-mcp/dist/server.js"]
}
}
}
You: What did I do for exercise this week?
Claude: Looking at your Strava activities this week, you completed:
- Monday: 5.2km run (28:15)
- Wednesday: 45km bike ride (1:32:00)
- Saturday: 10km run (52:30)
Total: 60.2km across 3 activities. Nice consistency!
You: Analyze my last cycling workout in detail
Claude: Here's a breakdown of your ride "Evening Loop" from yesterday:
Overview
- Distance: 42.3 km
- Time: 1:28:45
- Avg Speed: 28.6 km/h
Power Analysis
- Average Power: 185W
- Normalized Power: 198W
- Max Power: 520W
Heart Rate
- Average: 142 bpm
- Max: 175 bpm
- Time in Zone 4+: 23 minutes
Your power-to-heart-rate ratio suggests good aerobic efficiency...
You: Find me some challenging cycling climbs near Boulder, Colorado
Claude: Here are popular climbing segments near Boulder:
- Flagstaff Road - 5.2km, 6.8% avg grade
- Sunshine Canyon - 3.8km, 7.2% avg grade
- Left Hand Canyon - 8.1km, 4.5% avg grade
Want me to star any of these so you can find them easily later?
| What you can ask | What it does |
|---|---|
| "Connect my Strava account" | Links your Strava to Claude |
| "Check my Strava connection" | Shows connection status |
| "Disconnect my Strava account" | Unlinks Strava and clears stored tokens |
| "Get my Strava profile" | Shows your profile info |
| "What shoes do I have?" | Lists your shoes and usage distance |
| "What are my training zones?" | Shows HR and power zones |
| What you can ask | What it does |
|---|---|
| "Show my recent activities" | Lists your latest workouts |
| "Get all my runs from January" | Fetches activities with filters |
| "Analyze activity 12345" | Detailed info about one activity |
| "Show the laps from my last run" | Lap-by-lap breakdown |
| "Get heart rate data from my ride" | Time-series workout data (optimized compact format) |
| "Show photos from my hike" | Activity photos |
| What you can ask | What it does |
|---|---|
| "What are my running stats?" | YTD and all-time totals |
| "How far have I cycled this year?" | Activity totals by type |
| "What's my longest ride?" | Personal records |
| What you can ask | What it does |
|---|---|
| "Show my starred segments" | Your favorite segments |
| "Find segments near [location]" | Discover popular segments |
| "Get details on segment 12345" | Segment info and leaderboard |
| "Star this segment" | Save to favorites |
| "Show my efforts on [segment]" | Your attempts on a segment |
| What you can ask | What it does |
|---|---|
| "List my saved routes" | Your created routes |
| "Get details for my [route name]" | Route info |
| "Export [route] as GPX" | Download for GPS devices |
| "Export [route] as TCX" | Download for GPS devices |
| What you can ask | What it does |
|---|---|
| "What clubs am I in?" | Lists your Strava clubs |
| What you can ask | What it does |
|---|---|
| "Turn this workout into a Zwift file" | Formats a workout plan into a structured file (currently Zwift .zwo) |
| What you can ask | What it does |
|---|---|
| "What version is the Strava server?" | Shows the MCP server version and metadata |
claude_desktop_config.json is valid JSON (no trailing commas!)If you're getting a JSONRPC error after updating to @r-huijts/strava-mcp-server:
rm -rf ~/.npm/_npx in terminal@r-huijts/strava-mcp-server (not the old strava-mcp-server)npx -y @r-huijts/strava-mcp-server - you should see "Starting Strava MCP Server v1.2.1..."Instead of using the browser-based auth, you can set environment variables:
| Variable | Description |
|---|---|
STRAVA_CLIENT_ID | Your Strava Application Client ID |
STRAVA_CLIENT_SECRET | Your Strava Application Client Secret |
STRAVA_ACCESS_TOKEN | OAuth access token |
STRAVA_REFRESH_TOKEN | OAuth refresh token |
ROUTE_EXPORT_PATH | Directory for GPX/TCX exports |
The server automatically refreshes expired tokens. New tokens are saved to both process.env and ~/.config/strava-mcp/config.json.
~/.config/strava-mcp/config.json.env filenpm install
npm run build
npm test
The get-activity-streams tool uses a compact format by default, reducing payload size by ~70-80% while preserving all data:
The compact format includes comprehensive metadata (units, descriptions, statistics) so LLMs can understand the raw numeric data.
The server implements the Model Context Protocol (MCP) and exposes 25 tools for Strava API v3. See the source code in src/tools/ for implementation details.
Contributions welcome! Please submit a Pull Request.
MIT License - see LICENSE file for details.
Questions? Open an issue on GitHub.
STRAVA_CLIENT_ID*Your Strava API client ID
STRAVA_CLIENT_SECRET*secretYour Strava API client secret
STRAVA_ACCESS_TOKEN*secretYour Strava API access token