iamnotreddy/strava-mcp-server
If you are the rightful owner of strava-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A project that integrates with Strava's API to provide natural language insights about your activities using Model Context Protocol (MCP).
Strava MCP Server
A project that integrates with Strava's API to provide natural language insights about your activities. I wanted to better understand the MCP (Model Context Protocol) hype by building something tangible and I've always wanted to better understand my running performance / trends in nuanced ways.
Generally I've been pretty impressed. There's nothing revolutionary about writing logic that finds your fastest activities, your longest activities, what days you typically run etc. The magic is in how MCP lets you provide AI with composable building blocks, and then watch it intelligently combine them to answer complex questions in natural language. Instead of having to dig through data visualizations or remember specific API endpoints, you can just ask "How has my training consistency changed since my injury break?" and the AI interprets your intent, orchestrates the right combination of data functions, and translates the results back into insights that actually make sense.
That said, it's not a silver bullet — you need to be intentional about designing your building blocks and their boundaries to prevent issues like API rate limits or the AI attempting to process unwieldy amounts of data. But even with those considerations, there's definitely something compelling here.
Needs some work to productionize but here's a local demo of the MCP server integrated with a geospatial interface I cobbled together. The query takes a bit to process so skip to ~1:10 to see the AI-generated insight.
https://www.loom.com/share/4d0d713a39ef4949b01710e789c088d0?sid=a2c18ea7-944c-48e8-ae05-727311624d30
Project Structure
This is a monorepo containing:
mcp-server
: The core MCP server implementation + a terminal-based MCP clientapi-gateway
: Express service for handling API requests (not yet implemented)shared-types
: Shared TypeScript types between packages
MCP Capabilities
The MCP server provides natural language analysis of your Strava activities through several key features:
Activity Analysis
- Find your fastest and longest activities
- Analyze running patterns by time of day and day of week
- Track monthly load progression and training consistency
- Identify activity gaps and their impact on performance
- Analyze double-day training patterns
Performance Insights
- Calculate pace and distance trends
- Compare weekday vs weekend running patterns
- Analyze training consistency and progression
- Track performance changes after breaks
- Evaluate double-day training effectiveness
Example Questions You Can Ask
- "What were my fastest 5-mile runs last year?"
- "When do I typically run during the week?"
- "How has my training load changed over the past 6 months?"
- "What's my average pace on weekend runs vs weekday runs?"
- "Have I been consistent with my training this month?"
- "What's the longest gap between my runs in the last year?"
- "How do my double-day runs compare to my regular runs?"
Prerequisites
- Node.js (v18 or higher)
- npm
- Strava API credentials
- Anthropic API key (for natural language processing)
Getting Started
- Clone the repository:
git clone https://github.com/yourusername/strava-mcp-server.git
cd strava-mcp-server
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
Edit .env
with your API keys and configuration.
- Start the MCP server and client:
# In one terminal, start the MCP server
cd packages/mcp-server
npm run dev
# In another terminal, start the MCP client
cd packages/mcp-server
npm run client:dev
The MCP client provides a simple CLI interface to test the server's functionality. The Express backend is not yet implemented.
Environment Variables
See .env.example
for required environment variables and their descriptions.
Development Status
This project is WIP. The core MCP server implementation is complete, while client integration and additional features are being worked on. The Express backend is planned but not yet implemented. The end goal is to connect this to Strava visualization tools I've built