
kw510/strava-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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...
概要
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: - 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. - A Strava account - A Cloudflare account - Node.js and npm installed - Wrangler CLI installed (npm install -g wrangler) 2. Set up your Strava API credentials (see Setting Up Strava API Credentials) 3. Set up your Cloudflare KV namespace: Update the wrangler.toml file with the generated KV ID. 1. Go to Strava's API Settings and create a new application 2.
README
以下は原文 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:
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.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..workers.dev - Authorization Callback URL:
https://mcp-strava-oauth..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:
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:
npx @modelcontextprotocol/inspector@latest -
Connect to your server:
- For production:
https://mcp-strava-oauth..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:
{ "mcpServers": {
インストール
npx mcp-remote https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse設定
{
"mcpServers": {
"strava": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-strava-oauth.<your-subdomain>.workers.dev/sse"
]
}
}
}