Strava MCP Server
Connects Claude to the Strava API to provide direct access to fitness data, including athlete statistics, detailed activity logs, and time-series performance metrics. It enables users to analyze training progress, compare workouts, and retrieve specific segment details through natural language queries.
README
Strava MCP Server
An MCP (Model Context Protocol) server that connects Claude to the Strava API, giving Claude direct access to your training data.
Features
- Athlete Profile — Get your Strava profile info
- Athlete Stats — Lifetime and recent totals (runs, rides, swims)
- Activities — List recent activities or filter by date range
- Activity Details — Deep dive into any single activity
- Activity Streams — Time-series data: GPS, heartrate, power, cadence, altitude
- Segments — Starred segments and segment details
Setup
1. Create a Strava API Application
- Go to strava.com/settings/api
- Create an application — set the Authorization Callback Domain to
localhost - Note your Client ID and Client Secret
2. Install & Authorize
npm install
npm run setup
The setup wizard will:
- Ask for your Client ID and Client Secret
- Open your browser to authorize with Strava
- Automatically catch the callback and exchange tokens
- Write your
.envfile
3. Build
npm run build
<details> <summary>Manual setup (alternative)</summary>
Open this URL in your browser (replace CLIENT_ID):
https://www.strava.com/oauth/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=http://localhost&scope=read_all,activity:read_all
After authorizing, you'll be redirected to http://localhost?code=AUTHORIZATION_CODE. Copy the code and exchange it:
curl -s -X POST 'https://www.strava.com/oauth/token' \
-F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'code=AUTHORIZATION_CODE' \
-F 'grant_type=authorization_code'
Save the refresh_token from the response and create a .env file:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REFRESH_TOKEN=your_refresh_token
</details>
4. Configure Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/Users/USERNAME/Apps/StravaMCP/dist/index.js"],
"env": {
"STRAVA_CLIENT_ID": "your_client_id",
"STRAVA_CLIENT_SECRET": "your_client_secret",
"STRAVA_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
Restart Claude Desktop. You should see the Strava tools available in the tools menu (hammer icon).
Available Tools
| Tool | Description |
|---|---|
get_athlete |
Get your Strava profile |
get_athlete_stats |
Get lifetime and recent statistics |
get_activities |
List recent activities (paginated) |
get_activities_between |
Get all activities within a date range (auto-paginated) |
get_activity |
Get detailed info for one activity |
get_activity_laps |
Get lap/split data for an activity |
get_activity_zones |
Get HR and power zone distribution |
get_activity_streams |
Get time-series data (GPS, HR, power, etc.) |
get_starred_segments |
Get your starred segments |
get_segment |
Get details for a specific segment |
get_segment_efforts |
Get your efforts on a segment (with optional date filter) |
Example Prompts
Once connected, try asking Claude:
- "What were my activities this week?"
- "Analyze my running performance over the past month"
- "Compare my cycling times in January vs February"
- "Show me my heartrate data from my last run"
- "What are my all-time stats?"
Development
# Run in dev mode (no build step)
npm run dev
# Build for production
npm run build
npm start
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。