{"id":45084657,"url":"https://github.com/eddmann/strava-mcp","last_synced_at":"2026-02-19T15:36:05.480Z","repository":{"id":318855968,"uuid":"1074414437","full_name":"eddmann/strava-mcp","owner":"eddmann","description":"MCP server enabling LLMs to interact with the Strava API - activities, segments, routes, and training analysis","archived":false,"fork":false,"pushed_at":"2025-11-04T14:59:09.000Z","size":1178,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-04T16:21:51.583Z","etag":null,"topics":["activity-analysis","chatgpt","claude","fitness-tracking","llm","mcp","model-context-protocol","strava","strava-api","strava-integration","training-analytics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-11T18:35:49.000Z","updated_at":"2025-11-04T14:59:13.000Z","dependencies_parsed_at":"2025-10-16T20:17:35.443Z","dependency_job_id":"81a9f8ec-5e52-4f6a-a2e1-312ca52ea199","html_url":"https://github.com/eddmann/strava-mcp","commit_stats":null,"previous_names":["eddmann/strava-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eddmann/strava-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fstrava-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fstrava-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fstrava-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fstrava-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddmann","download_url":"https://codeload.github.com/eddmann/strava-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fstrava-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29620144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activity-analysis","chatgpt","claude","fitness-tracking","llm","mcp","model-context-protocol","strava","strava-api","strava-integration","training-analytics"],"created_at":"2026-02-19T15:36:04.672Z","updated_at":"2026-02-19T15:36:05.474Z","avatar_url":"https://github.com/eddmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strava MCP Server\n\n![Strava MCP Server](docs/heading.png)\n\nA Model Context Protocol (MCP) server for Strava integration. Access your activities, athlete stats, segments, and routes through Claude, ChatGPT, and other LLMs.\n\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n\n## Overview\n\nThis MCP server provides 11 tools to interact with your Strava account, organized into 5 categories:\n\n- Activities (2 tools) - Query and analyze your Strava activities\n- Athlete (1 tool) - Access profile, statistics, and training zones\n- Segments (3 tools) - Explore and track segment efforts\n- Routes (2 tools) - Manage and export routes\n- Analysis (3 tools) - Training insights, comparison, and similarity search\n\nAdditionally, the server provides:\n\n- 1 MCP Resource - Athlete profile with stats and zones for ongoing context\n- 5 MCP Prompts - Templates for common queries (training analysis, segment performance, activity analysis, run comparison, training summary)\n\n**Deployment Options:**\n\n- **Stdio Mode**: Single-user local deployment (e.g., Claude Desktop, Cursor)\n- **HTTP Mode**: Multi-user deployment (e.g., ChatGPT, remote MCP deployment)\n\n## Prerequisites\n\n- Python 3.11+ and [uv](https://github.com/astral-sh/uv), OR\n- Docker\n\n## Strava API Application Setup\n\nBefore installation, you need to create a Strava API application:\n\n1. Go to https://www.strava.com/settings/api\n2. Create a new application with the following settings:\n   - Application Name: Your choice (e.g., \"My Strava MCP\")\n   - Category: Your choice (e.g., \"Data Importer\")\n   - Club: Leave blank (optional)\n   - Website: Can be anything (e.g., `http://localhost`)\n   - **Authorization Callback Domain: Must be `localhost`**\n3. After creation, note your Client ID and Client Secret\n4. You'll use these credentials during the setup process below\n\n## Installation \u0026 Setup\n\n### How Authentication Works\n\n#### Stdio Mode (single-user, pre-configured)\n\n1. OAuth Flow - One-time authorization through browser\n2. Token Storage - OAuth tokens saved to `.env` file\n3. Auto-Refresh - Tokens automatically refreshed when expired\n4. Persistence - Subsequent runs reuse stored tokens\n\n#### HTTP Mode (multi-user, on-demand)\n\n1. OAuth Flow - Per-user authorization on first connection (MCP OAuth → Strava OAuth)\n2. Token Storage - OAuth tokens stored in session store (in-memory or DynamoDB)\n3. Auto-Refresh - Tokens refreshed automatically per-session\n4. Persistence - Sessions expire after 12 hours (configurable)\n\n### Option 1: Using UV\n\n```bash\n# Install dependencies\ncd strava-mcp\nuv sync\n```\n\nThen configure credentials:\n\n```bash\nuv run strava-mcp-auth\n```\n\nThis interactive wizard will guide you through configuring authentication for stdio or http transport modes.\n\n### Option 2: Using Docker\n\n```bash\n# Pull the image\ndocker pull ghcr.io/eddmann/strava-mcp:latest\n```\n\nThen configure credentials:\n\n```bash\n# Create the env file first (Docker will create it as a directory if it doesn't exist)\ntouch strava-mcp.env\n\n# Run the setup script\ndocker run -it --rm \\\n  -v \"/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env\" \\\n  --entrypoint= \\\n  ghcr.io/eddmann/strava-mcp:latest \\\n  python -m strava_mcp.scripts.setup_auth\n```\n\nThis interactive wizard will guide you through configuring authentication for stdio or http transport modes.\n\n### Required OAuth Scopes\n\nThe authentication process requests these scopes:\n\n- `profile:read_all` - Read athlete profile and zones\n- `activity:read_all` - Read all activity data\n- `activity:read` - Read activity summaries\n- `profile:write` - Star/unstar segments\n\n## Transport Modes\n\nThe server supports two transport modes selected via `--transport` flag (stdio is default, no flag needed):\n\n### Stdio Mode (Default)\n\nUses standard input/output for communication with a single pre-configured Strava account.\n\n- Authentication: Pre-configured OAuth tokens in `.env` file\n- Users: Single user per deployment\n- Setup: Run `strava-mcp-auth` to authorize once\n- Token Storage: Local `.env` file\n\n### HTTP Mode (Streamable HTTP)\n\nUses HTTP transport with per-user OAuth flow.\n\n- Authentication: OAuth flow per user (MCP OAuth → Strava OAuth)\n- Users: Multi-user support with separate sessions\n- Setup: Environment-based configuration\n- Token Storage: In-memory or DynamoDB session store\n\n## Claude Desktop Configuration\n\nAdd to your configuration file:\n\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n### Using UV\n\n```json\n{\n  \"mcpServers\": {\n    \"strava\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"run\",\n        \"--directory\",\n        \"/ABSOLUTE/PATH/TO/strava-mcp\",\n        \"strava-mcp\",\n        \"--transport\",\n        \"stdio\"\n      ]\n    }\n  }\n}\n```\n\n### Using Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"strava\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-v\",\n        \"/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env\",\n        \"ghcr.io/eddmann/strava-mcp:latest\",\n        \"--transport\",\n        \"stdio\"\n      ]\n    }\n  }\n}\n```\n\n## ChatGPT Integration \u0026 HTTP Mode\n\n### Running in HTTP Mode\n\nStart the server in HTTP mode for deploying remote:\n\n```bash\n# Using UV\nuv run --directory /ABSOLUTE/PATH/TO/strava-mcp strava-mcp --transport http\n\n# Using Docker\ndocker run -p 8000:8000 --rm \\\n  -v \"/ABSOLUTE/PATH/TO/strava-mcp.env:/app/.env\" \\\n  ghcr.io/eddmann/strava-mcp:latest \\\n  --transport http\n```\n\nEnvironment variables can be configured using the `strava-mcp-auth` setup wizard (see Installation \u0026 Setup above).\n\n### Local Development with ngrok\n\nTo test ChatGPT integration locally:\n\n1. **Start the server in HTTP mode**:\n\n   ```bash\n   uv run strava-mcp --transport http\n   ```\n\n2. **In a separate terminal, expose via ngrok**:\n\n   ```bash\n   ngrok http 8000\n   ```\n\n3. **Update environment**: Set `STRAVA_MCP_BASE_URL` to your ngrok URL:\n\n   ```bash\n   export STRAVA_MCP_BASE_URL=https://abc123.ngrok.io\n   ```\n\n   Or add to your `.env` file:\n\n   ```\n   STRAVA_MCP_BASE_URL=https://abc123.ngrok.io\n   ```\n\n4. **Restart the server** to pick up the new base URL\n\n5. **Configure ChatGPT**: Use the ngrok URL (with `/mcp` path) as your MCP server endpoint\n\n## Usage\n\nAsk Claude to interact with your Strava data using natural language. The server provides tools, a resource, and prompt templates to help you get started.\n\n### Quick Start with MCP Prompts\n\nUse built-in prompt templates for common queries (available via prompt suggestions in Claude):\n\n- `analyze-recent-training` - Analyze my training over the past 30 days\n- `segment-performance` - Analyze my performance on a specific segment\n- `activity-deep-dive` - Deep dive into a specific activity\n- `compare-recent-runs` - Compare my recent runs to track progress\n- `training-summary` - Show me a comprehensive training summary\n\n### Activities\n\n```\n\"Show me my runs from the last 30 days\"\n\"Get my last long run with lap splits and heart rate zones\"\n\"Show me the comments and kudos on my half marathon race\"\n\"Find all my marathon races from this year\"\n\"Show me all 10km runs from the last 90 days\"\n```\n\n### Athlete Profile \u0026 Stats\n\n```\n\"Show my athlete profile with year-to-date stats and training zones\"\n```\n\n_Note: The athlete profile resource (`strava://athlete/profile`) automatically provides ongoing context._\n\n### Segments\n\n```\n\"Show me the Box Hill segment with my effort history\"\n\"Find running segments near Hyde Park\"\n\"Show the leaderboard for my favorite climb segment\"\n```\n\n### Routes\n\n```\n\"List my routes\"\n\"Export my Richmond Park route to GPX\"\n```\n\n### Training Analysis\n\n```\n\"Analyze my training over the past 30 days\"\n\"Analyze my marathon race performance this year\"\n\"Compare my last three 10K runs\"\n\"Find runs similar to my last tempo workout\"\n\"Show me all my 5k races from the last year\"\n```\n\n_Note: List-returning tools use cursor-based pagination with default limits (10 items for activities/segments/routes, 50 for leaderboards)._\n\n## Available Tools\n\n### Activities (2 tools)\n\n| Tool                  | Description                                                                                                               |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| `query-activities`    | Unified query for activities with filtering (distance, title, race status) and optional enrichment (laps, zones, streams) |\n| `get-activity-social` | Get comments and kudos for an activity                                                                                    |\n\n### Athlete (1 tool)\n\n| Tool                  | Description                                                                             |\n| --------------------- | --------------------------------------------------------------------------------------- |\n| `get-athlete-profile` | Get athlete profile with optional statistics (recent, YTD, all-time) and training zones |\n\n### Segments (3 tools)\n\n| Tool                      | Description                                                             |\n| ------------------------- | ----------------------------------------------------------------------- |\n| `query-segments`          | Unified segment query (by ID, starred, or explore by geographic bounds) |\n| `star-segment`            | Star or unstar a segment                                                |\n| `get-segment-leaderboard` | Get segment leaderboard with filtering options                          |\n\n### Routes (2 tools)\n\n| Tool           | Description                                               |\n| -------------- | --------------------------------------------------------- |\n| `query-routes` | Get route details (single route by ID or list all routes) |\n| `export-route` | Export a route to GPX or TCX format                       |\n\n### Analysis (3 tools)\n\n| Tool                      | Description                                                                                              |\n| ------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `analyze-training`        | Analyze training over a time period with filtering (distance, title, race status) and aggregated metrics |\n| `compare-activities`      | Compare 2-5 activities side-by-side                                                                      |\n| `find-similar-activities` | Find activities similar to a reference activity with pre-filtering options for progress tracking         |\n\n## MCP Resources\n\nResources provide ongoing context to the LLM without requiring explicit tool calls:\n\n| Resource                   | Description                                                 |\n| -------------------------- | ----------------------------------------------------------- |\n| `strava://athlete/profile` | Complete athlete profile with recent stats, zones, and gear |\n\n## MCP Prompts\n\nPrompt templates for common queries (accessible via prompt suggestion in Claude):\n\n| Prompt                      | Description                                             |\n| --------------------------- | ------------------------------------------------------- |\n| `analyze-recent-training`   | Comprehensive training analysis over a specified period |\n| `race-performance-analysis` | Analyze race performance for a specific distance        |\n| `segment-performance`       | Detailed segment performance analysis                   |\n| `activity-deep-dive`        | Deep dive into a specific activity with all metrics     |\n| `compare-recent-runs`       | Compare recent runs to identify trends and improvements |\n| `training-summary`          | Comprehensive training overview with recommendations    |\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## Disclaimer\n\nThis project is not affiliated with, endorsed by, or sponsored by Strava, Inc. All product names, logos, and brands are property of their respective owners.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fstrava-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddmann%2Fstrava-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fstrava-mcp/lists"}