A Model Context Protocol (MCP) server with Strava OAuth integration, built on Cloudflare Workers. Enables secure authentication and tool access for MCP clients like Claude and Cursor through Strava login. Perfect for developers looking to integrate Strava authentication with AI tools.
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.
The MCP server (powered by Cloudflare Workers) serves two roles:
This project serves as a reference example for integrating OAuth providers with an MCP server deployed to Cloudflare, using the workers-oauth-provider
library.
npm install -g wrangler
)Clone the repository:
git clone https://github.com/kw510/strava-mcp.git
cd strava-mcp
npm install
Set 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.toml
file with the generated KV ID.
Deploy to Cloudflare:
wrangler deploy
Go to Strava's API Settings and create a new application
Configure your application:
mcp-strava-oauth.<your-subdomain>.workers.dev
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
Create a separate Strava API application for development
Configure your development application:
localhost
http://localhost:8788/callback
Create a .dev.vars
file in your project root:
STRAVA_CLIENT_ID=your_development_strava_client_id
STRAVA_CLIENT_SECRET=your_development_strava_client_secret
Install the Inspector tool:
npx @modelcontextprotocol/inspector@latest
Connect to your server:
https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse
http://localhost:8788/sse
{
"mcpServers": {
"strava": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse"
]
}
}
}
Start the development server:
wrangler dev
The server will be available at http://localhost:8788
The Strava API has the following rate limits:
The OAuth Provider library handles:
Provides:
this.props
Enables: