Strava MCP Server
Available Tools
Activities Queries
- `get_activities(limit: int = 10)`: Get the authenticated athlete's recent activities
- `get_activities_by_date_range(start_date: str, end_date: str, limit: int = 30)`: Get activities within a specific date range
- `get_activity_by_id(activity_id: int)`: Get detailed information about a specific activity
- `get_recent_activities(days: int = 7, limit: int = 10)`: Get activities from the past X days
Activity Data Format
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
Authentication
- Create a Strava API application: - Go to [Strava API Settings](https://www.strava.com/settings/api) - 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.py` script: ```bash python get_strava_token.py ``` - Follow the prompts to authorize your application - The script will save your tokens to a `.env` file
- Set environment variables: The server requires the following environment variables: - `STRAVA_CLIENT_ID`: Your Strava API Client ID - `STRAVA_CLIENT_SECRET`: Your Strava API Client Secret - `STRAVA_REFRESH_TOKEN`: Your Strava API Refresh Token
Usage
Claude for Desktop
Claude Web
Example Queries
- "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
- Invalid date formats
- API authentication errors
- Network connectivity problems