PB

pete-builds/strava-mcp-vault

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 5 forks 质量 78 趋势 28MIT

Strava MCP server with SQLite caching, automatic token refresh, and rate limit awareness. Built with FastMCP.

概览

An unofficial, custom-built MCP server that lets your AI assistant talk to your Strava data. Connect it to Claude Code (or any MCP-compatible client) and ask questions like "how far did I run this week?" or "show me my ride stats for January." It pulls your activities, stats, and streams from Strava's API and stores everything in a local SQLite vault so you're not hitting the API every time. This is not affiliated with or endorsed by Strava. It's a personal project built to scratch an itch. - Connects your AI to Strava through the Model Context Protocol (MCP) - Caches your activity data locally in SQLite so repeat queries are instant - Handles OAuth token refresh automatically (Strava tokens expire every 6 hours) - Formats output with sport-specific stats, emoji labels, and markdown tables - Supports bulk sync to pull your full activity history into the local vault - Runs as a Docker container with Streamable HTTP transport for network-wide access Most MCP servers run on your local...

README

以下为原文 README 节选,完整内容请查看原文。

strava-mcp-vault

An unofficial, custom-built MCP server that lets your AI assistant talk to your Strava data. Connect it to Claude Code (or any MCP-compatible client) and ask questions like “how far did I run this week?” or “show me my ride stats for January.” It pulls your activities, stats, and streams from Strava’s API and stores everything in a local SQLite vault so you’re not hitting the API every time.

This is not affiliated with or endorsed by Strava. It’s a personal project built to scratch an itch.

What it does

  • Connects your AI to Strava through the Model Context Protocol (MCP)
  • Caches your activity data locally in SQLite so repeat queries are instant
  • Handles OAuth token refresh automatically (Strava tokens expire every 6 hours)
  • Formats output with sport-specific stats, emoji labels, and markdown tables
  • Supports bulk sync to pull your full activity history into the local vault
  • Runs as a Docker container with Streamable HTTP transport for network-wide access

Why a server instead of running locally?

Most MCP servers run on your local machine alongside your AI client. This one is designed to run on a separate server (a homelab box, a VPS, anything with Docker) for a few reasons:

  • Access from any machine. Connect from your laptop, your desktop, or any device running Claude Code. One server, multiple clients.
  • Your vault stays put. The SQLite database lives on the server in a Docker volume. You don’t lose your cached data when you reimage a laptop or switch machines.
  • Always running. Token refresh happens in the background even when your laptop is off. Your data stays fresh.
  • Backups are simpler. One database file on one server. Back it up however you back up everything else.

If you only use one machine, this works fine running locally too. The Docker setup is the same either way.

Why not just use the Strava API directly?

Strava’s rate limits are tight: 100 requests per 15 minutes, 1,000 per day. Every time your AI asks a question, it burns API calls. Other Strava MCP servers exist, but they’re thin API wrappers that proxy every request, don’t cache anything, and break when tokens expire.

strava-mcp-vault takes a different approach:

  • Cache-aside architecture: check SQLite first, hit the API only on cache miss
  • Automatic token management: tokens stored in SQLite, refreshed before expiration
  • Bulk sync: paginated import pulls entire activity histories without manual intervention
  • Offline access: anything previously cached works without an internet connection
  • Hit/miss tracking: see exactly how the cache is performing and how much API budget remains

For a simpler setup that just wraps the existing npm package in Docker, see strava-mcp-docker.

Tools

Tool Description Cache TTL
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "strava": { "type": "http", "url": "http://YOUR_SERVER_IP:18201/mcp", "headers": { "Authorization": "Bearer YOUR_MCP_AUTH_TOKEN" } } } }