Back to list

AI Running Coach: Connecting Strava to Claude

runningaimcpstrava
AI Running Coach: Connecting Strava to Claude

I run. Not professionally, but regularly — several times a week. I don't have a coach, but I want to run properly: avoid overtraining, monitor heart rate, make progress, and finally finish that damn marathon.

About six months ago I read "Daniels' Running Formula" by Jack Daniels (no, not the bourbon guy — though after a marathon, they say that helps too). Since then I've been actively using AI assistants to analyze my training. I'd share my data with them, ask for training plan advice, discuss technique.

But there was one inconvenience: every time I had to manually provide the assistant with information about my runs. Screenshots from Strava, distance and heart rate numbers, descriptions of how I felt. It took time and discouraged me from asking often.

The solution was to connect Strava directly to Claude via MCP (Model Context Protocol). Now all my training data is available to the assistant instantly after each run.

What is MCP

MCP is a protocol that allows Claude to connect to external services. Instead of copying data manually, Claude gets access to the service's API and can request the information it needs.

Options I Tried

There are several MCP servers for Strava:

  1. strava-mcp by yorrickjansen — crashes due to incompatibility with new FastMCP version
  2. strava-activity-mcp-server — tool names don't meet Claude's requirements
  3. @r-huijts/strava-mcp-server — broken npm package, missing files

In the end, strava-mcp-server by tomekkorbak worked.

Setup Instructions

If you want to set this up yourself — here's a step-by-step guide. You'll need about 10 minutes and basic command line knowledge.

Step 1: Create a Strava Application

Strava doesn't give direct access to your data — you need special tokens to work with their API. The only way to get them is to register your own "application" with Strava. Sounds complicated, but it's really just a form on their website.

  1. Go to strava.com/settings/api
  2. Create a new application
  3. In "Authorization Callback Domain" enter localhost
  4. Save the Client ID and Client Secret

Step 2: Get the Authorization Code

Open this URL in your browser (substitute your Client ID):

https://www.strava.com/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost&scope=read,activity:read_all,profile:read_all

After authorization, the browser will redirect to localhost with a code parameter in the URL. Copy this code.

Step 3: Exchange the Code for a Refresh Token

In PowerShell, run:

$body = @{ client_id = "YOUR_CLIENT_ID" client_secret = "YOUR_CLIENT_SECRET" code = "YOUR_CODE" grant_type = "authorization_code" } Invoke-RestMethod -Uri "https://www.strava.com/oauth/token" -Method POST -Body $body

Save the refresh_token from the response.

Step 4: Configure Claude Desktop

Open %APPDATA%\Claude\claude_desktop_config.json and add:

{ "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" } } } }

Step 5: Configure Claude Code (optional)

This step is only needed if you use Claude Code — the terminal version of Claude. I use it more often than the desktop app: I'm just used to doing everything in the terminal.

In ~\.claude.json, add to the mcpServers section:

"strava": { "type": "stdio", "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" } }

How to Use It

Now after each run I can just open an existing chat (or start a new one) and ask Claude:

— "What do you think of my run today?" — "Show me my training for the week" — "How fast do you think I can run a marathon in two weeks?"

Claude accesses Strava, retrieves the data, and analyzes it. No screenshots, no manual input. Run — ask — get analysis.

Available tools:

  • get_activities — recent activities
  • get_activities_by_date_range — activities within a date range
  • get_activity_by_id — details of a specific workout
  • get_recent_activities — activities from the last N days

This won't replace a professional coach, but for an amateur — it's a great tool for reflection and tracking progress. Give it a try!

© 2026 Ivan Bezdenezhnykh. All rights reserved.