# Quick Start Guide
Get up and running with the Strava MCP Server in minutes.
## Prerequisites
Before starting, make sure you have:
- ✅ Python 3.12 or higher
- ✅ A Strava account
- ✅ Strava API credentials (Client ID and Client Secret)
## Step 1: Get Strava API Credentials
1. Go to [Strava API Settings](https://www.strava.com/settings/api)
2. Click "Create App" or use an existing application
3. Set the **Authorization Callback Domain** to `localhost`
4. Copy your **Client ID** and **Client Secret**
## Step 2: Install and Start the Server
```bash
# Install dependencies
uv sync
# Start the server
uv run src/server.py --transport sse --port 9186
```
The server will automatically detect if you need authentication and guide you through the process.
## Step 3: Authenticate (Choose One Method)
### Method 1: One-Step Authentication (Recommended)
Use this single command to complete everything:
**Prompt:**
```
Get my Strava auth token with client_id=YOUR_CLIENT_ID, client_secret=YOUR_CLIENT_SECRET, auth_code=YOUR_CODE
```
**Steps:**
1. Get the authorization URL using: `get_auth_url()`
2. Visit the URL in your browser and authorize
3. Copy the `code` parameter from the redirect URL
4. Use `get_strava_auth_token()` with all three values
### Method 2: Step-by-Step
1. **Save credentials:**
```
Save my Strava credentials: client_id=YOUR_CLIENT_ID, client_secret=YOUR_CLIENT_SECRET
```
2. **Get authorization URL:**
```
Get the Strava authorization URL
```
3. **Visit URL and authorize:**
- Copy the URL from step 2
- Visit it in your browser
- Authorize the application
- Copy the `code` parameter from the redirect URL
4. **Complete authentication:**
```
Complete Strava authentication with code: YOUR_CODE
```
5. **Restart the server** to load new credentials
## Step 4: Verify Authentication
Check if everything is set up correctly:
**Prompt:**
```
Check my Strava authentication status
```
You should see:
- `is_configured: true`
- `has_refresh_token: true`
## Step 5: Start Querying
Now you can ask questions like:
- "What are my recent activities?"
- "Show me my activities from last week"
- "Analyze my weekly training"
- "What's my pace trend over the last month?"
## Quick Reference Commands
| Action | Prompt |
|--------|--------|
| Check status | `Check my Strava authentication status` |
| Save credentials | `Save my Strava credentials: client_id=X, client_secret=Y` |
| Get auth URL | `Get the Strava authorization URL` |
| Complete auth | `Complete Strava authentication with code: CODE` |
| One-step auth | `Get my Strava auth token with client_id=X, client_secret=Y, auth_code=CODE` |
## Troubleshooting
**"Client ID not found"**
- Make sure you've saved credentials using `save_credentials()` or set environment variables
**"Invalid authorization code"**
- Authorization codes expire quickly (usually within 10 minutes)
- Make sure you're using a fresh code from the redirect URL
- Try the authorization flow again
**"Error exchanging code for token"**
- Double-check your Client ID and Client Secret
- Verify the authorization code is correct
- Make sure redirect URI matches Strava settings (`http://localhost`)
## Next Steps
- Read [AUTHENTICATION.md](AUTHENTICATION.md) for detailed authentication guide
- See [STEP_BY_STEP_AUTH.md](STEP_BY_STEP_AUTH.md) for comprehensive step-by-step instructions
- Check the main [README.md](README.md) for all available tools and features