Connects to the Strava API to allow retrieval of athlete statistics, listing of recent activities, and fetching detailed information for specific activity IDs.
Click on "Install 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., "@Strava MCP Servershow me my last five activities and career stats"
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 MCP Server
A Model Context Protocol (MCP) server that connects to the Strava API, allowing AI agents to retrieve athlete stats, list activities, and get detailed activity information.
Prerequisites
Python 3.10+
Strava API Application (to get Client ID and Secret)
Setup
1. Credentials
Go to Strava API Settings.
Create an application if you haven't already.
Note your
Client IDandClient Secret.You need a Refresh Token.
The easiest way to get one for your own account is to use the Strava OAuth playground or follow the Strava authentication docs to authorize your app and get the initial refresh token.
Scope required:
activity:read_all,read_all(adjust based on needs).
2. Installation
Clone this repository and enter the directory.
Using
Using standard
3. Configuration
Copy
.env.exampleto.env.Fill in your credentials.
Usage
Run the server using fastmcp:
Or run it directly with Python (if the main block calls mcp.run()):
Available Tools
get_athlete_stats: Get statistics for the authenticated athlete.list_activities: List recent activities (default limit: 5).get_activity_details: Get detailed information for a specific activity ID.
Development
Modify
server.pyto add more tools using thestravalibclient.