Skip to main content
Glama
Strava MCP Server
by judepd

Strava MCP Server

Minimal Model Context Protocol server for Strava.

This project connects to Strava using OAuth and exposes athlete/activity tools over MCP stdio transport.

Strava API Notes

This implementation uses Strava's official APIs:

  • Authorization URL: https://www.strava.com/oauth/authorize

  • Token exchange / refresh: POST https://www.strava.com/oauth/token

  • API base: https://www.strava.com/api/v3

Core endpoints used:

  • GET /athlete

  • GET /athlete/activities

  • GET /activities/{id}

  • GET /activities/{id}/streams

Docs:

Related MCP server: FastMCP Remote Proxy

Exposed MCP Tools

  • strava_get_authorize_url

  • strava_check_connection

  • strava_get_athlete

  • strava_list_activities

  • strava_get_activity

  • strava_get_activity_streams

Prerequisites

Setup

cp .env.example .env
npm install

Set required values in .env:

  • STRAVA_CLIENT_ID

  • STRAVA_CLIENT_SECRET

  • STRAVA_REFRESH_TOKEN (recommended), or STRAVA_ACCESS_TOKEN + STRAVA_EXPIRES_AT

To get a refresh token for the first time:

  1. Use strava_get_authorize_url and open the URL.

  2. Approve scopes and copy the returned code query parameter.

  3. Exchange code for tokens:

curl -X POST https://www.strava.com/oauth/token \
  -d client_id="$STRAVA_CLIENT_ID" \
  -d client_secret="$STRAVA_CLIENT_SECRET" \
  -d code="AUTHORIZATION_CODE" \
  -d grant_type="authorization_code"

Development

npm run dev

Build + Run

npm run build
npm start

Use with Codex CLI

  1. Build the server:

npm run build
  1. Add this MCP server to Codex:

codex mcp add strava \
  --env STRAVA_CLIENT_ID=YOUR_CLIENT_ID \
  --env STRAVA_CLIENT_SECRET=YOUR_CLIENT_SECRET \
  --env STRAVA_REFRESH_TOKEN=YOUR_REFRESH_TOKEN \
  -- node /absolute/path/to/strava-mcp/dist/index.js
  1. Verify configuration:

codex mcp list
codex mcp get strava
  1. Remove it later if needed:

codex mcp remove strava

Use with another MCP client

Example MCP server config:

{
  "mcpServers": {
    "strava": {
      "command": "node",
      "args": ["/absolute/path/to/strava-mcp/dist/index.js"],
      "env": {
        "STRAVA_CLIENT_ID": "YOUR_CLIENT_ID",
        "STRAVA_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "STRAVA_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
      }
    }
  }
}

Create GitHub Project

From the strava-mcp folder:

git init
git add .
git commit -m "Initial Strava MCP server"
gh repo create strava-mcp --public --source=. --remote=origin --push

If you do not use GitHub CLI:

  1. Create an empty repo in GitHub UI.

  2. Add remote and push:

git remote add origin git@github.com:<your-org-or-user>/strava-mcp.git
git branch -M main
git push -u origin main

Available Tools

6 tools
strava_check_connectionA

Check authentication by retrieving the authenticated athlete profile.

Inputs: no named parameters.

strava_get_activityC

Get detailed information for a specific activity ID.

Inputs: activity_id (required).

strava_get_activity_streamsC

Get detailed stream data for a specific activity.

Inputs: activity_id (required), keys, resolution, key_by_type, +1 more.

strava_get_athleteA

Get the authenticated athlete profile from Strava.

Inputs: no named parameters.

strava_get_authorize_urlB

Generate a Strava OAuth authorization URL for initial user consent.

Inputs: redirect_uri (required), scope, state.

strava_list_activitiesC

List recent athlete activities using Strava pagination.

Inputs: page, after, before, per_page.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 6 tools

    Disambiguation3/5

    Most tools target distinct operations (auth URL, activity list, activity detail, streams). However, strava_check_connection and strava_get_athlete both retrieve the authenticated athlete profile, creating genuine overlap an agent could misselect between. The descriptions hint at the difference (auth validation vs. profile fetch) but the boundary is fuzzy.

    Naming Consistency5/5

    All six tools follow a consistent snake_case strava_verb_noun pattern with a uniform server prefix. Verb choices (get, list, check) are predictable and readable.

    Tool Count5/5

    Six tools is well-scoped for a focused Strava read integration; each tool earns its place with no filler. The surface is compact and coherent.

    Completeness3/5

    Read coverage is solid (auth, profile, list/detail activities, streams) but the surface is entirely read-only — no activity upload, update, deletion, athlete stats, or segment endpoints. These are notable gaps for a Strava integration, though agents can still accomplish common read workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Bridges local stdio MCP clients like Codex and OpenCode to Strava's official MCP endpoint, enabling Strava data access via imported OAuth credentials from Claude Code without a developer app.
      35 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables local MCP clients to access tools from a remote FastMCP server over stdio, handling OAuth authentication and Streamable HTTP communication.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables an MCP client to search, read, download, create, edit, organize, trash, untrash, and share files in a single Google Drive account over stdio using your own Google OAuth client.
      17
      MIT