strava-mcp
MCP server that exposes Strava API v3 data (activities, segments, routes, clubs, gear, streams) as tools for any MCP client. Read-only by default, with an optional --write flag to enable mutating operations.
README
strava-mcp
MCP server for the Strava API v3. Exposes Strava data — activities, segments, routes, clubs, gear, and streams — as tools that any MCP client (Claude Desktop, Claude Code, etc.) can call.
Read-only by default. Pass --write to enable mutating tools (create/update activities, star segments).
OpenClaw-specific onboarding and sidecar setup: OPENCLAW.md.
Getting started
1. Create a Strava API application
Go to https://www.strava.com/settings/api and create an application. Note your Client ID and Client Secret.
2. Set up credentials
cp .env.example .env
Add your STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET to .env.
3. Build
pnpm install
pnpm build
4. Authenticate
pnpm auth
This opens your browser to authorize with Strava. After you approve, it automatically exchanges the code for tokens and saves STRAVA_ACCESS_TOKEN and STRAVA_REFRESH_TOKEN to your .env file. All scopes are requested (read_all, profile:read_all, activity:read_all, activity:write).
5. Test locally
pnpm inspect
Opens the MCP Inspector web UI where you can browse tools and call them interactively. Credentials are loaded from .env automatically.
You can also run the server directly:
pnpm start
6. Configure your MCP client
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/absolute/path/to/strava-mcp/build/index.js"],
"env": {
"STRAVA_ACCESS_TOKEN": "your-access-token"
}
}
}
}
To enable write tools (create/update activities, star segments), add "--write" to args:
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["/absolute/path/to/strava-mcp/build/index.js", "--write"],
"env": {
"STRAVA_ACCESS_TOKEN": "your-access-token"
}
}
}
}
Claude Code
claude mcp add strava node /absolute/path/to/strava-mcp/build/index.js
Automatic token refresh
Strava access tokens expire. To enable automatic refresh, provide all four env vars:
{
"env": {
"STRAVA_ACCESS_TOKEN": "your-access-token",
"STRAVA_REFRESH_TOKEN": "your-refresh-token",
"STRAVA_CLIENT_ID": "your-client-id",
"STRAVA_CLIENT_SECRET": "your-client-secret"
}
}
When a request returns 401 and refresh credentials are available, the server will automatically request a new access token from Strava's OAuth endpoint and retry the request.
Environment variables
| Variable | Required | Description |
|---|---|---|
STRAVA_ACCESS_TOKEN |
Yes | Strava OAuth2 bearer token |
STRAVA_REFRESH_TOKEN |
No | Enables automatic token refresh on 401 |
STRAVA_CLIENT_ID |
No | Required alongside refresh token |
STRAVA_CLIENT_SECRET |
No | Required alongside refresh token |
Tools
Read tools (always available)
Athlete
| Tool | Description |
|---|---|
get_athlete |
Get the authenticated athlete's profile |
get_athlete_stats |
Get athlete stats (totals, recent, YTD, all-time) |
get_athlete_zones |
Get heart rate and power zones |
Activities
| Tool | Description |
|---|---|
list_activities |
List the athlete's activities (filterable by before/after timestamps) |
get_activity |
Get full details of a specific activity |
list_activity_comments |
List comments on an activity |
list_activity_kudoers |
List athletes who kudoed an activity |
list_activity_laps |
List laps of an activity |
get_activity_zones |
Get heart rate/power zones for an activity |
get_activity_streams |
Get time-series data (heartrate, power, cadence, GPS, etc.) |
Segments
| Tool | Description |
|---|---|
get_segment |
Get details of a specific segment |
explore_segments |
Find popular segments within a bounding box |
list_starred_segments |
List the athlete's starred segments |
get_segment_effort |
Get details of a segment effort |
list_segment_efforts |
List efforts on a segment, optionally filtered by date |
get_segment_streams |
Get data streams for a segment |
get_segment_effort_streams |
Get data streams for a segment effort |
Routes
| Tool | Description |
|---|---|
get_route |
Get details of a specific route |
list_athlete_routes |
List routes created by an athlete |
get_route_streams |
Get data streams for a route |
Clubs
| Tool | Description |
|---|---|
get_club |
Get details of a specific club |
list_athlete_clubs |
List the athlete's clubs |
list_club_members |
List members of a club |
list_club_activities |
List recent activities in a club |
Gear
| Tool | Description |
|---|---|
get_gear |
Get details of a piece of equipment |
Write tools (requires --write flag)
| Tool | Description |
|---|---|
create_activity |
Create a manual activity |
update_activity |
Update an existing activity (name, description, sport type, gear, etc.) |
star_segment |
Star or unstar a segment |
Documentation
- Use cases — example prompts and what you can do with the server
- Architecture — file structure, data flow, and component responsibilities
- Design decisions — rationale behind the read/write split, token refresh strategy, thin client approach, and other trade-offs
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。