Personal MCP server for Strava with OAuth authentication, beautiful dashboard, and personal MCP URLs for AI assistants
Overview
for Strava — works with Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Poke, and any MCP-compatible AI agent. A complete that gives any AI assistant secure, read-only access to your personal Strava fitness data. Deploy once to Cloudflare Workers, authenticate with Strava, and paste your personal MCP URL into whichever AI tools you use. Compatible with Strava. SportMCP is not affiliated with, endorsed, or sponsored by Strava. - 🤖 — Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Poke, and more - 🔐 — Standard Strava OAuth 2.
README
🏃 SportMCP — Strava for Any AI Agent
Production-ready MCP server for Strava — works with Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Poke, and any MCP-compatible AI agent.
A complete Model Context Protocol server that gives any AI assistant secure, read-only access to your personal Strava fitness data. Deploy once to Cloudflare Workers, authenticate with Strava, and paste your personal MCP URL into whichever AI tools you use.
Compatible with Strava. SportMCP is not affiliated with, endorsed, or sponsored by Strava.
✨ Features
- 🤖 Works with any MCP client — Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Poke, and more
- 🔐 Secure OAuth — Standard Strava OAuth 2.0, per-user token isolation
- 🏃 21 MCP Tools — Activities, laps, kudos, comments, segments, segment efforts, routes, gear, clubs, athlete zones, and more
- 🔔 Optional Webhooks — Real-time Poke notifications when workouts complete (per-user keys)
- 🔄 Auto Token Refresh — Tokens renew automatically before expiry
- 🎨 Dashboard — Web UI with one-click config snippets for every major AI agent
- ⚡ Edge Performance — Cloudflare Workers global network, <50ms response times
- 💰 Free Tier — 100k requests/day at zero cost
- 🛡️ Compliance — Full Strava API agreement compliance, deauth cleanup within 48h
🚀 Quick Start
Note: Deploying to Cloudflare requires some terminal commands, but we’ve made it as simple as possible!
🔔 Real-time Webhooks (Optional)
⚠️ Personal Use Only: Webhooks currently send notifications to a single Poke API key. Only enable if you’re the sole user of this deployment. Multi-user webhook support coming soon.
Get instant push notifications via Poke when you finish workouts!
Quick Webhook Setup
# 1. Set Poke API key (get from https://poke.com/settings/advanced)
wrangler secret put POKE_API_KEY
# 2. Set webhook verification token
wrangler secret put STRAVA_WEBHOOK_VERIFY_TOKEN
# Enter: STRAVA_MCP_WEBHOOK
# 3. Test endpoint
node scripts/manage-webhook.js test
# 4. Create subscription
STRAVA_CLIENT_ID=xxx STRAVA_CLIENT_SECRET=xxx \
node scripts/manage-webhook.js create
# 5. Monitor events
wrangler tail
See WEBHOOK_SETUP.md for complete instructions
📚 Available MCP Tools (21 Total)
Ask your AI assistant natural language questions, and these tools will be called automatically:
Activities
| Tool | Example Query |
|---|---|
get-recent-activities |
“Show me my last 5 workouts” |
get-activity-details |
“Get details for my last ride” |
get-activity-streams |
“Show me heart rate data from my last run” |
get-activity-laps |
“What were my lap splits?” |
get-activity-kudos |
“Who gave me kudos on my run?” |
get-activity-comments |
“What comments did I get?” |
Athlete
| Tool | Example Query |
|---|---|
get-athlete-profile |
“What’s my Strava profile info?” |
get-athlete-stats |
“What are my cycling stats this year?” |
get-athlete-zones |
“What are my heart rate training zones?” |
get-athlete-clubs |
“What Strava clubs am I in?” |
get-athlete-routes |
“List my saved routes” |
Segments
| Tool | Example Query |
|---|---|
get-starred-segments |
“What segments have I starred?” |
explore-segments |
“Find climbing segments near San Francisco” |
get-segment |
“Tell me about segment 1234” |
get-segment-efforts |
“What are my best efforts on this segment?” |
get-segment-effort |
“Get details for segment effort 5678” |
Gear & Social
| Tool | Example Query |
|---|---|
get-gear |
“How many miles are on my running shoes?” |
get-club |
“Tell me about my cycling club” |
get-route |
“Get details for my weekend route” |
authenticate-strava |
“How do I connect my Strava account?” |
welcome-strava-mcp |
“How do I get started?” |
🌐 Endpoints
| Endpoint | Purpose |
|---|---|
/ |
Landing page & documentation |
/auth |
Start OAuth flow |
/dashboard?token=xxx |
Personal dashboard with stats |
/mcp |
MCP server endpoint (for AI assistants) |
/webhook |
Strava webhook receiver (optional) |
/test-poke |
Test Poke integration |
🎯 Usage Examples
With Poke
- Add MCP server in Poke settings
- Use URL:
https://your-worker-url.workers.dev/mcp - Ask: “What was my pace on yesterday’s run?”
With Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"strava": {
"url": "https://your-worker-url.workers.dev/mcp"
}
}
}
Natural Language Queries
- “Show me my recent Strava activities”
- “What was my heart rate during my last run?”
- “Get power data from yesterday’s bike ride”
- “Find challenging segments near Boulder”
- “What are my all-time cycling stats?”
🔒 Security Features
- Device Fingerprinting - Automatic authentication by browser
- Token Refresh - Seamless renewal before expiration
- Per-user Isolation - Complete data separation
- Secure Storage - KV encryption for tokens
- CSRF Protection - State validation in OAuth flow
- Rate Limiting - Respects Strava API quotas
🏗️ Architecture
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ AI Assistant │───▶│ Cloudflare Worker │───▶│ Strava API │
│ (Poke/Claude) │ │ │ │ │
│ │ │ • MCP Server │ │ • Activities │
│ Natural Language│ │ • OAuth Handler │ │ • Segments │
│ Queries │ │ • Device Auth │ │ • Routes │
│ │ │ • Token Manager │ │ • Stats │
│ │ │ • Webhook Handler │ │ │
└─────────────────┘ └──────────────────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────┐
│ Cloudflare KV │ │ Poke API │
│ • Sessions │ │ • Push Notify │
│ • OAuth Tokens │ │ • iMessage/SMS │
│ • Activity Data │ └─────────────────┘
└──────────────────┘
📖 Documentation
- README_DEPLOY.md - Step-by-step deployment (5 minutes)
- WEBHOOK_SETUP.md - Complete webhook guide
- WEBHOOK_QUICKSTART.md - Quick webhook reference
- WARP.md - Development & architecture details
- PUBLISHING_CHECKLIST.md - Template publishing guide
🛠️ Tech Stack
- Runtime: Cloudflare Workers (V8 isolates)
- Framework: Hono (lightweight web framework)
- Storage: Cloudflare KV (sessions & tokens)
- Protocol: Model Context Protocol (MCP)
- Auth: Strava OAuth 2.0
- Notifications: Poke API (optional)
💰 Pricing
100% Free! Runs on Cloudflare’s generous free tier:
- Workers: 100,000 requests/day
- KV Storage: 100,000 reads/day, 1,000 writes/day
- Bandwidth: Unlimited on free tier
Perfect for personal use. No credit card required.
🔧 Development
Local Testing
# Install dependencies
npm install
# Start local server
wrangler dev
# Visit http://localhost:8787
Run Tests
npm test
Environment Variables
See .env.example for all configuration options.
🐛 Troubleshooting
🗺️ Roadmap
Coming Soon
- [ ] Multi-user Webhook Support - Per-user notification keys and routing
- [ ] More Notification Channels - Discord, Slack, email, etc.
- [ ] Activity Analytics - Trends, insights, and training load tracking
- [ ] Custom Webhook Filters - Choose which activities trigger notifications
Interested in contributing to any of these? Open a discussion!
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
MIT License - see LICENSE file for details.
🙏 Credits
- Built with Hono
- Powered by Cloudflare Workers
- MCP by Anthropic
- Notifications via Poke
- Inspired by the Strava community 🏃♀️🚴♂️
⭐ Star History
If this project helped you, consider giving it a star!
Made with ❤️ for athletes who love data
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →Configuration
{
"mcpServers": {
"sportmcp": {
"url": "https://your-worker.workers.dev/mcp?token=YOUR_TOKEN"
}
}
}