Strava MCP Server
Access the Strava API to query athlete activities data.
Strava MCP Server
A Model Context Protocol (MCP) server that provides access to the Strava API. It allows language models to query athlete activities data from the Strava API.
Available Tools
The server exposes the following tools:
Activities Queries
get_activities(limit: int = 10): Get the authenticated athlete's recent activitiesget_activities_by_date_range(start_date: str, end_date: str, limit: int = 30): Get activities within a specific date rangeget_activity_by_id(activity_id: int): Get detailed information about a specific activityget_recent_activities(days: int = 7, limit: int = 10): Get activities from the past X days
Dates should be provided in ISO format (YYYY-MM-DD).
Activity Data Format
The server returns activity data with consistent field names and units:
| Field | Description | Unit |
|---|---|---|
name | Activity name | - |
sport_type | Type of sport | - |
start_date | Start date and time | ISO 8601 |
distance_metres | Distance | meters |
elapsed_time_seconds | Total elapsed time | seconds |
moving_time_seconds | Moving time | seconds |
average_speed_mps | Average speed | meters per second |
max_speed_mps | Maximum speed | meters per second |
total_elevation_gain_metres | Total elevation gain | meters |
elev_high_metres | Highest elevation | meters |
elev_low_metres | Lowest elevation | meters |
calories | Calories burned | kcal |
start_latlng | Start coordinates | [lat, lng] |
end_latlng | End coordinates | [lat, lng] |
Authentication
To use this server, you'll need to authenticate with the Strava API. Follow these steps:
-
Create a Strava API application:
- Go to Strava API Settings
- Create an application to get your Client ID and Client Secret
- Set the Authorization Callback Domain to
localhost
-
Get your refresh token:
- Use the included
get_strava_token.pyscript:
python get_strava_token.py- Follow the prompts to authorize your application
- The script will save your tokens to a
.envfile
- Use the included
-
Set environment variables: The server requires the following environment variables:
STRAVA_CLIENT_ID: Your Strava API Client IDSTRAVA_CLIENT_SECRET: Your Strava API Client SecretSTRAVA_REFRESH_TOKEN: Your Strava API Refresh Token
Usage
Claude for Desktop
Update your claude_desktop_config.json (located in ~/Library/Application\ Support/Claude/claude_desktop_config.json on macOS and %APPDATA%/Claude/claude_desktop_config.json on Windows) to include the following:
{
"mcpServers": {
"strava": {
"command": "uvx",
"args": [
"strava-mcp-server"
],
"env": {
"STRAVA_CLIENT_ID": "YOUR_CLIENT_ID",
"STRAVA_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"STRAVA_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
}
}
}
}
Claude Web
For Claude Web, you can run the server locally and connect it using the MCP extension.
Example Queries
Once connected, you can ask Claude questions like:
- "What are my recent activities?"
- "Show me my activities from last week"
- "What was my longest run in the past month?"
- "Get details about my latest cycling activity"
Error Handling
The server provides human-readable error messages for common issues:
- Invalid date formats
- API authentication errors
- Network connectivity problems
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Servers
Akamai MCP Server
Automate Akamai resource actions using a conversational AI client. Requires Akamai API credentials.
Remote MCP Server (Authless)
A remote MCP server deployable on Cloudflare Workers without authentication.
Yandex Cloud
An unofficial server for interacting with the Yandex Cloud API.
Eyevinn Open Source Cloud
Interact with the Eyevinn Open Source Cloud API. Requires a Personal Access Token (OSC_ACCESS_TOKEN).
MCP OpenAI Server
A server for interacting with the OpenAI API. Requires an OpenAI API key.
Red Bee MCP Server
An MCP server for the Red Bee Media OTT Platform, offering tools for authentication, content search, user management, purchases, and system operations.
Salesforce Order Concierge
An ecommerce assistant for Salesforce, enabling interaction with orders, returns, and customer service operations.
API-MARKET MCP Server
Exposes API-Market's endpoints as MCP resources, requiring an API key for access.
Spotify MCP Node Server
Control Spotify playback and manage playlists using AI assistants and IDEs.
Remote MCP Proxy
A Docker-based proxy to access local MCP servers through Claude's web UI using the Remote MCP protocol.