Strava

This is a Model Context Protocol (MCP) server implemented in TypeScript.

It acts as a bridge between AI assistants and the Strava API, exposing Strava data and functionalities as “tools” that Large Language Models (LLMs) can utilize through the MCP standard.

Features

  • 🏃 Access recent activities, profile, and stats
  • 📊 Fetch detailed activity streams (power, heart rate, cadence, etc.)
  • 🗺️ Explore, view, star, and manage segments
  • ⏱️ View detailed activity and segment effort information
  • 📍 List and view details of saved routes
  • 💾 Export routes in GPX or TCX format to the local filesystem
  • 🤖 AI-friendly JSON responses via MCP
  • 🔧 Uses Strava API V3

Use Cases

  • Personal Fitness Analysis: AI assistants can analyze a user’s recent activities, providing insights on performance trends and suggesting improvements.
  • Training Plan Creation: By accessing detailed activity data, AI can create personalized training plans based on the user’s historical performance and goals.
  • Route Discovery and Planning: AI can help users find new segments to explore or create custom routes based on their preferences and past activities.
  • Performance Tracking: AI can track a user’s progress over time, comparing efforts on specific segments or overall stats across different time periods.

How to Use It

1. Prerequisites:

  • Node.js (v18 or later recommended)
  • npm (usually comes with Node.js)
  • A Strava Account

2. Installation:

   git clone https://github.com/r-huijts/strava-mcp.git
   cd strava-mcp
   npm install
   npm run build

3. Configure Claude Desktop:

   {
     "mcpServers": {
       "strava-mcp-local": {
         "command": "node",
         "args": [
           "/absolute/path/to/your/strava-mcp/dist/server.js"
         ]
       }
     }
   }

4. Strava Authentication Setup:

  • Create a Strava API Application at https://www.strava.com/settings/api
  • Run the setup script: npx tsx scripts/setup-auth.ts
  • Follow the prompts to complete the authentication flow

5. Configure Export Path (Optional): Add ROUTE_EXPORT_PATH to your .env file if you plan to use route export features.

6. Restart Claude Desktop to ensure proper initialization.

7. Use the provided MCP tools in your AI interactions:

  • get-recent-activities
  • get-athlete-profile
  • get-athlete-stats
  • get-activity-details
  • list-athlete-clubs
  • list-starred-segments
  • get-segment
  • explore-segments
  • star-segment
  • get-segment-effort
  • list-segment-efforts
  • list-athlete-routes
  • get-route
  • export-route-gpx
  • export-route-tcx
  • get-activity-streams
  • get-activity-laps
  • get-athlete-zones

FAQs

Q: How often are the access tokens refreshed?
A: The server automatically refreshes the access token when it expires (typically after 6 hours). You only need to run the initial authentication setup once.

Q: Can I use this server with other AI models besides Claude?
A: While designed for Claude, the server follows the MCP standard, so it should be compatible with other AI models that support MCP.

Q: Are there rate limits I should be aware of when using this server?
A: Yes, the Strava API has rate limits. The server doesn’t handle these limits directly, so be mindful of your usage, especially for high-frequency requests.

Q: How can I ensure the security of my Strava data?
A: Always keep your .env file with tokens secure and never share it. Use environment variables for sensitive information and ensure your server is running in a secure environment.

Latest MCP Servers

Notion

Notion's official MCP Server allows you to interact with Notion workspaces through the Notion API.

Log Mcp

An MCP server that provides 7 tools for log analysis, including error fingerprinting, pattern comparison, and ML classification.

Apple

An MCP package that provides AI assistants with direct access to Notes, Messages, Mail, Contacts, Reminders, Calendar, and Maps via AppleScript and EventKit.

View More MCP Servers >>

Featured MCP Servers

Notion

Notion's official MCP Server allows you to interact with Notion workspaces through the Notion API.

Claude Peers

An MCP server that enables Claude Code instances to discover each other and exchange messages instantly via a local broker daemon with SQLite persistence.

Excalidraw

Excalidraw's official MCP server that streams interactive hand-drawn diagrams to Claude, ChatGPT, and VS Code with smooth camera control and fullscreen editing.

More Featured MCP Servers >>

FAQs

Q: What exactly is the Model Context Protocol (MCP)?

A: MCP is an open standard, like a common language, that lets AI applications (clients) and external data sources or tools (servers) talk to each other. It helps AI models get the context (data, instructions, tools) they need from outside systems to give more accurate and relevant responses. Think of it as a universal adapter for AI connections.

Q: How is MCP different from OpenAI's function calling or plugins?

A: While OpenAI's tools allow models to use specific external functions, MCP is a broader, open standard. It covers not just tool use, but also providing structured data (Resources) and instruction templates (Prompts) as context. Being an open standard means it's not tied to one company's models or platform. OpenAI has even started adopting MCP in its Agents SDK.

Q: Can I use MCP with frameworks like LangChain?

A: Yes, MCP is designed to complement frameworks like LangChain or LlamaIndex. Instead of relying solely on custom connectors within these frameworks, you can use MCP as a standardized bridge to connect to various tools and data sources. There's potential for interoperability, like converting MCP tools into LangChain tools.

Q: Why was MCP created? What problem does it solve?

A: It was created because large language models often lack real-time information and connecting them to external data/tools required custom, complex integrations for each pair. MCP solves this by providing a standard way to connect, reducing development time, complexity, and cost, and enabling better interoperability between different AI models and tools.

Q: Is MCP secure? What are the main risks?

A: Security is a major consideration. While MCP includes principles like user consent and control, risks exist. These include potential server compromises leading to token theft, indirect prompt injection attacks, excessive permissions, context data leakage, session hijacking, and vulnerabilities in server implementations. Implementing robust security measures like OAuth 2.1, TLS, strict permissions, and monitoring is crucial.

Q: Who is behind MCP?

A: MCP was initially developed and open-sourced by Anthropic. However, it's an open standard with active contributions from the community, including companies like Microsoft and VMware Tanzu who maintain official SDKs.

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!