{
  "markdown": "# Strava MCP Server\n\n**Talk to your Strava data using AI.**\n\nConnect 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.\"\n\n[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/r-huijts-strava-mcp-badge.png)](https://mseep.ai/app/r-huijts-strava-mcp)\n\n<a href=\"https://glama.ai/mcp/servers/@r-huijts/strava-mcp\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@r-huijts/strava-mcp/badge\" alt=\"Strava Server MCP server\" />\n</a>\n\n---\n\n## What Can You Do With This?\n\nOnce connected, just talk to Claude like you're talking to a friend who has access to all your Strava data:\n\n### 🏃 Track Your Progress\n> \"How many kilometers did I run this month?\"\n> \n> \"Compare my running stats from January to December\"\n> \n> \"What's my longest ride ever?\"\n\n### 📊 Analyze Your Workouts\n> \"Break down my last cycling workout - show me power, heart rate, and cadence\"\n> \n> \"How did my heart rate zones look during yesterday's run?\"\n> \n> \"What was my average pace for each lap in my interval training?\"\n\n### 🗺️ Explore Routes & Segments\n> \"What are the most popular cycling segments near Central Park?\"\n> \n> \"Show me my starred segments\"\n> \n> \"Export my Sunday morning route as a GPX file\"\n\n### 🏆 Get Coaching Insights\n> \"Analyze my training load this week\"\n> \n> \"How does my current fitness compare to last month?\"\n> \n> \"Give me a summary of my cycling performance this year\"\n\n---\n\n## Quick Start (3 Steps)\n\n### Step 1: Add to Claude Desktop\n\nOpen your Claude Desktop configuration file:\n- **Mac**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nAdd this to the file:\n\n```json\n{\n  \"mcpServers\": {\n    \"strava\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@r-huijts/strava-mcp-server\"]\n    }\n  }\n}\n```\n\n### Step 1 (alternative): Add to Claude Code\n\nYou can add this MCP server to claude code with the following command:\n\n```\nclaude mcp add --transport stdio strava -- npx @r-huijts/strava-mcp-server\n```\n\nYou can confirm successful instalation as follows:\n\n```\n% claude mcp list\nChecking MCP server health...\n\nstrava: npx @r-huijts/strava-mcp-server - ✓ Connected\n```\n\n### Step 2: Restart Claude Desktop\n\nClose and reopen Claude Desktop to load the new configuration.\n\n### Step 3: Connect Your Strava\n\nJust say to Claude:\n\n> **\"Connect my Strava account\"**\n\nA browser window will open. Enter your Strava API credentials, authorize the app, and you're done!\n\n**That's it!** Start asking about your activities.\n\n---\n\n## Connecting Your Strava Account\n\n### First Time Setup\n\nWhen you say \"Connect my Strava account\", here's what happens:\n\n1. **A browser window opens** showing a setup page\n2. **Enter your Strava API credentials** (Client ID and Client Secret)\n3. **Click \"Continue to Strava\"** - you'll be redirected to Strava\n4. **Authorize the app** on Strava's website\n5. **See the success message** - you can close the browser\n6. **Done!** Claude confirms you're connected\n\nYour credentials are saved locally at `~/.config/strava-mcp/config.json` and persist across sessions.\n\n### Getting Your Strava API Credentials\n\nYou need to create a free Strava API application (one-time setup):\n\n1. Go to [strava.com/settings/api](https://www.strava.com/settings/api)\n2. Click \"Create an App\" (or view your existing app)\n3. Fill in the form:\n   - **Application Name**: Anything you want (e.g., \"My Claude Assistant\")\n   - **Category**: Choose any\n   - **Website**: Can be anything (e.g., `http://localhost`)\n   - **Authorization Callback Domain**: Must be `localhost`\n4. Copy your **Client ID** and **Client Secret**\n\nThat's it! You only need to do this once.\n\n### Managing Your Connection\n\n- **Check status**: \"Am I connected to Strava?\"\n- **Reconnect**: \"Connect my Strava account\" (use `force: true` to reconnect)\n- **Disconnect**: \"Disconnect my Strava account\"\n\n---\n\n## Installation Options\n\n### Option A: Just Use It (Recommended)\n\nNo installation needed! The `npx` command in the Quick Start automatically downloads and runs the latest version.\n\n### Option B: Install Globally\n\nIf you prefer to install it once:\n\n```bash\nnpm install -g @r-huijts/strava-mcp-server\n```\n\nThen update your Claude config to use:\n\n```json\n{\n  \"mcpServers\": {\n    \"strava\": {\n      \"command\": \"strava-mcp-server\"\n    }\n  }\n}\n```\n\n**Note:** Even though the package name is `@r-huijts/strava-mcp-server`, the executable name remains `strava-mcp-server` for backward compatibility.\n\n### Option C: Build from Source\n\nFor developers who want to modify the code:\n\n   ```bash\n   git clone https://github.com/r-huijts/strava-mcp.git\n   cd strava-mcp\n   npm install\n   npm run build\n   ```\n\nThen point Claude to your local build:\n\n```json\n{\n  \"mcpServers\": {\n    \"strava\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/strava-mcp/dist/server.js\"]\n    }\n  }\n}\n```\n\n---\n\n## Example Conversations\n\n### Morning Check-in\n\n> **You**: What did I do for exercise this week?\n>\n> **Claude**: Looking at your Strava activities this week, you completed:\n> - Monday: 5.2km run (28:15)\n> - Wednesday: 45km bike ride (1:32:00)\n> - Saturday: 10km run (52:30)\n> \n> Total: 60.2km across 3 activities. Nice consistency!\n\n### Workout Analysis\n\n> **You**: Analyze my last cycling workout in detail\n>\n> **Claude**: Here's a breakdown of your ride \"Evening Loop\" from yesterday:\n> \n> **Overview**\n> - Distance: 42.3 km\n> - Time: 1:28:45\n> - Avg Speed: 28.6 km/h\n> \n> **Power Analysis**\n> - Average Power: 185W\n> - Normalized Power: 198W\n> - Max Power: 520W\n> \n> **Heart Rate**\n> - Average: 142 bpm\n> - Max: 175 bpm\n> - Time in Zone 4+: 23 minutes\n> \n> Your power-to-heart-rate ratio suggests good aerobic efficiency...\n\n### Finding New Routes\n\n> **You**: Find me some challenging cycling climbs near Boulder, Colorado\n>\n> **Claude**: Here are popular climbing segments near Boulder:\n> \n> 1. **Flagstaff Road** - 5.2km, 6.8% avg grade\n> 2. **Sunshine Canyon** - 3.8km, 7.2% avg grade  \n> 3. **Left Hand Canyon** - 8.1km, 4.5% avg grade\n> \n> Want me to star any of these so you can find them easily later?\n\n---\n\n## Available Tools\n\n### Account & Profile\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"Connect my Strava account\" | Links your Strava to Claude |\n| \"Check my Strava connection\" | Shows connection status |\n| \"Disconnect my Strava account\" | Unlinks Strava and clears stored tokens |\n| \"Get my Strava profile\" | Shows your profile info |\n| \"What shoes do I have?\" | Lists your shoes and usage distance |\n| \"What are my training zones?\" | Shows HR and power zones |\n\n### Activities\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"Show my recent activities\" | Lists your latest workouts |\n| \"Get all my runs from January\" | Fetches activities with filters |\n| \"Analyze activity 12345\" | Detailed info about one activity |\n| \"Show the laps from my last run\" | Lap-by-lap breakdown |\n| \"Get heart rate data from my ride\" | Time-series workout data (optimized compact format) |\n| \"Show photos from my hike\" | Activity photos |\n\n### Stats & Progress\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"What are my running stats?\" | YTD and all-time totals |\n| \"How far have I cycled this year?\" | Activity totals by type |\n| \"What's my longest ride?\" | Personal records |\n\n### Segments\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"Show my starred segments\" | Your favorite segments |\n| \"Find segments near [location]\" | Discover popular segments |\n| \"Get details on segment 12345\" | Segment info and leaderboard |\n| \"Star this segment\" | Save to favorites |\n| \"Show my efforts on [segment]\" | Your attempts on a segment |\n\n### Routes\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"List my saved routes\" | Your created routes |\n| \"Get details for my [route name]\" | Route info |\n| \"Export [route] as GPX\" | Download for GPS devices |\n| \"Export [route] as TCX\" | Download for GPS devices |\n\n### Clubs\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"What clubs am I in?\" | Lists your Strava clubs |\n\n### Workouts\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"Turn this workout into a Zwift file\" | Formats a workout plan into a structured file (currently Zwift `.zwo`) |\n\n### Server\n\n| What you can ask | What it does |\n|------------------|--------------|\n| \"What version is the Strava server?\" | Shows the MCP server version and metadata |\n\n---\n\n## Troubleshooting\n\n### \"Connect my Strava account\" doesn't open a browser\n\n- Make sure Claude Desktop is running the MCP server (check for errors in Claude)\n- Try restarting Claude Desktop\n- Check that port 8111 isn't blocked by a firewall\n\n### \"Authentication failed\" or \"Invalid token\"\n\n- Your token may have expired - say \"Connect my Strava account\" to reconnect\n- Make sure your Strava API application is still active at [strava.com/settings/api](https://www.strava.com/settings/api)\n\n### \"Missing credentials\" error\n\n- You need to complete the OAuth flow - say \"Connect my Strava account\"\n- If you're using environment variables, make sure all 4 are set (see Developer section)\n\n### Claude doesn't see the Strava tools\n\n- Make sure your `claude_desktop_config.json` is valid JSON (no trailing commas!)\n- Restart Claude Desktop after making config changes\n- Check Claude's developer console for error messages\n\n### JSONRPC.ProtocolTransportError after package name change\n\nIf you're getting a JSONRPC error after updating to `@r-huijts/strava-mcp-server`:\n\n1. **Clear npx cache**: Run `rm -rf ~/.npm/_npx` in terminal\n2. **Verify config** uses `@r-huijts/strava-mcp-server` (not the old `strava-mcp-server`)\n3. **Restart Claude Desktop** completely (quit and reopen)\n4. **Test manually**: Run `npx -y @r-huijts/strava-mcp-server` - you should see \"Starting Strava MCP Server v1.2.1...\"\n\n---\n\n## For Developers\n\n<details>\n<summary>Click to expand technical details</summary>\n\n### Environment Variables\n\nInstead of using the browser-based auth, you can set environment variables:\n\n| Variable | Description |\n|----------|-------------|\n| `STRAVA_CLIENT_ID` | Your Strava Application Client ID |\n| `STRAVA_CLIENT_SECRET` | Your Strava Application Client Secret |\n| `STRAVA_ACCESS_TOKEN` | OAuth access token |\n| `STRAVA_REFRESH_TOKEN` | OAuth refresh token |\n| `ROUTE_EXPORT_PATH` | Directory for GPX/TCX exports |\n\n### Token Refresh\n\nThe server automatically refreshes expired tokens. New tokens are saved to both `process.env` and `~/.config/strava-mcp/config.json`.\n\n### Config Priority\n\n1. Environment variables (highest)\n2. `~/.config/strava-mcp/config.json`\n3. Local `.env` file\n\n### Building & Testing\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\n### Activity Streams Optimization\n\nThe `get-activity-streams` tool uses a compact format by default, reducing payload size by ~70-80% while preserving all data:\n\n- **Compact format** (default): Raw arrays with metadata, ~70-80% smaller, ideal for LLM processing\n- **Verbose format**: Human-readable objects with formatted values (backward compatible)\n- **Smart chunking**: Large activities automatically split into ~50KB chunks\n- **Optional downsampling**: Can reduce very large datasets while preserving key features\n\nThe compact format includes comprehensive metadata (units, descriptions, statistics) so LLMs can understand the raw numeric data.\n\n### API Reference\n\nThe 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.\n\n### Contributing\n\nContributions welcome! Please submit a Pull Request.\n\n</details>\n\n---\n\n## License\n\nMIT License - see LICENSE file for details.\n\n---\n\n**Questions?** Open an issue on [GitHub](https://github.com/r-huijts/strava-mcp/issues).\n",
  "bytes": 11921,
  "sha": "8705b5ed2d29c77cd044c1139aebf8a8fe28b0a39a87701dcaae4e9179c24330",
  "repo_slug": "r-huijts/strava-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_r_huijts_strava_mcp_0bf8b9e9/readme"
}