stravamcp
Provides read-only access to a connected Strava account, exposing athlete profiles, stats, and zones; activities with streams and time-in-zone data; saved routes; starred segments and segment efforts; and gear details.
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.
stravamcp
Single-user Strava MCP server on Cloudflare Workers. Connects one Strava account and exposes read-only athlete, activity, route, segment, stream, and gear data through the Model Context Protocol.
Tools
Tool | Description |
| Recent activities with optional sport_type / commute filters |
| Activity detail by id or id_str |
| Time-series streams by key |
| HR and power time-in-zone distribution |
| Compact summary; full arrays stay on the server |
| Connected athlete profile |
| YTD, recent, and all-time totals |
| HR / power zone ranges |
| Saved routes |
| Route detail by id_str |
| Starred segments |
| Segment detail by id |
| Your efforts on a segment |
| Bike / shoe detail by id |
| Tool, API, and cache counts for 24h / 7d / 30d |
IDs are accepted as strings (id_str) or numbers. Use id_str for routes and any large id to avoid JavaScript 64-bit precision loss.
Related MCP server: Todoist MCP Server
Local setup
Copy the env template and fill in the credentials:
cp .dev.vars.example .dev.varsApply the local D1 migration:
npx wrangler d1 migrations apply stravamcpStart the dev server:
npm run devLocal MCP endpoint: http://localhost:8787/mcp
GET / serves a landing page describing the server and its tools.
Cloudflare deployment
Create a Strava API app at
https://www.strava.com/settings/api.Set the Authorization Callback Domain to your domain, e.g.
stravamcp.didiktrisusanto.dev.Apply the remote migration and secrets:
npx wrangler d1 migrations apply stravamcp --remote
npx wrangler secret put STRAVA_CLIENT_ID
npx wrangler secret put STRAVA_CLIENT_SECRET
npx wrangler secret put MCP_SECRET
npx wrangler secret put SETUP_TOKEN
npx wrangler deployGenerate random secrets with openssl rand -hex 32.
STRAVA_API_BASE is set in wrangler.jsonc. Change it when Strava's new base URL becomes mandatory.
Connect the Strava account once. The setup token is only accepted in the header:
curl -i -H "Authorization: Bearer <SETUP_TOKEN>" https://stravamcp.didiktrisusanto.dev/authorizeOpen the Location URL from the 302 response in a browser. Rotate the setup token after setup if it may have been exposed.
Use the MCP endpoint with
MCP_SECRET:
{
"url": "https://stravamcp.didiktrisusanto.dev/mcp",
"headers": {
"Authorization": "Bearer <MCP_SECRET>"
}
}Disconnect and delete data
curl -X POST -H "Authorization: Bearer <MCP_SECRET>" https://stravamcp.didiktrisusanto.dev/disconnectThis revokes the Strava token and deletes the token row, cached Strava data, and pending OAuth states.
Strava's Standard Tier requires an active Strava subscription.
Usage
get_usage returns rolling 24-hour, 7-day, and 30-day counts for tool calls, Strava data API calls, and cache lookups. The same JSON is available over HTTP:
curl -H "Authorization: Bearer <MCP_SECRET>" https://stravamcp.didiktrisusanto.dev/usageNotes:
Cache counts are lookups, split into hits and misses. A hit makes no Strava call.
API counts are outbound Strava data requests, including 401 retries. Token calls are not counted.
Calls rejected by input validation never reach the tool runner, so they are not counted.
Concurrent cache misses share one in-flight load; they still count as multiple lookups.
Usage rows are kept for 90 days. Usage survives
/disconnectbecause it contains no Strava data.Apply the D1 migrations before deploying. If
usage_eventsis missing, usage writes are skipped and logged.
Verification
npm run typecheck
npm test
npx wrangler deploy --dry-runCache entries expire by TTL. No write tools or webhooks are enabled.
This server cannot be deployed
Maintenance
Related MCP Connectors
Your own cycling data for your AI assistant: rides, power, climbs and routes. Read-only.
Your swim, bike and run training: readiness, HRV, sleep, workouts and race predictions. Read-only.
Read your workouts, history, and stats; create and schedule new workouts. Writes are additive only.
Access COROS activity, training and health data, and manage training plans and workouts.
Related MCP Servers
- 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
- AlicenseNot gradedqualityDmaintenanceEnables full management of Todoist accounts, including projects, tasks, sections, and labels, through the Model Context Protocol. It provides a comprehensive set of tools for performing CRUD operations and managing user information via the Todoist API.204 npmMIT
- AlicenseBqualityDmaintenanceA local, read-only Model Context Protocol server for an athlete's Strava profile and activities, enabling retrieval of profile data, activity lists (with paging and date filters), and detailed activity information via standard input/output for MCP hosts.35 npmMIT
- AlicenseAqualityBmaintenanceEnables read-only access to Capital One Nessie API resources such as customers, accounts, transactions, bills, and loans via the Model Context Protocol, using a Nessie API key.9MIT