Strava MCP Server
The Strava MCP Server acts as a bridge to the Strava API, enabling LLMs to interact with your personal Strava data through natural language prompts.
Key capabilities include:
Profile & Stats: Access athlete profile information and performance metrics
Activities: Fetch recent activities, detailed activity information, lap data, and time-series data streams (heart rate, power, GPS)
Segments: Search, star/unstar, view detailed information, and list your efforts on specific segments
Training: Retrieve configured heart rate and power zones for training insights
Clubs: View clubs you belong to
Routes: Access saved routes with options to export in GPX or TCX formats
This server enables AI-friendly interaction with your Strava data for analysis and visualization.
Uses .ENV files to store and manage authentication credentials and configuration options for the Strava API integration.
Runs as a Node.js application, with the server being launched through the Node runtime in Claude's configuration.
Provides tools for accessing Strava data including recent activities, profile details, athlete stats, activity streams (power, heart rate, cadence), segments management, detailed activity information, route management, and exporting routes in GPX/TCX formats.
Implements the MCP server in TypeScript to provide type-safe interaction with the Strava API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Strava MCP Server show me my recent Strava activities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Strava MCP Server
Talk 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."
What Can You Do With This?
Once connected, just talk to Claude like you're talking to a friend who has access to all your Strava data:
π Track Your Progress
"How many kilometers did I run this month?"
"Compare my running stats from January to December"
"What's my longest ride ever?"
π Analyze Your Workouts
"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?"
πΊοΈ Explore Routes & Segments
"What are the most popular cycling segments near Central Park?"
"Show me my starred segments"
"Export my Sunday morning route as a GPX file"
π Get Coaching Insights
"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"
Related MCP server: Strava MCP Server
Quick Start (3 Steps)
Step 1: Add to Claude Desktop
Open your Claude Desktop configuration file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this to the file:
{
"mcpServers": {
"strava": {
"command": "npx",
"args": ["-y", "@r-huijts/strava-mcp-server"]
}
}
}Step 1 (alternative): Add to Claude Code
You can add this MCP server to claude code with the following command:
claude mcp add --transport stdio strava -- npx @r-huijts/strava-mcp-serverYou can confirm successful instalation as follows:
% claude mcp list
Checking MCP server health...
strava: npx @r-huijts/strava-mcp-server - β ConnectedStep 2: Restart Claude Desktop
Close and reopen Claude Desktop to load the new configuration.
Step 3: Connect Your Strava
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.
Connecting Your Strava Account
First Time Setup
When you say "Connect my Strava account", here's what happens:
A browser window opens showing a setup page
Enter your Strava API credentials (Client ID and Client Secret)
Click "Continue to Strava" - you'll be redirected to Strava
Authorize the app on Strava's website
See the success message - you can close the browser
Done! Claude confirms you're connected
Your credentials are saved locally at ~/.config/strava-mcp/config.json and persist across sessions.
Getting Your Strava API Credentials
You need to create a free Strava API application (one-time setup):
Go to strava.com/settings/api
Click "Create an App" (or view your existing app)
Fill in the form:
Application Name: Anything you want (e.g., "My Claude Assistant")
Category: Choose any
Website: Can be anything (e.g.,
http://localhost)Authorization Callback Domain: Must be
localhost
Copy your Client ID and Client Secret
That's it! You only need to do this once.
Managing Your Connection
Check status: "Am I connected to Strava?"
Reconnect: "Connect my Strava account" (use
force: trueto reconnect)Disconnect: "Disconnect my Strava account"
Installation Options
Option A: Just Use It (Recommended)
No installation needed! The npx command in the Quick Start automatically downloads and runs the latest version.
Option B: Install Globally
If you prefer to install it once:
npm install -g @r-huijts/strava-mcp-serverThen 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.
Option C: Build from Source
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 buildThen point Claude to your local build:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/path/to/strava-mcp/dist/server.js"]
}
}
}Example Conversations
Morning Check-in
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!
Workout Analysis
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...
Finding New Routes
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?
Available Tools
Account & Profile
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 |
Activities
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 |
Stats & Progress
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 |
Segments
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 |
Routes
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 |
Clubs
What you can ask | What it does |
"What clubs am I in?" | Lists your Strava clubs |
Workouts
What you can ask | What it does |
"Turn this workout into a Zwift file" | Formats a workout plan into a structured file (currently Zwift |
Server
What you can ask | What it does |
"What version is the Strava server?" | Shows the MCP server version and metadata |
Troubleshooting
"Connect my Strava account" doesn't open a browser
Make sure Claude Desktop is running the MCP server (check for errors in Claude)
Try restarting Claude Desktop
Check that port 8111 isn't blocked by a firewall
"Authentication failed" or "Invalid token"
Your token may have expired - say "Connect my Strava account" to reconnect
Make sure your Strava API application is still active at strava.com/settings/api
"Missing credentials" error
You need to complete the OAuth flow - say "Connect my Strava account"
If you're using environment variables, make sure all 4 are set (see Developer section)
Claude doesn't see the Strava tools
Make sure your
claude_desktop_config.jsonis valid JSON (no trailing commas!)Restart Claude Desktop after making config changes
Check Claude's developer console for error messages
JSONRPC.ProtocolTransportError after package name change
If you're getting a JSONRPC error after updating to @r-huijts/strava-mcp-server:
Clear npx cache: Run
rm -rf ~/.npm/_npxin terminalVerify config uses
@r-huijts/strava-mcp-server(not the oldstrava-mcp-server)Restart Claude Desktop completely (quit and reopen)
Test manually: Run
npx -y @r-huijts/strava-mcp-server- you should see "Starting Strava MCP Server v1.2.1..."
For Developers
Environment Variables
Instead of using the browser-based auth, you can set environment variables:
Variable | Description |
| Your Strava Application Client ID |
| Your Strava Application Client Secret |
| OAuth access token |
| OAuth refresh token |
| Directory for GPX/TCX exports |
Token Refresh
The server automatically refreshes expired tokens. New tokens are saved to both process.env and ~/.config/strava-mcp/config.json.
Config Priority
Environment variables (highest)
~/.config/strava-mcp/config.jsonLocal
.envfile
Building & Testing
npm install
npm run build
npm testActivity Streams Optimization
The get-activity-streams tool uses a compact format by default, reducing payload size by ~70-80% while preserving all data:
Compact format (default): Raw arrays with metadata, ~70-80% smaller, ideal for LLM processing
Verbose format: Human-readable objects with formatted values (backward compatible)
Smart chunking: Large activities automatically split into ~50KB chunks
Optional downsampling: Can reduce very large datasets while preserving key features
The compact format includes comprehensive metadata (units, descriptions, statistics) so LLMs can understand the raw numeric data.
API Reference
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.
Contributing
Contributions welcome! Please submit a Pull Request.
License
MIT License - see LICENSE file for details.
Questions? Open an issue on GitHub.
Available Tools
24 toolscheck-strava-connectionA
Check if Strava is connected and show the current connection status. Use this when the user asks about their connection status.
Inputs: no named parameters.
connect-stravaA
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.
Inputs: force.
disconnect-stravaA
Disconnect your Strava account and remove stored credentials. Use this when the user wants to logout, disconnect, or remove their Strava connection.
Inputs: no named parameters.
explore-segmentsC
Searches for popular segments within a given geographical area.
Inputs: bounds (required), activityType, minCat, maxCat.
export-route-gpxA
Exports a specific Strava route in GPX format and saves it to a pre-configured local directory.
Inputs: routeId (required).
export-route-tcxA
Exports a specific Strava route in TCX format and saves it to a pre-configured local directory.
Inputs: routeId (required).
get-activity-detailsC
Fetches detailed information about a specific activity using its ID.
Inputs: activityId (required).
get-activity-lapsA
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:
A text summary with formatted metrics
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
Inputs: id (required).
get-activity-photosA
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:
A text summary with photo count and URLs
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
Inputs: id (required), size.
get-activity-streamsA
Retrieves detailed time-series data streams from a Strava activity. Perfect for analyzing workout metrics, visualizing routes, or performing detailed activity analysis.
Key Features:
Multiple Data Types: Access various metrics like heart rate, power, speed, GPS coordinates, etc.
Flexible Resolution: Choose data density from low (~100 points) to high (~10000 points)
Smart Pagination: Get data in manageable chunks optimized for LLM context limits
Rich Statistics: Includes min/max/avg for numeric streams
Dual Format Support: Compact (LLM-optimized) or verbose (human-readable)
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:
Metadata: Activity overview, available streams, data points, units, format info
Statistics: Summary stats for each stream type (max/min/avg where applicable)
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
Inputs: id (required), types, resolution, series_type, +4 more.
get-all-activitiesA
Fetches complete activity history with optional filtering by date range and activity type. Supports pagination to retrieve all activities.
Inputs: startDate, endDate, activityTypes, sportTypes, +3 more.
get-athlete-profileA
Fetches the profile information for the authenticated athlete, including their unique numeric ID needed for other tools like get-athlete-stats.
Inputs: no named parameters.
get-athlete-statsA
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.
Inputs: athleteId (required).
get-athlete-zonesA
Retrieves the authenticated athlete's configured heart rate and power zones.
Output includes both a formatted summary and the raw JSON data.
Inputs: no named parameters.
get-recent-activitiesA
Fetches the most recent activities for the authenticated athlete.
Inputs: perPage.
get-routeA
Fetches detailed information about a specific route using its ID.
Inputs: routeId (required).
get-segmentC
Fetches detailed information about a specific segment using its ID.
Inputs: segmentId (required).
get-segment-effortC
Fetches detailed information about a specific segment effort using its ID.
Inputs: effortId (required).
get-server-versionA
Returns the Strava MCP server version and related metadata.
Inputs: no named parameters.
list-athlete-clubsA
Lists the clubs the authenticated athlete is a member of.
Inputs: no named parameters.
list-athlete-routesA
Lists the routes created by the authenticated athlete, with pagination.
Inputs: page, perPage.
list-segment-effortsA
Lists the authenticated athlete's efforts on a specific segment, optionally filtering by date.
Inputs: segmentId (required), startDateLocal, endDateLocal, perPage.
list-starred-segmentsA
Lists the segments starred by the authenticated athlete.
Inputs: no named parameters.
star-segmentA
Stars or unstars a specific segment for the authenticated athlete.
Inputs: segmentId (required), starred (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 24 tools
Most tools have distinct purposes targeting specific Strava resources like activities, segments, routes, or athlete data, with clear boundaries. However, some overlap exists between get-all-activities and get-recent-activities, which could cause confusion about which to use for general activity retrieval, though descriptions help differentiate them by scope.
Tool names follow a consistent verb-noun pattern with hyphens (e.g., get-activity-details, list-athlete-clubs), making them predictable and readable. Minor deviations include check-strava-connection and export-route-gpx, which slightly break the pattern but maintain overall coherence.
With 24 tools, the count is borderline high for a Strava integration, potentially overwhelming for agents. While it covers many aspects of the Strava API, some tools like get-server-version or check-strava-connection might be considered non-essential, contributing to a slightly bloated set.
The tool set provides comprehensive coverage of the Strava domain, including athlete management, activities, segments, routes, and data export. It supports full CRUD-like operations (e.g., connect/disconnect, star/unstar, get/list) and handles key workflows like activity analysis and segment tracking without obvious gaps.
Maintenance
Related MCP Connectors
Strava MCP tools for AI: athletes, activities, segments, clubs, routes. Powered by HAPI MCP server.
Your own cycling data for your AI assistant: rides, power, climbs and routes. Read-only.
Ask your AI about your fitness: activities and data from Garmin, COROS, Strava, GPX and more
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides language models with access to Strava API data, allowing them to query and analyze athlete activities from Strava.425MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.6MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables users to access Strava fitness data, including user activities, activity details, segments, and leaderboards through a structured API interface.34MIT
- AlicenseBqualityDmaintenanceEnables interaction with Strava's API to access and manage activities, athlete data, routes, segments, clubs, and gear through natural language.2210 npmMIT