Skip to main content
Glama

Strava MCP Server ⚔

Python 3.8+ MCP Strava API

A comprehensive Model Context Protocol (MCP) server that provides full access to the Strava API v3. Perfect for integrating Strava data with Claude Desktop and other MCP-compatible clients.

✨ Features

šŸƒā€ā™‚ļø Activities

  • Create and update manual activities

  • Retrieve detailed activity information

  • Access comments, kudos, laps, and power zones

  • Search and filter activities with advanced parameters

  • Upload GPX/TCX files

šŸ‘¤ Athletes

  • Get authenticated athlete profile and stats

  • Access training zones and settings

  • Update athlete profile information

  • Retrieve athlete's club memberships

šŸ† Clubs

  • Browse club details and activities

  • Access member lists and administrators

  • Get club-specific activity feeds

šŸŽÆ Segments & Routes

  • Explore segments in specific areas

  • Access starred segments and leaderboards

  • Get segment efforts and achievements

  • Retrieve route details and export formats

šŸ”§ Additional Features

  • 40+ API endpoints with full Strava API v3 coverage

  • OAuth 2.0 authentication with automatic token management

  • Thread-safe operations for reliable concurrent access

  • Comprehensive error handling with detailed logging

  • MCP-compliant tools and resources classification

Related MCP server: Strava MCP Server

šŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher

  • Strava Developer Account

  • Claude Desktop or other MCP client

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/strava-mcp.git
    cd strava-mcp
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up Strava API credentials

    • Go to Strava Developers

    • Create a new application

    • Set Authorization Callback Domain to: localhost

    • Set Authorization Callback URL to: http://localhost:8080

    • Note your Client ID and Client Secret

  5. Complete setup (Recommended - All users)

    python setup_complete.py

    This single script will:

    • Guide you through OAuth setup

    • Save tokens to .env file

    • Automatically update your Claude Desktop config

    Alternative setups for specific use cases:

    # For server deployments (no Claude Desktop):
    python -m mcp_server.oauth_setup
    
    # For token refresh only (when tokens expire):
    python update_claude_config.py
  6. Configure Claude Desktop (if not auto-updated) Add to your claude_desktop_config.json:

    {
      "mcpServers": {
        "strava-mcp": {
          "command": "path/to/your/strava-mcp/start_mcp_server.bat",
          "cwd": "path/to/your/strava-mcp"
        }
      }
    }

šŸ”§ Usage

Manual Token Refresh

When your tokens expire, refresh them:

# Refresh tokens and update Claude Desktop config
python update_claude_config.py

# Or just refresh tokens in .env file
python refresh_tokens.py

Available Tools & Resources

šŸ› ļø Tools (Write Operations)

  • create_strava_activity - Create manual activities

  • update_strava_activity - Update existing activities

  • update_athlete_profile - Update athlete information

  • star_strava_segment - Star/unstar segments

  • upload_activity_file - Upload GPX/TCX files

  • search_activities - Advanced activity search

  • explore_segments_in_area - Find segments by location

  • get_segment_leaderboard - Get segment rankings

  • get_activity_stream_data - Get activity stream data

šŸ“Š Resources (Read Operations)

  • Activity details, comments, kudos, laps, zones

  • Athlete profile, stats, zones, clubs

  • Club details, activities, members

  • Gear information and usage stats

  • Route details and export formats

  • Segment information and efforts

  • Stream data (GPS, power, heart rate)

šŸ” Authentication

This server uses OAuth 2.0 with manual token refresh:

  • Secure token storage in environment variables

  • Thread-safe token management

  • Automatic Claude Desktop config updates

  • Manual refresh capability for full control

šŸ“ Project Structure

strava-mcp/
ā”œā”€ā”€ mcp_server/
│   ā”œā”€ā”€ __init__.py
│   ā”œā”€ā”€ __main__.py          # MCP server entry point
│   ā”œā”€ā”€ server.py            # FastMCP server with tools/resources
│   ā”œā”€ā”€ api.py              # Complete Strava API v3 wrapper
│   ā”œā”€ā”€ auth.py             # OAuth 2.0 authentication manager
│   └── oauth_setup.py      # Initial OAuth setup utility
ā”œā”€ā”€ requirements.txt         # Python dependencies
ā”œā”€ā”€ refresh_tokens.py       # Manual token refresh utility
ā”œā”€ā”€ update_claude_config.py # Claude Desktop config updater
ā”œā”€ā”€ start_mcp_server.bat   # Server startup script (Windows)
ā”œā”€ā”€ start_mcp_server.sh    # Server startup script (Unix/Linux)
└── README.md              # This file

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/AmazingFeature)

  3. Commit your changes (git commit -m 'Add some AmazingFeature')

  4. Push to the branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ™ Acknowledgments

⭐ Star this repo!

If you find this project useful, please consider giving it a star! It helps others discover this tool.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Strava MCP server for ChatGPT, Claude and any AI agent: list activities, update activity gear, read club leaderboard, comment on activity, log manual activity and request account export in your own Strava account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Strava yourself; Cotlet does not store your password and you need no Strava API key. About the official Strava API: Strava has an official API and, since 1 June 2026, an official MCP connector (checked 27 Oct 2026). The MCP is read-only, works with Claude only and needs a paid Strava subscription. Setup and FAQ: https://cotlet.dev/integrations/strava-api-mcp-server

      https://cotlet.dev/mcp/v1/strava
    • Strava MCP tools for AI: athletes, activities, segments, clubs, routes. Powered by HAPI MCP server.

      https://strava.run.mcp.com.ai/mcp
    • tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).

      https://tri-train.com/api/mcp
    • Pace is a remote MCP server that exposes wearable and fitness data to Claude via the Model Context Protocol. It connects to Garmin, Oura, Whoop, Polar, Fitbit and 20+ devices and provides 15 tools for querying sleep, activity, recovery, and training data. Hosted on Google Cloud Run, OAuth 2.1 authentication, Streamable HTTP transport. Instructions: First you need to create an account at: https://pacetraining.co and connect your wearables. After that you can connect the remote Server via Custom Connector in Claude and OAuth 2.1 Flow startet.

    Related MCP Servers