Strava MCP Server
Strava MCP 服务器
提供对 Strava API 访问权限的模型上下文协议(MCP) 服务器。它允许语言模型从 Strava API 查询运动员活动数据。
可用工具
该服务器公开以下工具:
活动查询
get_activities(limit: int = 10):获取已认证运动员的最近活动get_activities_by_date_range(start_date: str, end_date: str, limit: int = 30):获取特定日期范围内的活动get_activity_by_id(activity_id: int):获取有关特定活动的详细信息get_recent_activities(days: int = 7, limit: int = 10):获取过去 X 天的活动
日期应采用 ISO 格式 ( YYYY-MM-DD )。
Related MCP server: Strava MCP Server
活动数据格式
服务器返回具有一致字段名称和单位的活动数据:
场地 | 描述 | 单元 |
| 活动名称 | - |
| 运动类型 | - |
| 开始日期和时间 | ISO 8601 |
| 距离 | 米 |
| 总耗时 | 秒 |
| 搬家时间 | 秒 |
| 平均速度 | 米/秒 |
| 最大速度 | 米/秒 |
| 总海拔增益 | 米 |
| 最高海拔 | 米 |
| 最低海拔 | 米 |
| 消耗的卡路里 | 千卡 |
| 起始坐标 | [纬度,经度] |
| 结束坐标 | [纬度,经度] |
验证
要使用此服务器,您需要通过 Strava API 进行身份验证。请按以下步骤操作:
创建 Strava API 应用程序:
创建应用程序以获取您的客户端 ID 和客户端密钥
将授权回调域设置为
localhost
获取您的刷新令牌:
使用包含的
get_strava_token.py脚本:GXP1按照提示授权您的应用程序
该脚本将把你的令牌保存到
.env文件中
设置环境变量:服务器需要以下环境变量:
STRAVA_CLIENT_ID:您的 Strava API 客户端 IDSTRAVA_CLIENT_SECRET:您的 Strava API 客户端密钥STRAVA_REFRESH_TOKEN:您的 Strava API 刷新令牌
用法
克劳德桌面版
更新您的claude_desktop_config.json (在 macOS 上位于~/Library/Application\ Support/Claude/claude_desktop_config.json ,在 Windows 上位于%APPDATA%/Claude/claude_desktop_config.json )以包含以下内容:
{
"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,您可以在本地运行服务器并使用 MCP 扩展连接它。
示例查询
连接后,您可以向 Claude 询问以下问题:
“我最近有什么活动?”
“显示我上周的活动”
“过去一个月我跑的最长距离是多少?”
“获取我最近的骑行活动详情”
错误处理
服务器针对常见问题提供可读的错误消息:
无效的日期格式
API 身份验证错误
网络连接问题
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server that provides language models with access to personal Whoop fitness data, allowing queries for cycles, recovery, strain, and workout information from the Whoop API.26
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.6MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables users to access Strava fitness data, including user activities, activity details, segments, and leaderboards through a structured API interface.34MIT
- AlicenseAqualityFmaintenanceA Model Context Protocol (MCP) server for Intervals.icu integration. Access your training data, wellness metrics, and performance analysis through Claude and other LLMs.4835MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tomekkorbak/strava-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server