This MCP server provides access to the Strava API. It is intended to connect an AI client to a user’s Strava account so questions can be answered using Strava data, including running and ride activity details.
🛠️ Key Features
Access to the Strava API
Connect to a Strava account
Use with plain-English questions about Strava data
🚀 Use Cases
“How far did I run this month?”
“Analyze my last ride”
“Show me my fastest segments”
⚡ Developer Benefits
Integrates Strava data into MCP workflows
Enables natural-language queries over Strava activity data
⚠️ Limitations
The available description excerpts do not specify supported endpoints, authentication details, or any tool list length.
Connect Claude to your Strava account and ask questions in plain English: "How far did I run this month?", "Analyze my last ride", or "Show me my fastest segments."
You need to complete the OAuth flow - say "Connect my Strava account"
If you're using environment variables, make sure all 4 are set (see Developer section)
Claude doesn't see the Strava tools
Make sure your claude_desktop_config.json is valid JSON (no trailing commas!)
Restart Claude Desktop after making config changes
Check Claude's developer console for error messages
JSONRPC.ProtocolTransportError after package name change
If you're getting a JSONRPC error after updating to @r-huijts/strava-mcp-server:
Clear npx cache: Run rm -rf ~/.npm/_npx in terminal
Verify config uses @r-huijts/strava-mcp-server (not the old strava-mcp-server)
Restart Claude Desktop completely (quit and reopen)
Test manually: Run npx -y @r-huijts/strava-mcp-server - you should see "Starting Strava MCP Server v1.2.1..."
For Developers
Click to expand technical details
Environment Variables
Instead of using the browser-based auth, you can set environment variables:
Variable
Description
STRAVA_CLIENT_ID
Your Strava Application Client ID
STRAVA_CLIENT_SECRET
Your Strava Application Client Secret
STRAVA_ACCESS_TOKEN
OAuth access token
STRAVA_REFRESH_TOKEN
OAuth refresh token
ROUTE_EXPORT_PATH
Directory for GPX/TCX exports
Token Refresh
The server automatically refreshes expired tokens. New tokens are saved to both process.env and ~/.config/strava-mcp/config.json.
Config Priority
Environment variables (highest)
~/.config/strava-mcp/config.json
Local .env file
Building & Testing
bash
npm install
npm run build
npm test
Activity Streams Optimization
The get-activity-streams tool uses a compact format by default, reducing payload size by ~70-80% while preserving all data:
Compact format (default): Raw arrays with metadata, ~70-80% smaller, ideal for LLM processing
Verbose format: Human-readable objects with formatted values (backward compatible)
Smart chunking: Large activities automatically split into ~50KB chunks
Optional downsampling: Can reduce very large datasets while preserving key features
The compact format includes comprehensive metadata (units, descriptions, statistics) so LLMs can understand the raw numeric data.
API Reference
The server implements the Model Context Protocol (MCP) and exposes 25 tools for Strava API v3. See the source code in src/tools/ for implementation details.
Contributing
Contributions welcome! Please submit a Pull Request.