stravamcp
Provides tools for interacting with the Strava API, allowing retrieval of athlete profiles, stats, activities, activity details, laps, zones, streams, comments, kudos, clubs, gear, routes, segments, and rate limit information.
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., "@stravamcp Show my last 5 activities with distance and pace."
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-server
Two servers over one Strava client:
an Express HTTP server that runs the OAuth 2.0 flow and exposes the Strava v3 API as JSON endpoints;
an MCP server (stdio) that exposes the same data as tools for an AI agent.
Both share src/strava/* and the same token file, so you authorize once in the browser and the
MCP server picks the tokens up automatically.
1. Create a Strava API application
Sign in at https://www.strava.com/settings/api and create an app (a Strava subscription is required).
Set Authorization Callback Domain to
localhost.Copy the Client ID and Client Secret.
New apps start in single-player mode — only your own account can authorize them, which is exactly what this server needs.
Related MCP server: strava-mcp
2. Configure
Copy-Item .env.example .env
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" # paste into SESSION_SECRETFill in STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET in .env.
.env and .tokens.json are gitignored — never commit them.
3. Run
npm install
npm run dev # HTTP server, watch mode
# or
npm run build; npm startThen open http://localhost:3000/auth/login and click Authorize. Strava redirects back to
/auth/callback, the server exchanges the one-time code for a refresh token + access token, and
persists them to .tokens.json (mode 600). Access tokens expire every 6 hours; the server
refreshes them automatically before each request, so you only authorize once.
4. MCP server
npm run mcp # stdio, via tsx
# or
npm run build; npm run mcp:startVS Code picks up .vscode/mcp.json automatically — open the Chat view, switch to
Agent mode and start the strava server. For other clients:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["C:/path/to/stravamcp/dist/mcp/index.js"],
"env": {
"STRAVA_CLIENT_ID": "...",
"STRAVA_CLIENT_SECRET": "..."
}
}
}
}.env and the token file are resolved relative to the package directory, not the working
directory, so the MCP server works no matter where the client launches it from.
Tools
Tool | Strava endpoint |
| Connection state, granted scopes, token expiry |
| Profile + totals + recent activities in one call |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Last-seen rate-limit headers |
All tools are read-only and annotated as such. Responses that would blow up an agent's context are trimmed by default: segment efforts and full-resolution polylines are opt-in, and streams are evenly downsampled (200 points by default).
If a tool reports "Not connected to Strava", run the HTTP server once and complete
/auth/login — the MCP server reads the same .tokens.json.
HTTP endpoints
Auth
Method | Path | Description |
GET |
| Redirect to Strava's consent screen (CSRF-protected via a signed |
GET |
| Code → token exchange |
GET |
| Connection state, granted scope, token expiry |
POST |
| Deauthorize with Strava and delete the local tokens |
Data
Method | Path | Strava endpoint |
GET |
| Aggregated profile + totals + last 10 activities (formatted in km/min) |
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
|
|
GET |
| Last-seen |
Example:
curl http://localhost:3000/api/me
curl "http://localhost:3000/api/activities?per_page=50&after=1704067200"
curl "http://localhost:3000/api/activities/123456789/streams?keys=time,heartrate,watts"Scopes
STRAVA_SCOPE defaults to read,read_all,profile:read_all,activity:read_all:
profile:read_all— detailed athlete representation and/athlete/zonesactivity:read_all— "Only Me" activities, otherwise they are filtered outread_all— private routes and segments
If you change the scope you must re-run /auth/login; /auth/callback reports any scope the
athlete declined under missing_scope.
Rate limits
Default limits are 200 requests / 15 min and 2,000 / day. The client records the limit headers
from every response; a 429 is surfaced as a JSON error with the current usage. From the MCP
server, call strava_get_rate_limit before issuing a burst of requests.
Notes
/activities/{id}/zonesand/segment_effortsrequire a Strava subscription.Tokens are stored on disk in plain JSON. Keep the file local; for a multi-user deployment replace
src/strava/token-store.tswith an encrypted, per-user store.
Available Tools
20 toolsstrava_auth_statusStrava auth statusARead-only
Whether this server is connected to Strava, which athlete it is connected as, the granted OAuth scopes and the access-token expiry. Use this to diagnose authorization errors.
Inputs: no named parameters.
strava_get_activityGet activityARead-only
Full detail for one activity (GET /activities/{id}): splits, laps, gear, calories, power and heart-rate averages. Segment efforts and the full map polyline are omitted unless requested.
Inputs: id (required), include_polyline, include_all_efforts.
strava_get_activity_commentsGet activity commentsARead-only
Comments left on an activity (GET /activities/{id}/comments).
Inputs: id (required), page, per_page.
strava_get_activity_kudoersGet activity kudoersARead-only
Athletes who gave kudos to an activity (GET /activities/{id}/kudos).
Inputs: id (required), page, per_page.
strava_get_activity_lapsGet activity lapsARead-only
Laps recorded for an activity (GET /activities/{id}/laps).
Inputs: id (required).
strava_get_activity_streamsGet activity streamsARead-only
Time-series data for an activity (GET /activities/{id}/streams): heart rate, power, speed, altitude, cadence and more. Streams are downsampled to max_points to keep the response small.
Inputs: id (required), keys, max_points.
strava_get_activity_zonesGet activity zonesARead-only
Time spent in each heart-rate and power zone during an activity (GET /activities/{id}/zones). Requires a Strava subscription.
Inputs: id (required).
strava_get_athleteGet athlete profileARead-only
Raw profile of the authenticated athlete (GET /athlete). Includes bikes, shoes, clubs, FTP and weight when the token has the profile:read_all scope.
Inputs: no named parameters.
strava_get_athlete_statsGet athlete statsARead-only
Rolled-up ride/run/swim totals for the last 4 weeks, year to date and all time (GET /athletes/{id}/stats). Only counts activities visible to Everyone.
Inputs: no named parameters.
strava_get_athlete_summaryAthlete summaryARead-only
One-shot overview of the authenticated athlete: profile, gear, recent/year-to-date/all-time ride-run-swim totals (in km and hours) and the most recent activities. Best starting point for questions about overall training.
Inputs: recent_activity_count.
strava_get_athlete_zonesGet heart-rate and power zonesARead-only
The athlete's configured heart-rate and power zones (GET /athlete/zones). Requires the profile:read_all scope.
Inputs: no named parameters.
strava_get_clubGet clubARead-only
Details of a single club (GET /clubs/{id}).
Inputs: id (required).
strava_get_gearGet gearARead-only
A bike or pair of shoes including total logged distance (GET /gear/{id}). Gear ids look like b1234567 or g1234567 and appear on activities and the athlete profile.
Inputs: id (required).
strava_get_rate_limitGet rate limit usageARead-only
Strava's reported request usage from the most recent API call (200 requests per 15 minutes and 2000 per day by default). Check this before issuing many requests.
Inputs: no named parameters.
strava_get_routeGet routeARead-only
A single route with its segments and estimated moving time (GET /routes/{id}).
Inputs: id (required).
strava_get_segmentGet segmentARead-only
A single segment including the athlete's personal-record effort when the token has the read_all scope (GET /segments/{id}).
Inputs: id (required).
strava_list_activitiesList activitiesARead-only
The authenticated athlete's activities, newest first, as compact summaries (GET /athlete/activities). Use before/after to scope a date range instead of paging blindly.
Inputs: raw, page, after, before, +1 more.
strava_list_clubsList clubsARead-only
Clubs the authenticated athlete belongs to (GET /athlete/clubs).
Inputs: page, per_page.
strava_list_routesList routesARead-only
Routes created by the authenticated athlete (GET /athletes/{id}/routes). Private routes require the read_all scope.
Inputs: page, per_page.
strava_list_starred_segmentsList starred segmentsARead-only
Segments the authenticated athlete has starred (GET /segments/starred).
Inputs: page, per_page.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct resource (athlete, activity, club, gear, route, segment) and action (get/list), with utility tools (rate limit, auth status) clearly separated. Even similar tools like get_athlete_summary and get_athlete_stats differ in granularity and purpose, making misselection unlikely.
Most tools follow a consistent verb_noun pattern (get_*, list_*), but strava_auth_status breaks the pattern by using a noun phrase instead of a verb. Additionally, get_athlete_zones vs get_activity_zones could be mistaken without careful reading, though the resource is explicit in each name.
With 20 tools, the server is on the heavy side, exceeding the 15-tool threshold for a well-scoped set. However, each tool maps to a specific Strava API endpoint, and the count is justified by the wide read-only surface of the Strava API, so it is borderline rather than excessive.
The server covers the primary Strava resources (athlete, activities, clubs, gear, routes, segments) with both list and detail views, plus utility tools. Obvious gaps like activity upload or a dedicated segment efforts tool are absent, but agents can obtain segment efforts via activity detail and upload is not a standard read-only operation.
Maintenance
Related MCP Connectors
Strava MCP tools for AI: athletes, activities, segments, clubs, routes. Powered by HAPI MCP server.
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that enables interaction with the Strava API v3 to manage fitness activities, athlete profiles, segments, and routes. It supports retrieving detailed performance metrics, exploring geographic data, and managing club information through natural language.33PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityDmaintenanceMCP server for Strava integration, enabling LLMs to query activities, athlete stats, segments, routes, and perform training analysis.9MIT
- FlicenseNot gradedqualityDmaintenanceMCP server to fetch Strava activities using OAuth authentication with automatic token refresh. Allows retrieving recent activities, activities by date range, activity details, and athlete stats.-
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes Strava API v3 data (activities, segments, routes, clubs, gear, streams) as tools for any MCP client. Read-only by default, with an optional --write flag to enable mutating operations.1ISC