Strava MCP Server
A Model Context Protocol server that provides language models with access to Strava API data, allowing them to query and analyze athlete activities from Strava.
tomekkorbak
Tools
get_activities
Get the authenticated athlete's recent activities. Args: limit: Maximum number of activities to return (default: 10) Returns: Dictionary containing activities data
get_activities_by_date_range
Get activities within a specific date range. Args: start_date: Start date in ISO format (YYYY-MM-DD) end_date: End date in ISO format (YYYY-MM-DD) limit: Maximum number of activities to return (default: 30) Returns: Dictionary containing activities data
get_activity_by_id
Get detailed information about a specific activity. Args: activity_id: ID of the activity to retrieve Returns: Dictionary containing activity details
get_recent_activities
Get activities from the past X days. Args: days: Number of days to look back (default: 7) limit: Maximum number of activities to return (default: 10) Returns: Dictionary containing activities data
README
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.py
script:
python get_strava_token.py
- Follow the prompts to authorize your application
- The script will save your tokens to a
.env
file
- 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.
Recommended Servers
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
serper-search-scrape-mcp-server
This Serper MCP Server supports search and webpage scraping, and all the most recent parameters introduced by the Serper API, like location.
The Verge News MCP Server
Provides tools to fetch and search news from The Verge's RSS feed, allowing users to get today's news, retrieve random articles from the past week, and search for specific keywords in recent Verge content.
Google Search Console MCP Server
A server that provides access to Google Search Console data through the Model Context Protocol, allowing users to retrieve and analyze search analytics data with customizable dimensions and reporting periods.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Tavily MCP Server
Provides AI-powered web search capabilities using Tavily's search API, enabling LLMs to perform sophisticated web searches, get direct answers to questions, and search recent news articles.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.