strava-mcp
Provides tools for accessing Strava athlete data, activities, and analysis, enabling AI agents to query training load, compare training blocks, view activity details and streams, and more.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
strava-mcp
A Model Context Protocol (MCP) server that exposes your Strava data to Claude. Ask Claude about your training load, compare blocks, dig into lap splits, or analyze activity streams — all from a conversation.
Prerequisites
Node.js 18+
A Strava account with activities
A Strava API application (free to create)
Related MCP server: Strava MCP Server
Strava API setup
Go to strava.com/settings/api and create an application.
Note your Client ID and Client Secret.
Obtain an access token and refresh token using Strava's OAuth flow. The simplest way:
Visit
https://www.strava.com/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost&approval_prompt=force&scope=read,activity:read_allAuthorize the app and copy the
codefrom the redirect URL.Exchange it for tokens:
curl -X POST https://www.strava.com/oauth/token \ -d client_id=YOUR_CLIENT_ID \ -d client_secret=YOUR_CLIENT_SECRET \ -d code=YOUR_CODE \ -d grant_type=authorization_codeThe response contains
access_token,refresh_token, andexpires_at.
Installation
git clone https://github.com/your-username/strava-mcp.git
cd strava-mcp
npm installConfiguration
cp .env.example .envEdit .env with your credentials:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_ACCESS_TOKEN=your_access_token
STRAVA_REFRESH_TOKEN=your_refresh_token
STRAVA_TOKEN_EXPIRES_AT=1234567890 # unix timestamp from token exchange
DEBUG=false # set to "true" for verbose stderr loggingTokens are held in memory only and auto-refreshed before expiry. Nothing is written back to .env.
Build & run
npm run build # compile TypeScript → build/
npm start # start the MCP server on stdioFor development without a build step:
npm run devClaude Desktop integration
Add this server to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/absolute/path/to/strava-mcp/build/index.js"],
"env": {
"STRAVA_CLIENT_ID": "your_client_id",
"STRAVA_CLIENT_SECRET": "your_client_secret",
"STRAVA_ACCESS_TOKEN": "your_access_token",
"STRAVA_REFRESH_TOKEN": "your_refresh_token",
"STRAVA_TOKEN_EXPIRES_AT": "0"
}
}
}
}Restart Claude Desktop after saving.
Available tools
Athlete
Tool | Description |
| Profile: name, location, weight, FTP, membership type |
| Activity totals (recent / YTD / all-time) for rides, runs, swims |
| Heart rate and power training zones from your Strava settings |
Activities
Tool | Description |
| Recent activities with optional date range and count cap |
| Full detail for a single activity by ID |
| Lap splits (pace, HR, power) for a single activity |
| HR and power zone distributions for a single activity (Strava Summit required) |
| Filter recent activities by name keyword and/or sport type |
Analysis
Tool | Description |
| Volume, time, elevation, and weekly breakdown over a date range |
| Side-by-side comparison of two training periods with deltas |
| Week-by-week or day-by-day volume trend over a date range |
| Raw sensor data (HR, pace, power, altitude, cadence) with summary stats |
Example prompts
"How many miles did I run last month?"
"Compare my training in January vs February."
"Show me the lap splits for my last long run."
"What was my average heart rate trend over the past 12 weeks?"
"Find all my rides over 50 miles this year."
Project structure
src/
index.ts — MCP server entry point
types.ts — TypeScript interfaces and error classes
utils.ts — Unit conversion helpers (imperial: miles, min/mile, feet)
logger.ts — Debug logger (writes to stderr only)
token-manager.ts — In-memory OAuth token lifecycle (refresh, expiry)
strava-client.ts — Authenticated HTTP client with pagination
tools/
athlete.ts — Athlete profile and stats tools
activities.ts — Activity listing and detail tools
analysis.ts — Training load and trend analysis toolsNotes
Units: All display values are imperial (miles, min/mile, feet). Strava's metric API values are converted via
utils.ts.Rate limits: Strava enforces 100 requests/15 min and 1,000/day. Tools that fetch large date ranges may hit these limits.
Pagination: The client handles pagination automatically; pass
maxItemsto cap results.Logging: Debug output goes to stderr only, so it never corrupts the MCP stdout stream. Enable with
DEBUG=true.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Connect Intervals.icu to Claude and ChatGPT: read training, plan workouts. Training never stored.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects Claude to your Strava account for analyzing training, predicting race times, and generating periodized training plans via natural language.13125 npmISC
- AlicenseNot gradedqualityCmaintenanceConnects Claude to Strava data for natural language queries about rides, stats, and activities.10 npmMIT
- AlicenseAqualityDmaintenanceConnects Claude to your Strava account so you can query your activities, stats, routes, and segments using natural language.2724 npm1MIT
- AlicenseAqualityDmaintenanceConnects Strava training data to Claude, enabling personalized coaching through analysis of training load, workout planning, gear maintenance, and power metrics.1033 PyPI1MIT