Strava MCP Server
Integrate Strava OAuth with a cloud-based Model Context Protocol server.
Key Features
Use Cases
README
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
-
Clone the repository:
bashgit 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:
bashwrangler kv:namespace create "OAUTH_KV"Update the
wrangler.tomlfile with the generated KV ID. -
Deploy to Cloudflare:
bashwrangler 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.dev - Authorization Callback URL:
https://mcp-strava-oauth.<your-subdomain>.workers.dev/callback
-
Set your production environment variables:
bashwrangler 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:
localhost - Authorization Callback URL:
http://localhost:8788/callback
- Authorization Callback Domain:
-
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:
bashnpx @modelcontextprotocol/inspector@latest -
Connect to your server:
- For production:
https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse - For development:
http://localhost:8788/sse
- For production:
Using Claude Desktop
- Open Claude Desktop and go to Settings -> Developer -> Edit Config
- Add your MCP server configuration:
json
{ "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:
bashwrangler dev -
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
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
mcp-cli
A command-line inspector and client for the Model Context Protocol
mcp-cli is a command-line interface tool designed to interact with Model Context Protocol (MCP) servers. It allows users to run and connect to MCP servers from various sources, inspect available tools, resources, and prompts, and execute commands non-interactively or interactively. The tool supports OAuth for various server types, making integration and automation seamless for developers working with MCP-compliant servers.
- ⭐ 391
- MCP
- wong2/mcp-cli
MyMCP Server (All-in-One Model Context Protocol)
Powerful and extensible Model Context Protocol server with developer and productivity integrations.
MyMCP Server is a robust Model Context Protocol (MCP) server implementation that integrates with services like GitLab, Jira, Confluence, YouTube, Google Workspace, and more. It provides AI-powered search, contextual tool execution, and workflow automation for development and productivity tasks. The system supports extensive configuration and enables selective activation of grouped toolsets for various environments. Installation and deployment are streamlined, with both automated and manual setup options available.
- ⭐ 93
- MCP
- nguyenvanduocit/all-in-one-model-context-protocol
MCP Obsidian Server
Integrate Obsidian note management with AI models via the Model Context Protocol.
MCP Obsidian Server acts as a bridge between Obsidian and AI models by providing an MCP-compatible server interface. It enables programmatic access to Obsidian vaults through a local REST API, allowing operations like listing files, searching, reading, editing, and deleting notes. Designed to work with Claude Desktop and other MCP-enabled clients, it exposes a set of tools for efficient note and content management within Obsidian.
- ⭐ 2,394
- MCP
- MarkusPfundstein/mcp-obsidian
Shopify Storefront MCP Server
Seamless Shopify Storefront API access for AI assistants via Model Context Protocol
Enables AI assistants to interact with Shopify store data through standardized MCP tools. Offers endpoints for product discovery, inventory management, GraphQL queries, cart operations, and comprehensive customer data manipulation. Designed for easy integration with MCP-compatible AI and automated token handling. Simplifies secure connection to Shopify's Storefront API with minimal configuration.
- ⭐ 5
- MCP
- QuentinCody/shopify-storefront-mcp-server
Oura MCP Server
Enables language models to access Oura sleep, readiness, and resilience data via MCP.
Oura MCP Server implements the Model Context Protocol to provide language models with access to Oura API data. It allows querying of sleep, readiness, and resilience metrics for specified date ranges or for the current day. The server supports integration with tools like Claude for Desktop and handles API authentication and error scenarios gracefully. Designed for seamless access to personal health metrics through standardized protocol endpoints.
- ⭐ 34
- MCP
- tomekkorbak/oura-mcp-server
FastMCP
TypeScript framework for building robust MCP servers with minimal setup.
FastMCP is a TypeScript framework designed for building servers that adhere to the Model Context Protocol (MCP), enabling efficient management of client sessions and context. It streamlines the creation of MCP servers by providing intuitive APIs, built-in authentication, session and request tracking, and support for handling various content types such as images and audio. The framework also enforces best practices around error handling, logging, and streaming outputs. Developers benefit from reduced boilerplate and a focus on core MCP functionality.
- ⭐ 2,738
- MCP
- punkpeye/fastmcp
Didn't find tool you were looking for?