Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

An MCP server for Strava, an app for tracking physical exercise

README.md

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.

Prerequisites

  • A Strava account
  • A Cloudflare account
  • Node.js and npm installed
  • Wrangler CLI installed (npm install -g wrangler)

Quick Start

  1. Clone the repository:
   git clone https://github.com/kw510/strava-mcp.git
   cd strava-mcp
   npm install
  1. Set up your Strava API credentials (see Setting Up Strava API Credentials)
  1. Set up your Cloudflare KV namespace:
   wrangler kv:namespace create "OAUTH_KV"

Update the wrangler.toml file with the generated KV ID.

  1. Deploy to Cloudflare:
   wrangler deploy

Setting Up Strava API Credentials

For Production

  1. Go to Strava's API Settings and create a new application
  2. 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.dev
  • Authorization Callback URL: https://mcp-strava-oauth.<your-subdomain>.workers.dev/callback
  1. Set your production environment variables:
   wrangler secret put STRAVA_CLIENT_ID
   wrangler secret put STRAVA_CLIENT_SECRET

For Development

  1. Create a separate Strava API application for development
  2. Configure your development application:
  • Authorization Callback Domain: localhost
  • Authorization Callback URL: http://localhost:8788/callback
  1. 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

Testing Your MCP Server

Using Inspector

  1. Install the Inspector tool:
   npx @modelcontextprotocol/inspector@latest
  1. Connect to your server:
  • For production: https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse
  • For development: http://localhost:8788/sse

Using Claude Desktop

  1. Open Claude Desktop and go to Settings -> Developer -> Edit Config
  2. Add your MCP server configuration:
   {
     "mcpServers": {
       "strava": {
         "command": "npx",
         "args": [
           "mcp-remote",
           "https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse"
         ]
       }
     }
   }
  1. Restart Claude Desktop and complete the OAuth flow

Development

Local Development

  1. Start the development server:
   wrangler dev
  1. The 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.props
  • Conditional 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

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Other servers.