Strava MCP Server
Strava MCP server for AI agents.
Installation
npx strava-mcp-serverAsk AI about Strava MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Strava MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Strava MCP Server
A Model Context Protocol (MCP) server for accessing Strava data. This single-user server provides tools to fetch activities, analyze performance trends, and get athlete statistics with real-time webhook support.
Built by @meimakes
Features
- Get Activities: List recent activities with filters for date range and sport type
- Activity Details: Get detailed information including splits, segments, and map data
- Athlete Stats: View all-time statistics (recent, year-to-date, and all-time totals)
- Search Activities: Find activities matching specific criteria
- Analyze Trends: Analyze performance trends over time for various metrics
- Real-Time Webhooks: Get instant notifications when activities are created, updated, or deleted
Architecture
- Runtime: Node.js/TypeScript
- Framework: MCP SDK (@modelcontextprotocol/sdk v1.12+)
- Transport: StreamableHTTP (SSE) for Railway deployment, stdio for local development
- API Client: node-fetch
- Token Storage: Environment variables (auto-refresh)
- Auth: OAuth 2.0
- Session Management: UUID-based session IDs with
mcp-session-idheader
Setup
Prerequisites
- Node.js >= 20.0.0
- A Strava account
- Strava API application credentials
1. Create Strava Application
- Go to https://www.strava.com/settings/api
- Create a new application:
- Application Name: Your choice (e.g., "Personal MCP Server")
- Category: Fitness App
- Authorization Callback Domain:
localhost(for initial setup)
- Note your Client ID and Client Secret
2. Get OAuth Tokens (Local Setup)
# Install dependencies
npm install
# Set your Strava credentials
export STRAVA_CLIENT_ID=your_client_id
export STRAVA_CLIENT_SECRET=your_client_secret
# Run the OAuth setup script
npm run setup-auth
This will:
- Open a browser window for Strava authorization
- Start a local server to capture the OAuth callback
- Display your tokens to copy to Railway
3. Deploy to Railway
- Create a new project on Railway
- Connect your GitHub repository
- Add the following environment variables in Railway:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_ACCESS_TOKEN=from_setup_script
STRAVA_REFRESH_TOKEN=from_setup_script
STRAVA_EXPIRES_AT=from_setup_script
USE_SSE=true
PORT=3000
WEBHOOK_VERIFY_TOKEN=your_random_secure_string # Optional, only if using webhooks
- Deploy the application
- Once deployed, Railway will provide you with a URL (e.g.,
https://your-app.up.railway.app)
4. Connect to Poke.com
After deploying to Railway, you can connect your Strava MCP server to Poke.com:
-
Go to Poke.com
-
Navigate to Connections β Add Integration β Custom Integration
-
Click "Add Server" or "Add MCP Server"
-
Enter your Railway SSE endpoint URL:
https://your-app.up.railway.app/sseReplace
your-app.up.railway.appwith your actual Railway domain -
Give it a name like "Strava" and save
-
The server should now be connected and available in Poke.com
Note: The server URL must end with /sse - this is the Server-Sent Events endpoint that maintains the connection.
Claude Desktop (stdio mode)
- Complete the Setup steps above to get your OAuth tokens
- Build the project:
npm run build - Edit your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows: `%APPDATA%\Claude
- macOS:
