Skip to main content
Glama
didikz

stravamcp

by didikz

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

list_activities

Recent activities with optional sport_type / commute filters

get_activity

Activity detail by id or id_str

get_activity_streams

Time-series streams by key

get_activity_zones

HR and power time-in-zone distribution

summarize_activity_streams

Compact summary; full arrays stay on the server

get_athlete

Connected athlete profile

get_athlete_stats

YTD, recent, and all-time totals

get_athlete_zones

HR / power zone ranges

list_athlete_routes

Saved routes

get_route

Route detail by id_str

list_starred_segments

Starred segments

get_segment

Segment detail by id

list_segment_efforts

Your efforts on a segment

get_gear

Bike / shoe detail by id

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

  1. Copy the env template and fill in the credentials:

cp .dev.vars.example .dev.vars
  1. Apply the local D1 migration:

npx wrangler d1 migrations apply stravamcp
  1. Start the dev server:

npm run dev

Local MCP endpoint: http://localhost:8787/mcp

GET / serves a landing page describing the server and its tools.

Cloudflare deployment

  1. Create a Strava API app at https://www.strava.com/settings/api.

  2. Set the Authorization Callback Domain to your domain, e.g. stravamcp.didiktrisusanto.dev.

  3. 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 deploy

Generate random secrets with openssl rand -hex 32.

  1. Connect the Strava account once:

https://stravamcp.didiktrisusanto.dev/authorize?token=<SETUP_TOKEN>
  1. Use the MCP endpoint with MCP_SECRET:

{
  "url": "https://stravamcp.didiktrisusanto.dev/mcp",
  "headers": {
    "Authorization": "Bearer <MCP_SECRET>"
  }
}

Verification

npm run typecheck
npm test
npx wrangler deploy --dry-run

Cache entries expire by TTL. No write tools or webhooks are enabled.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    330 npm
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A 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.
    3
    10 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables 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.
    9
    MIT