strava-mcp
Provides OAuth-based integration with Strava, enabling authentication and access to Strava's API for managing athlete data and activities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@strava-mcpshow my last 5 activities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Model Context Protocol (MCP) Server + Strava OAuth
This is a Model Context Protocol (MCP) server that supports remote MCP connections, with Strava OAuth built-in. It allows users to connect to your MCP server by signing in with their Strava account.
Overview
The MCP server (powered by Cloudflare Workers) serves two roles:
Acts as an OAuth Server for your MCP clients
Acts as an OAuth Client for Strava's OAuth services
This project serves as a reference example for integrating OAuth providers with an MCP server deployed to Cloudflare, using the workers-oauth-provider library.
Related MCP server: strava-mcp
Prerequisites
A Strava account
A Cloudflare account
Node.js and npm installed
Wrangler CLI installed (
npm install -g wrangler)
Quick Start
Clone the repository:
git clone https://github.com/kw510/strava-mcp.git cd strava-mcp npm installSet up your Strava API credentials (see Setting Up Strava API Credentials)
Set up your Cloudflare KV namespace:
wrangler kv:namespace create "OAUTH_KV"Update the
wrangler.tomlfile with the generated KV ID.Deploy to Cloudflare:
wrangler deploy
Setting Up Strava API Credentials
For Production
Go to Strava's API Settings and create a new application
Configure your application:
Application Name: Choose a name for your application
Category: Select an appropriate category
Website: Your website URL
Application Description: Brief description of your application
Authorization Callback Domain:
mcp-strava-oauth.<your-subdomain>.workers.devAuthorization Callback URL:
https://mcp-strava-oauth.<your-subdomain>.workers.dev/callback
Set your production environment variables:
wrangler secret put STRAVA_CLIENT_ID wrangler secret put STRAVA_CLIENT_SECRET
For Development
Create a separate Strava API application for development
Configure your development application:
Authorization Callback Domain:
localhostAuthorization Callback URL:
http://localhost:8788/callback
Create a
.dev.varsfile in your project root:STRAVA_CLIENT_ID=your_development_strava_client_id STRAVA_CLIENT_SECRET=your_development_strava_client_secret
Testing Your MCP Server
Using Inspector
Install the Inspector tool:
npx @modelcontextprotocol/inspector@latestConnect to your server:
For production:
https://mcp-strava-oauth.<your-subdomain>.workers.dev/sseFor development:
http://localhost:8788/sse
Using Claude Desktop
Open Claude Desktop and go to Settings -> Developer -> Edit Config
Add your MCP server configuration:
{ "mcpServers": { "strava": { "command": "npx", "args": [ "mcp-remote", "https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse" ] } } }Restart Claude Desktop and complete the OAuth flow
Development
Local Development
Start the development server:
wrangler devThe server will be available at
http://localhost:8788
API Rate Limits
The Strava API has the following rate limits:
200 requests every 15 minutes
2,000 requests per day
How It Works
OAuth Provider
The OAuth Provider library handles:
OAuth 2.1 server implementation
Token issuance and validation
Secure token storage in KV
Strava OAuth integration
Durable MCP
Provides:
Persistent state management
Secure authentication context storage
User information access via
this.propsConditional tool availability
MCP Remote
Enables:
Client-server communication
Tool definition and management
Request/response serialization
SSE connection maintenance
Troubleshooting
If you see error messages in Claude Desktop, verify the connection by hovering over the 🔨 icon
For Cursor integration, use the "Command" type and combine command and args into one string
Ensure your callback URLs match exactly with what's configured in your Strava application
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
- StytchOAuthdev.stytch.mcp
The Stytch MCP server is a reference implementation that demonstrates remote MCP server authentication and authorization using Stytch Connected Apps. It provides OAuth 2.1-compliant authorization (including PKCE), Dynamic Client Registration, and validates Stytch-issued access tokens to enable AI agents to securely interact with external services through permissioned access, supporting scopes like openid, email, profile, and manage:project_data.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables interaction with the Strava API v3 to manage fitness activities, athlete profiles, segments, and routes. It supports retrieving detailed performance metrics, exploring geographic data, and managing club information through natural language.43 npmISC
- AlicenseNot gradedqualityCmaintenanceMCP server for Strava integration, enabling LLMs to query activities, athlete stats, segments, routes, and perform training analysis.9MIT
- FlicenseNot gradedqualityDmaintenanceMCP server to fetch Strava activities using OAuth authentication with automatic token refresh. Allows retrieving recent activities, activities by date range, activity details, and athlete stats.-
- AlicenseNot gradedqualityCmaintenanceAn open-source, Strava-first remote MCP server that enables users to authorize with Strava and ask AI about their training data.MIT