strava-mcp
MCP server for Strava integration, enabling LLMs to query activities, athlete stats, segments, routes, and perform training analysis.
README
Strava MCP Server

A Model Context Protocol (MCP) server for Strava integration. Access your activities, athlete stats, segments, and routes through Claude, ChatGPT, and other LLMs.
Overview
This MCP server provides 11 tools to interact with your Strava account, organized into 5 categories:
- Activities (2 tools) - Query and analyze your Strava activities
- Athlete (1 tool) - Access profile, statistics, and training zones
- Segments (3 tools) - Explore and track segment efforts
- Routes (2 tools) - Manage and export routes
- Analysis (3 tools) - Training insights, comparison, and similarity search
Additionally, the server provides:
- 1 MCP Resource - Athlete profile with stats and zones for ongoing context
- 6 MCP Prompts - Templates for common queries (training analysis, segment performance, activity analysis, run comparison, training summary, race performance)
Deployment Options:
- Stdio Mode: Single-user local deployment (e.g., Claude Desktop, Cursor)
- HTTP Mode: Multi-user deployment (e.g., ChatGPT, remote MCP deployment)
Prerequisites
- uv (the package requires Python 3.11+, which uv can manage), OR
- Docker
Strava API Application Setup
Before installation, you need to create a Strava API application:
- Go to https://www.strava.com/settings/api
- Create a new application with the following settings:
- Application Name: Your choice (e.g., "My Strava MCP")
- Category: Your choice (e.g., "Data Importer")
- Club: Leave blank (optional)
- Website: Can be anything (e.g.,
http://localhost) - Authorization Callback Domain: Must be
localhost
- After creation, note your Client ID and Client Secret
- You'll use these credentials during the setup process below
Installation & Setup
How Authentication Works
Stdio Mode (single-user, pre-configured)
- OAuth Flow - One-time authorization through browser
- Token Storage - OAuth tokens saved to
~/.strava-mcp.envby default, or a local.envfile when one exists - Auto-Refresh - Tokens automatically refreshed when expired
- Persistence - Subsequent runs reuse stored tokens
HTTP Mode (multi-user, on-demand)
- OAuth Flow - Per-user authorization on first connection (MCP OAuth → Strava OAuth)
- Token Storage - OAuth tokens stored in session store (in-memory or DynamoDB)
- Auto-Refresh - Tokens refreshed automatically per-session
- Persistence - Sessions expire after 12 hours (configurable)
Option 1: Using uvx
uvx mcp-strava auth
This interactive wizard will guide you through configuring authentication for stdio or
http transport modes. It writes configuration to ~/.strava-mcp.env by default.
If you prefer source checkout development, see "Using Local Source" below.
For manual stdio configuration, create ~/.strava-mcp.env with your Strava OAuth app
credentials and tokens.
Option 2: Using Docker
# Pull the image
docker pull ghcr.io/eddmann/strava-mcp:latest
Then configure credentials:
# Create the env file first (Docker will create it as a directory if it doesn't exist)
touch strava-mcp.env
# Run the setup script
docker run -it --rm \
-v "/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env" \
ghcr.io/eddmann/strava-mcp:latest \
auth
This interactive wizard will guide you through configuring authentication for stdio or http transport modes.
Required OAuth Scopes
The authentication process requests these scopes:
profile:read_all- Read athlete profile and zonesactivity:read_all- Read all activity dataactivity:read- Read activity summariesprofile:write- Star/unstar segments
Transport Modes
The server supports two transport modes selected via --transport flag (stdio is default, no flag needed):
Stdio Mode (Default)
Uses standard input/output for communication with a single pre-configured Strava account.
- Authentication: Pre-configured OAuth tokens in
~/.strava-mcp.envor a local.envfile - Users: Single user per deployment
- Setup: Run
strava-mcp authto authorize once - Token Storage:
~/.strava-mcp.envby default, with local.envoverrides for development and Docker
HTTP Mode (Streamable HTTP)
Uses HTTP transport with per-user OAuth flow.
- Authentication: OAuth flow per user (MCP OAuth → Strava OAuth)
- Users: Multi-user support with separate sessions
- Setup: Environment-based configuration
- Token Storage: In-memory or DynamoDB session store
Claude Desktop Configuration
Add to your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Using uvx
After running uvx mcp-strava auth, configure Claude Desktop to start the published
package:
{
"mcpServers": {
"strava": {
"command": "uvx",
"args": ["mcp-strava"]
}
}
}
Using Local Source
For development, run from a local checkout:
cd strava-mcp
make deps
uv run strava-mcp auth
{
"mcpServers": {
"strava": {
"command": "uv",
"args": [
"run",
"--directory",
"/ABSOLUTE/PATH/TO/strava-mcp",
"strava-mcp",
"--transport",
"stdio"
]
}
}
}
Using Docker
{
"mcpServers": {
"strava": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env",
"ghcr.io/eddmann/strava-mcp:latest",
"--transport",
"stdio"
]
}
}
}
ChatGPT Integration & HTTP Mode
Running in HTTP Mode
Start the server in HTTP mode for remote deployments:
# Using uvx
uvx --from "mcp-strava[http]" mcp-strava --transport http
# Using local source
cd /ABSOLUTE/PATH/TO/strava-mcp
make deps
uv run strava-mcp --transport http
# Using Docker
docker run -p 8000:8000 --rm \
-v "/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env" \
ghcr.io/eddmann/strava-mcp:latest \
--transport http
Environment variables can be configured using uvx mcp-strava auth, or strava-mcp auth from a local checkout or Docker image.
Local Development with ngrok
To test ChatGPT integration locally:
-
Start the server in HTTP mode:
uv run strava-mcp --transport http -
In a separate terminal, expose via ngrok:
ngrok http 8000 -
Update environment: Set
STRAVA_MCP_BASE_URLto your ngrok URL:export STRAVA_MCP_BASE_URL=https://abc123.ngrok.ioOr add to your
.envfile:STRAVA_MCP_BASE_URL=https://abc123.ngrok.io -
Restart the server to pick up the new base URL
-
Configure ChatGPT: Use the ngrok URL (with
/mcppath) as your MCP server endpoint
Usage
Ask Claude to interact with your Strava data using natural language. The server provides tools, a resource, and prompt templates to help you get started.
Quick Start with MCP Prompts
Use built-in prompt templates for common queries (available via prompt suggestions in Claude):
analyze_recent_training- Analyze my training over the past 30 dayssegment_performance- Analyze my performance on a specific segmentactivity_deep_dive- Deep dive into a specific activitycompare_recent_runs- Compare my recent runs to track progresstraining_summary- Show me a comprehensive training summaryrace_performance_analysis- Analyze race performance for a specific distance
Activities
"Show me my runs from the last 30 days"
"Get my last long run with lap splits and heart rate zones"
"Show me the comments and kudos on my half marathon race"
"Find all my marathon races from this year"
"Show me all 10km runs from the last 90 days"
Athlete Profile & Stats
"Show my athlete profile with year-to-date stats and training zones"
Note: The athlete profile resource (strava://athlete/profile) automatically provides ongoing context.
Segments
"Show me the Box Hill segment with my effort history"
"Find running segments near Hyde Park"
"Show the leaderboard for my favorite climb segment"
Routes
"List my routes"
"Export my Richmond Park route to GPX"
Training Analysis
"Analyze my training over the past 30 days"
"Analyze my marathon race performance this year"
"Compare my last three 10K runs"
"Find runs similar to my last tempo workout"
"Show me all my 5k races from the last year"
Note: List-returning tools use cursor-based pagination with default limits (10 items for activities/segments/routes, 50 for leaderboards).
Available Tools
Activities (2 tools)
| Tool | Description |
|---|---|
query_activities |
Unified query for activities with filtering (distance, title, race status) and optional enrichment (laps, zones, streams) |
get_activity_social |
Get comments and kudos for an activity |
Athlete (1 tool)
| Tool | Description |
|---|---|
get_athlete_profile |
Get athlete profile with optional statistics (recent, YTD, all-time) and training zones |
Segments (3 tools)
| Tool | Description |
|---|---|
query_segments |
Unified segment query (by ID, starred, or explore by geographic bounds) |
star_segment |
Star or unstar a segment |
get_segment_leaderboard |
Get segment leaderboard with filtering options |
Routes (2 tools)
| Tool | Description |
|---|---|
query_routes |
Get route details (single route by ID or list all routes) |
export_route |
Export a route to GPX or TCX format |
Analysis (3 tools)
| Tool | Description |
|---|---|
analyze_training |
Analyze training over a time period with filtering (distance, title, race status) and aggregated metrics |
compare_activities |
Compare 2-5 activities side-by-side |
find_similar_activities |
Find activities similar to a reference activity with pre-filtering options for progress tracking |
MCP Resources
Resources provide ongoing context to the LLM without requiring explicit tool calls:
| Resource | Description |
|---|---|
strava://athlete/profile |
Complete athlete profile with recent stats, zones, and gear |
MCP Prompts
Prompt templates for common queries (accessible via prompt suggestion in Claude):
| Prompt | Description |
|---|---|
analyze_recent_training |
Comprehensive training analysis over a specified period |
race_performance_analysis |
Analyze race performance for a specific distance |
segment_performance |
Detailed segment performance analysis |
activity_deep_dive |
Deep dive into a specific activity with all metrics |
compare_recent_runs |
Compare recent runs to identify trends and improvements |
training_summary |
Comprehensive training overview with recommendations |
License
MIT License - see LICENSE file for details
Disclaimer
This project is not affiliated with, endorsed by, or sponsored by Strava, Inc. All product names, logos, and brands are property of their respective owners.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。