Strava

Developer tools

MCP server for accessing Strava API.

Your AI app calls the Strava MCP server, which does the developer tools work and sends the result back to the chat.

About Strava

Strava is a community MCP server from r-huijts, filed in our directory under developer tools. MCP server for accessing Strava API.

Strava runs on your own machine: your AI app starts it with the command npx -y strava-mcp-server@1.0.1 and talks to it over standard input and output. It needs STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_ACCESS_TOKEN set before Strava starts.

Strava is listed in the official MCP registry as io.github.r-huijts/strava-mcp, version 1.0.1.

At a glance

Publisher
r-huijts (community)
Runs
Locally on your machine
Install from
Node.js package on npm: strava-mcp-server
Written in
TypeScript
License
MIT
GitHub stars
509
Official MCP registry
io.github.r-huijts/strava-mcp

How to set up Strava

  1. Install Node.js on the machine that runs your AI app, because Strava starts with npx and downloads its package on first run.
  2. Create STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_ACCESS_TOKEN for Strava in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Strava to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Strava tools to confirm the connection.
  5. Run one read-only task with Strava first, and keep your app asking before each tool call until the results look right.

Strava compared with similar servers

  • Copilot by VikashLoomba has fewer GitHub stars than Strava (508 against 509); both are community servers, and both run locally.
  • Iam Policy Autopilot by awslabs has more GitHub stars than Strava (510 against 509); Iam Policy Autopilot is official while Strava is a community server, and both run locally.
  • Vibe Check by PV-Bhat has fewer GitHub stars than Strava (507 against 509); both are community servers, and both run locally.

Before you connect Strava

  • Give Strava its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Strava tool call until you trust what it does with them.
  • Treat text that Strava fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Strava on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Strava

How marketing and sales teams put Strava to work, by company size. Pick the size closest to yours and start Strava on one use case.

Small business

  • A small business with a developer can use Strava to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Strava to explain and fix a marketing site issue without context switching between tools.
  • Strava runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Strava to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Strava to keep scripts and automations documented and versioned as they change.
  • Start Strava on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Strava with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Strava so web and marketing engineering share one reviewed way of working with AI.
  • Strava is a community server, so have security review the code and pin a version before Strava touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Strava README

From r-huijts/strava-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Strava MCP Server

Talk to your Strava data using AI.

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."

What Can You Do With This?

Once connected, just talk to Claude like you're talking to a friend who has access to all your Strava data:

🏃 Track Your Progress

"How many kilometers did I run this month?"

"Compare my running stats from January to December"

"What's my longest ride ever?"

📊 Analyze Your Workouts

"Break down my last cycling workout - show me power, heart rate, and cadence"

"How did my heart rate zones look during yesterday's run?"

"What was my average pace for each lap in my interval training?"

🗺️ Explore Routes & Segments

"What are the most popular cycling segments near Central Park?"

"Show me my starred segments"

"Export my Sunday morning route as a GPX file"

🏆 Get Coaching Insights

"Analyze my training load this week"

"How does my current fitness compare to last month?"

"Give me a summary of my cycling performance this year"

Quick Start (3 Steps)

Step 1: Add to Claude Desktop

Open your Claude Desktop configuration file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this to the file:

{
  "mcpServers": {
    "strava": {
      "command": "npx",
      "args": ["-y", "@r-huijts/strava-mcp-server"]
    }
  }
}
Step 1 (alternative): Add to Claude Code

You can add this MCP server to claude code with the following command:

claude mcp add --transport stdio strava -- npx @r-huijts/strava-mcp-server

You can confirm successful instalation as follows:

% claude mcp list
Checking MCP server health...

strava: npx @r-huijts/strava-mcp-server - ✓ Connected
Step 2: Restart Claude Desktop

Close and reopen Claude Desktop to load the new configuration.

Step 3: Connect Your Strava

Just say to Claude:

"Connect my Strava account"

A browser window will open. Enter your Strava API credentials, authorize the app, and you're done!

That's it! Start asking about your activities.

Connecting Your Strava Account

First Time Setup

When you say "Connect my Strava account", here's what happens:

  1. A browser window opens showing a setup page
  2. Enter your Strava API credentials (Client ID and Client Secret)
  3. Click "Continue to Strava" - you'll be redirected to Strava
  4. Authorize the app on Strava's website
  5. See the success message - you can close the browser
  6. Done! Claude confirms you're connected

Your credentials are saved locally at ~/.config/strava-mcp/config.json and persist across sessions.

Getting Your Strava API Credentials

You need to create a free Strava API application (one-time setup):

  1. Go to strava.com/settings/api
  2. Click "Create an App" (or view your existing app)
  3. Fill in the form:
    • Application Name: Anything you want (e.g., "My Claude Assistant")
    • Category: Choose any
    • Website: Can be anything (e.g., http://localhost)
    • Authorization Callback Domain: Must be localhost
  4. Copy your Client ID and Client Secret

That's it! You only need to do this once.

Managing Your Connection
  • Check status: "Am I connected to Strava?"
  • Reconnect: "Connect my Strava account" (use force: true to reconnect)
  • Disconnect: "Disconnect my Strava account"

Installation Options

Option A: Just Use It (Recommended)

No installation needed! The npx command in the Quick Start automatically downloads and runs the latest version.

Option B: Install Globally

If you prefer to install it once:

npm install -g @r-huijts/strava-mcp-server

Then update your Claude config to use:

{
  "mcpServers": {
    "strava": {
      "command": "strava-mcp-server"
    }
  }
}

Note: Even though the package name is @r-huijts/strava-mcp-server, the executable name remains strava-mcp-server for backward compatibility.

Option C: Build from Source

For developers who want to modify the code:

git clone https://github.com/r-huijts/strava-mcp.git
cd strava-mcp
npm install
npm run build

Then point Claude to your local build:

{
  "mcpServers": {
    "strava": {
      "command": "node",
      "args": ["/path/to/strava-mcp/dist/server.js"]
    }
  }
}

Example Conversations

Morning Check-in

You: What did I do for exercise this week?

Claude: Looking at your Strava activities this week, you completed:

  • Monday: 5.2km run (28:15)
  • Wednesday: 45km bike ride (1:32:00)
  • Saturday: 10km run (52:30)

Total: 60.2km across 3 activities. Nice consistency!

Workout Analysis

You: Analyze my last cycling workout in detail

Claude: Here's a breakdown of your ride "Evening Loop" from yesterday:

Overview

  • Distance: 42.3 km
  • Time: 1:28:45
  • Avg Speed: 28.6 km/h

Power Analysis

  • Average Power: 185W
  • Normalized Power: 198W
  • Max Power: 520W

Heart Rate

  • Average: 142 bpm
  • Max: 175 bpm
  • Time in Zone 4+: 23 minutes

Your power-to-heart-rate ratio suggests good aerobic efficiency...

Finding New Routes

You: Find me some challenging cycling climbs near Boulder, Colorado

Claude: Here are popular climbing segments near Boulder:

  1. Flagstaff Road - 5.2km, 6.8% avg grade
  2. Sunshine Canyon - 3.8km, 7.2% avg grade
  3. Left Hand Canyon - 8.1km, 4.5% avg grade

Want me to star any of these so you can find them easily later?

Available Tools

Account & Profile
What you can ask What it does
"Connect my Strava account" Links your Strava to Claude
"Check my Strava connection" Shows connection status
"Disconnect my Strava account" Unlinks Strava and clears stored tokens
"Get my Strava profile" Shows your profile info
"What shoes do I have?" Lists your shoes and usage distance
"What are my training zones?" Shows HR and power zones
Activities
What you can ask What it does
"Show my recent activities" Lists your latest workouts
"Get all my runs from January" Fetches activities with filters
"Analyze activity 12345" Detailed info about one activity
"Show the laps from my last run" Lap-by-lap breakdown
"Get heart rate data from my ride" Time-series workout data (optimized compact format)
"Show photos from my hike" Activity photos
Stats & Progress
What you can ask What it does
"What are my running stats?" YTD and all-time totals
"How far have I cycled this year?" Activity totals by type
"What's my longest ride?" Personal records
Segments
What you can ask What it does
"Show my starred segments" Your favorite segments
"Find segments near [location]" Discover popular segments
"Get details on segment 12345" Segment info and leaderboard
"Star this segment" Save to favorites
"Show my efforts on [segment]" Your attempts on a segment
Routes
What you can ask What it does
"List my saved routes" Your created routes
"Get details for my [route name]" Route info
"Export [route] as GPX" Download for GPS devices
"Export [route] as TCX" Download for GPS devices
Clubs
What you can ask What it does
"What clubs am I in?" Lists your Strava clubs
Workouts
What you can ask What it does
"Turn this workout into a Zwift file" Formats a workout plan into a structured file (currently Zwift .zwo)
Server
What you can ask What it does
"What version is the Strava server?" Shows the MCP server version and metadata

Troubleshooting

"Connect my Strava account" doesn't open a browser
  • Make sure Claude Desktop is running the MCP server (check for errors in Claude)
  • Try restarting Claude Desktop
  • Check that port 8111 isn't blocked by a firewall
"Authentication failed" or "Invalid token"
  • Your token may have expired - say "Connect my Strava account" to reconnect
  • Make sure your Strava API application is still active at strava.com/settings/api
"Missing credentials" error
  • 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:

  1. Clear npx cache: Run rm -rf ~/.npm/_npx in terminal
  2. Verify config uses @r-huijts/strava-mcp-server (not the old strava-mcp-server)
  3. Restart Claude Desktop completely (quit and reopen)
  4. 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
  1. Environment variables (highest)
  2. ~/.config/strava-mcp/config.json
  3. Local .env file
Building & Testing
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.

License

MIT License - see LICENSE file for details.

Questions? Open an issue on GitHub.

Questions about Strava

What is the Strava MCP server?

MCP server for accessing Strava API. Strava is maintained by r-huijts on GitHub at r-huijts/strava-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Strava MCP server?

Add Strava to your AI app's MCP config with the command npx -y strava-mcp-server@1.0.1. In Claude Code, run claude mcp add --transport stdio strava -- npx -y strava-mcp-server@1.0.1. To run Strava this way you need Node.js installed.

Does Strava need an API key?

Yes. Strava expects STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_ACCESS_TOKEN to be set. Create the key for Strava in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Strava an official MCP server?

No. Strava is a community server maintained by r-huijts. Community servers can be excellent; read the code and the open issues before you give Strava access to company data.

What license is Strava under?

Strava is released under the MIT license, according to its GitHub repository. The license covers the code of Strava; the service it connects to has its own terms.