⚙️ Configuration
Config File Location
Credentials are stored in a platform-specific config file that is automatically found by both uvx and Docker:
| Platform |
Path |
| macOS / Linux |
~/.config/strava-mcp-server/config.env |
| Windows |
%APPDATA%\strava-mcp-server\config.env |
The auth command creates and manages this file automatically.
Developer override: A local .env file in the current working directory always takes precedence over the global config. This is useful for testing with different Strava accounts.
Environment Variables
| Variable |
Required |
Description |
STRAVA_CLIENT_ID |
✅ |
Your Strava API application Client ID |
STRAVA_CLIENT_SECRET |
✅ |
Your Strava API application Client Secret |
STRAVA_REFRESH_TOKEN |
✅ |
OAuth Refresh Token (generated by auth) |
MCP_TRANSPORT |
❌ |
stdio (default) or http |
HOST |
❌ |
Bind host for HTTP mode (default: 0.0.0.0) |
PORT |
❌ |
Bind port for HTTP mode (default: 8000) |
Example config.env
Getting Your Strava API Credentials
- Go to https://www.strava.com/settings/api
- Create a new application (any name and category)
- Set Authorization Callback Domain to
localhost
- Copy your Client ID and Client Secret
- Run
uvx --from strava-mcp-server-hnrx auth — the wizard handles the rest
Token Refresh
The server uses the refresh token to automatically obtain new access tokens. The refresh token itself is long-lived (it doesn't expire unless you revoke access). If you ever get a 401 Unauthorized error, simply run auth again to re-authenticate.
Back to Home