Provides comprehensive access to Strava API endpoints for managing activities, athlete profiles, routes, segments, clubs, and gear. Supports activity CRUD operations, GPS and performance data streams, social features like comments and kudos, segment leaderboards, and athlete statistics and training zones.
Strava MCP Server
A Model Context Protocol (MCP) server for integrating with the Strava API. This server provides comprehensive access to all major Strava API endpoints including activities, athlete data, routes, segments, clubs, and gear.
Features
Activity Management
Get athlete activities with filters (date range, pagination)
Get detailed activity information
Create, update, and delete activities
Access activity streams (GPS, heart rate, power, cadence, etc.)
Get activity comments and kudos
Athlete Data
Get authenticated athlete profile
Get athlete statistics and totals
Get athlete zones (heart rate and power)
Routes
Get athlete routes
Get detailed route information
Segments
Get starred segments
Get segment details
Get segment leaderboards with filters
Explore segments in geographic areas
Clubs & Social
Get athlete clubs
Get club details and members
Get club activities
Gear
Get detailed gear information
Prerequisites
Node.js 18+ (LTS recommended)
A Strava account
Strava API credentials (Client ID and Client Secret)
Installation
Clone this repository or create a new directory:
Install dependencies:
Run the interactive setup to configure OAuth:
Build the project:
Strava API Setup
1. Create a Strava Application
Go to Strava API Settings
Create a new application
Fill in the required information:
Application Name: Your app name
Category: Choose appropriate category
Club: Optional
Website: Can use
http://localhostfor testingAuthorization Callback Domain: Use
localhostfor testing
Click "Create"
Note your Client ID and Client Secret
2. Run the Setup Script
The easiest way to configure OAuth tokens is to use the interactive setup script:
This script will:
Prompt you for your Strava Client ID and Client Secret (or use existing ones from
.env)Generate an authorization URL for you to visit
Guide you through the OAuth flow
Exchange the authorization code for access/refresh tokens
Automatically save everything to
.env
Manual Setup (Alternative)
If you prefer to set up manually, you can exchange the authorization code yourself:
Then create a .env file with all the credentials (see .env.example).
MCP Configuration
Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
The server automatically loads environment variables from a .env file in the project root, so you only need to specify the command:
Make sure your .env file contains all required variables (see Strava API Setup above).
Available Tools
Activities
get_activities- List athlete activities with filtersget_activity- Get detailed activity informationcreate_activity- Create a new manual activityupdate_activity- Update an existing activitydelete_activity- Delete an activityget_activity_streams- Get activity data streamsget_activity_comments- Get activity commentsget_activity_kudos- Get activity kudos
Athlete
get_athlete- Get authenticated athlete profileget_athlete_stats- Get athlete statisticsget_athlete_zones- Get athlete training zones
Routes
get_routes- List athlete routesget_route- Get route details
Segments
get_starred_segments- List starred segmentsget_segment- Get segment detailsget_segment_leaderboard- Get segment leaderboardexplore_segments- Explore segments in an area
Clubs
get_athlete_clubs- List athlete clubsget_club- Get club detailsget_club_members- Get club membersget_club_activities- Get club activities
Gear
get_gear- Get gear details
Development
Scripts
npm run build- Build the TypeScript projectnpm run dev- Watch mode for developmentnpm run lint- Lint the codebasenpm test- Run testsnpm start- Start the MCP server
Project Structure
Token Refresh
The server automatically refreshes access tokens when they expire. The refresh token is used to obtain a new access token without requiring re-authentication.
Rate Limiting
Strava has rate limits:
100 requests per 15 minutes
1,000 requests per day
The server does not currently implement rate limiting, so use responsibly.
Troubleshooting
"No tokens available" error
Ensure all environment variables are set in
.envor your MCP client configVerify tokens haven't expired (check
STRAVA_EXPIRES_AT)
"Failed to refresh token" error
Your refresh token may have been revoked
Go through the OAuth flow again to get new tokens
Build errors
Ensure you're using Node.js 18+ LTS
Run
npm installto ensure all dependencies are installedCheck TypeScript version compatibility
License
MIT