Strava Cardio MCP
Provides read-only access to Strava's official API, enabling retrieval of athlete profiles, activity summaries and details, laps, heart-rate and power zones, time-series streams, aggregate run/ride/swim stats, and cardio summaries with duplicate-import flags.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Strava Cardio MCPSummarize my running mileage and average heart rate over the last 4 weeks."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Strava Cardio MCP
A local, read-only Model Context Protocol server that connects agents directly to the official Strava API. It gives Codex and other MCP hosts structured access to personal cardio history without putting Strava secrets in chat or project files.
It can read activity summaries, laps, heart-rate and power zones, detailed streams, and aggregate run/ride/swim statistics. Its cardio summary filters strength and climbing by default and flags likely duplicate device imports without silently deleting them.
The server has no create, edit, upload, or delete tools.
Quick start: Codex on macOS
Requirements: Node.js 20 or newer, Git, Codex CLI, and a Strava account.
git clone https://github.com/andywangyzfh/strava-mcp.git
cd strava-mcp
npm ci
npm run build
npm run connect
npm run install:codexBefore npm run connect, create a personal application in Strava API settings and set Authorization Callback Domain to localhost. The setup page saves the Client ID, Client Secret, and rotating refresh token in macOS Keychain. Restart Codex or open a new task after registration.
Related MCP server: Strava MCP Server
Linux, Windows, and other MCP hosts
The server also supports a private JSON credentials file outside the repository. Set STRAVA_MCP_CREDENTIALS_FILE to an absolute path before running npm run connect; the setup helper creates the file with user-only permissions and keeps its rotating refresh token current.
See docs/SETUP.md for macOS Keychain, Linux, Windows PowerShell, manual MCP configuration, OAuth, heart-rate permissions, and troubleshooting.
Tools
Tool | Purpose |
| Authenticated athlete profile |
| Paginated activity summaries |
| One detailed activity |
| Activity laps |
| Selected time-series streams, downsampled by default |
| Heart-rate and power zones |
| Aggregate run, ride, and swim statistics |
| Date-range cardio totals and likely duplicate flags |
Pass Strava athlete and activity IDs as strings so 64-bit values stay exact. See docs/TOOLS.md for usage guidance.
Privacy and behavior
OAuth requests
readandactivity:read_allso private activities can be analyzed.Access tokens stay in memory. Rotated refresh tokens are persisted to the configured secret store.
Requests are fixed to Strava's official v3 API and reject HTTP redirects.
Detailed streams default to at most 2,000 samples and can return up to 10,000.
The package is marked private to prevent accidental npm publication; the source is MIT licensed.
Read SECURITY.md before changing credential handling. A ready-made English and Chinese installation prompt for another agent is in docs/AGENT_INSTALL_PROMPT.md.
Development
npm ci
npm run check
npm test
npm run build中文说明
这是一个只读的本地 Strava MCP server,直接使用官方 API,不依赖第三方代理。它可以让 Codex 等 agent 分析跑步、骑行、步行、划船等有氧记录,并读取配速、心率、功率、踏频、海拔、分段和详细时间序列。
macOS 可以使用系统钥匙串保存凭证;Linux 和 Windows 可以使用仓库外的私密 JSON 文件。每位使用者应创建并授权自己的 Strava API application,不要分享 Client Secret 或 refresh token。
This server cannot be deployed
Maintenance
Related MCP Connectors
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Strava MCP tools for AI: athletes, activities, segments, clubs, routes. Powered by HAPI MCP server.
Query your Twitch streams, events, supporters, raids & rankings from an AI assistant via OAuth.
- RulebaseOAuthco.rulebase
CX ops: read conversations, calls and QA evaluations from Zendesk, Freshdesk, Five9 and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Strava's API to access and manage activities, athlete data, routes, segments, clubs, and gear through natural language.2210 npmMIT
- AlicenseBqualityDmaintenanceIntegrates with the Strava API to allow AI assistants to access fitness data including athlete profiles, activity history, and segment statistics. It enables users to query detailed performance metrics and explore geographic segment data through natural language commands.843 npmMIT
- FlicenseAqualityCmaintenanceEnables AI agents to interact with the Strava API to retrieve athlete statistics and activity data. It provides tools for listing recent activities and fetching detailed information for specific workout sessions.7-
- AlicenseBqualityDmaintenanceEnables users to interact with their Strava data through natural language to analyze workouts, track fitness progress, and explore routes. It supports retrieving detailed activity stats, heart rate data, and segment insights directly within AI assistants.26206 npmMIT