strava-mcp-server
Strava MCP Server
Documentation
Strava MCP Server
A Model Context Protocol (MCP) server that provides access to the Strava API. This server enables language models to interact with Strava data, including activities, athlete information, and more.
Features
- πββοΈ Activity tracking and analysis
- π Athlete statistics
- πΊοΈ Route visualization
- π Achievement tracking
- π€ Social features (kudos, comments)
Prerequisites
- Python 3.12+
- Strava API credentials
- pip (Python package installer)
Installation
1. Clone the repository:
git clone https://github.com/yourusername/strava_mcp.git
cd strava_mcp2. Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate3. Install dependencies:
pip install -r requirements.txtConfiguration
1. Create a `config/.env` file with your Strava API credentials:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REFRESH_TOKEN=your_refresh_token2. To obtain Strava API credentials:
Usage
Using with Claude
Once connected, you can interact with your Strava data through Claude in various ways:
Activity Queries
- "Show me my recent activities"
- "Get details about my last run"
- "What was my longest ride this month?"
- "Show me activities where I set personal records"
- "Display the route map for my latest activity"
Performance Analysis
- "What's my average running pace this year?"
- "Compare my cycling performance between last month and this month"
- "Show me my heart rate zones from yesterday's workout"
- "What's my total elevation gain for all activities?"
- "Calculate my weekly mileage for running"
Social Interactions
- "Who gave kudos on my latest activity?"
- "Show me comments on my marathon run"
- "List all my club activities"
- "Find activities I did with friends"
Achievement Tracking
- "List all my segment achievements"
- "Show my personal records on local segments"
- "What achievements did I earn this week?"
- "Display my progress on yearly goals"
Data Available Through Claude
1. Activity Details:
2. Athlete Statistics:
3. Social Data:
4. Route Information:
As an MCP Server
Update your Claude Desktop configuration:
{
"mcpServers": {
"Strava": {
"command": "python",
"args": ["src/strava_server.py"],
"cwd": "/path/to/strava_mcp",
"env": {
"STRAVA_CLIENT_ID": "your_client_id",
"STRAVA_CLIENT_SECRET": "your_client_secret",
"STRAVA_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}As an HTTP Server
1. Start the server:
./run_server.sh2. Access the API at `http://localhost:8000`
Available endpoints:
- GET `/activities/recent` - List recent activities
- GET `/activities/{id}` - Get activity details
- GET `/activities/{id}/map` - Get activity map visualization
- GET `/athlete/stats` - Get athlete statistics
Development
Project Structure
strava_mcp/
βββ src/
β βββ strava_server.py # MCP server implementation
β βββ strava_http_server.py # HTTP API server
β βββ map_utils.py # Map visualization utilities
β βββ templates.py # HTML templates
βββ config/
β βββ .env # Environment variables (not in git)
βββ requirements.txt # Python dependencies
βββ run_server.sh # Server startup scriptContributing
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request
Security
- Never commit `.env` files or API credentials
- The `.gitignore` file is configured to prevent sensitive data from being committed
- Use environment variables for all sensitive configuration
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Strava API Documentation
- Model Context Protocol (MCP) Specification
- Contributors and maintainers
Frequently asked questions
What is strava-mcp-server?
strava-mcp-server is Strava MCP Server
How do I install strava-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is strava-mcp-server open source?
Yes β it is hosted on GitHub at https://github.com/ctvidic/strava-mcp-server and has 6 stars.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Automate browser based workflows with AI
Hindsight: Agent Memory That Learns
A privacy-first app that strips AI watermarks from content you own.
Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.
The power of Claude Code / GeminiCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP