View as Markdown

Strava Integration

Manage Strava athletes, activities, routes, clubs, segments, streams, gear, and uploads

The Strava integration provides access to manage Strava athletes, activities, routes, clubs, segments, streams, gear, and uploads through the Integrate MCP server.

Installation

The Strava integration is included with the SDK:

import { stravaIntegration } from "integrate-sdk/server";

Setup

1. Create a Strava OAuth App

  1. Create an OAuth application for Strava
  2. Configure your redirect URI
  3. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Strava integration to your server configuration. The integration automatically reads STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET from your environment variables:

import { createMCPServer, stravaIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    stravaIntegration({
      scopes: ["read", "profile:read_all", "profile:write", "activity:read", "activity:read_all", "activity:write"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

stravaIntegration({
  clientId: process.env.CUSTOM_STRAVA_ID,
  clientSecret: process.env.CUSTOM_STRAVA_SECRET,
      scopes: ["read", "profile:read_all", "profile:write", "activity:read", "activity:read_all", "activity:write"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("strava");
const result = await client.strava.getLoggedInAthlete({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, stravaIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [stravaIntegration()],
});

Configuration Options

export interface StravaIntegrationConfig {
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • read
  • profile:read_all
  • profile:write
  • activity:read
  • activity:read_all
  • activity:write

Tools

strava_get_logged_in_athlete

Get logged in athlete

No parameters.

strava_update_logged_in_athlete

Update logged in athlete

export interface StravaUpdateLoggedInAthleteParams { athlete_json: string }

strava_get_athlete_stats

Get athlete stats

export interface StravaGetAthleteStatsParams { athlete_id: string }

strava_list_athlete_activities

List athlete activities

export interface StravaListAthleteActivitiesParams { before?: number;

strava_get_activity

Get activity

export interface StravaGetActivityParams { activity_id: string;

strava_create_activity

Create activity

export interface StravaCreateActivityParams { name: string;

strava_update_activity

Update activity

export interface StravaUpdateActivityParams { activity_id: string;

strava_delete_activity

Delete activity

export interface StravaDeleteActivityParams { activity_id: string }

strava_get_activity_streams

Get activity streams

export interface StravaGetActivityStreamsParams { activity_id: string;

strava_list_athlete_routes

List athlete routes

export interface StravaListAthleteRoutesParams { athlete_id: string;

strava_get_route

Get route

export interface StravaGetRouteParams { route_id: string }

strava_export_route_gpx

Export route gpx

export interface StravaExportRouteGpxParams { route_id: string }

strava_list_athlete_clubs

List athlete clubs

export interface StravaListAthleteClubsParams { page?: number;

strava_get_club

Get club

export interface StravaGetClubParams { club_id: string }

strava_list_club_activities

List club activities

export interface StravaListClubActivitiesParams { club_id: string;

strava_list_club_members

List club members

export interface StravaListClubMembersParams { club_id: string;

strava_get_segment

Get segment

export interface StravaGetSegmentParams { segment_id: string }

strava_explore_segments

Explore segments

export interface StravaExploreSegmentsParams { bounds: string;

strava_get_segment_leaderboard

Get segment leaderboard

export interface StravaGetSegmentLeaderboardParams { segment_id: string;

strava_list_starred_segments

List starred segments

export interface StravaListStarredSegmentsParams { page?: number;

strava_star_segment

Star segment

export interface StravaStarSegmentParams { segment_id: string;

strava_get_gear

Get gear

export interface StravaGetGearParams { gear_id: string }

strava_get_upload

Get upload

export interface StravaGetUploadParams { upload_id: string }

strava_create_upload

Create upload

export interface StravaCreateUploadParams { file_name: string;

Notes

  • Category: Fitness
  • Authentication mode: OAuth