|
| 1 | +# Requirements Archive: v1.0 StravaMCP Go Rewrite |
| 2 | + |
| 3 | +**Archived:** 2026-04-01 |
| 4 | +**Status:** SHIPPED |
| 5 | + |
| 6 | +For current requirements, see `.planning/REQUIREMENTS.md`. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +# Requirements: StravaMCP Go Rewrite |
| 11 | + |
| 12 | +**Defined:** 2026-03-26 |
| 13 | +**Core Value:** A fast, self-contained Go binary that gives any MCP client full access to the Strava API with zero cloud infrastructure required. |
| 14 | + |
| 15 | +## v1 Requirements (Milestone 1 — Core Go Rewrite) |
| 16 | + |
| 17 | +### Infrastructure |
| 18 | + |
| 19 | +- [x] **INFRA-01**: Go project scaffolded with mcp-go SDK, stderr-only logging, go.mod initialized |
| 20 | +- [x] **INFRA-02**: File-based token store with atomic write-then-rename at configurable path (~/.strava/tokens.json) |
| 21 | +- [x] **INFRA-03**: Built-in OAuth browser flow that opens system browser, runs ephemeral localhost callback, exchanges code, persists tokens |
| 22 | +- [x] **INFRA-04**: Strava HTTP client with automatic token refresh (5-min buffer), concurrent refresh protection (singleflight), and rate limit header tracking |
| 23 | +- [x] **INFRA-05**: MCP server wired with mcp-go ServeStdio, all tools registered declaratively |
| 24 | + |
| 25 | +### Activity Tools (Port) |
| 26 | + |
| 27 | +- [x] **ACT-01**: User can list recent activities with date filtering (before/after) and pagination |
| 28 | +- [x] **ACT-02**: User can get detailed activity by ID including laps, splits, segment efforts |
| 29 | +- [x] **ACT-03**: User can create manual activities with name, sport type, start time, elapsed time |
| 30 | +- [x] **ACT-04**: User can update existing activities (name, description, sport type, gear, trainer, commute, hide) |
| 31 | +- [x] **ACT-05**: User can get heart rate and power zone distribution for an activity |
| 32 | + |
| 33 | +### Athlete Tools (Port) |
| 34 | + |
| 35 | +- [x] **ATH-01**: User can get authenticated athlete profile (name, gear, preferences) |
| 36 | +- [x] **ATH-02**: User can get athlete aggregate statistics (recent/YTD/all-time run/ride/swim totals) |
| 37 | + |
| 38 | +### Stream Tools (Port) |
| 39 | + |
| 40 | +- [x] **STR-01**: User can get activity time-series streams (HR, GPS, power, cadence, altitude, etc.) |
| 41 | + |
| 42 | +### Club Tools (Port) |
| 43 | + |
| 44 | +- [x] **CLB-01**: User can list recent activities from a club's members with pagination |
| 45 | + |
| 46 | +### Upload Tools (Port) |
| 47 | + |
| 48 | +- [x] **UPL-01**: User can upload activity files (GPX, TCX, FIT) via proper multipart form data |
| 49 | +- [x] **UPL-02**: User can check upload processing status and get resulting activity ID |
| 50 | + |
| 51 | +### Presentation |
| 52 | + |
| 53 | +- [x] **DOCS-01**: Portfolio-quality README with badges, architecture diagram, feature list, quick start, visual polish |
| 54 | +- [x] **DOCS-02**: Single-binary distribution via go install and goreleaser (multi-platform builds) |
| 55 | + |
| 56 | +## v2 Requirements (Milestone 2 — Expanded Strava Coverage) |
| 57 | + |
| 58 | +### Segment Tools |
| 59 | + |
| 60 | +- [ ] **SEG-01**: User can list their starred segments with pagination |
| 61 | +- [ ] **SEG-02**: User can get detailed segment info (distance, elevation, grade, climb category) |
| 62 | +- [ ] **SEG-03**: User can explore segments near a GPS coordinate with filters |
| 63 | +- [ ] **SEG-04**: User can star/unstar a segment |
| 64 | +- [ ] **SEG-05**: User can list all efforts on a segment (filtered by athlete, date range) |
| 65 | +- [ ] **SEG-06**: User can get detailed segment effort (elapsed time, moving time, PR rank) |
| 66 | +- [ ] **SEG-07**: User can get segment streams (altitude, distance, latlng) |
| 67 | +- [ ] **SEG-08**: User can get segment effort streams (time-series for a specific effort) |
| 68 | + |
| 69 | +### Route Tools |
| 70 | + |
| 71 | +- [ ] **RTE-01**: User can list their routes with pagination |
| 72 | +- [ ] **RTE-02**: User can get route details (distance, elevation, estimated time, map) |
| 73 | +- [ ] **RTE-03**: User can export a route as GPX |
| 74 | +- [ ] **RTE-04**: User can export a route as TCX |
| 75 | +- [ ] **RTE-05**: User can get route streams (elevation, distance, latlng) |
| 76 | + |
| 77 | +### Gear Tools |
| 78 | + |
| 79 | +- [ ] **GEAR-01**: User can get gear details by ID (distance tracked, name, brand, model) |
| 80 | +- [ ] **GEAR-02**: User can list all their shoes with mileage (extracted from athlete profile) |
| 81 | +- [ ] **GEAR-03**: User can list all their bikes (extracted from athlete profile) |
| 82 | + |
| 83 | +### Laps & Zones |
| 84 | + |
| 85 | +- [ ] **LAP-01**: User can get activity laps (pace, HR, cadence per lap) |
| 86 | +- [ ] **ZONE-01**: User can get their configured HR/power zone boundaries |
| 87 | + |
| 88 | +### Extended Club Tools |
| 89 | + |
| 90 | +- [ ] **CLB-02**: User can list clubs they belong to |
| 91 | +- [ ] **CLB-03**: User can get club details (member count, sport type, location) |
| 92 | + |
| 93 | +### Social Tools |
| 94 | + |
| 95 | +- [ ] **SOC-01**: User can get activity comments with pagination |
| 96 | +- [ ] **SOC-02**: User can get activity kudos with pagination |
| 97 | +- [ ] **SOC-03**: User can get activity photos (note: uses undocumented endpoint, verify stability) |
| 98 | + |
| 99 | +## Out of Scope |
| 100 | + |
| 101 | +| Feature | Reason | |
| 102 | +|---------|--------| |
| 103 | +| AWS Lambda deployment | Simplifying to local binary only — drop all cloud infrastructure | |
| 104 | +| DynamoDB / any database | File-based token store is sufficient for local MCP | |
| 105 | +| SSE / HTTP transport | Stdio only — MCP standard for local tool servers | |
| 106 | +| Segment leaderboard | Undocumented endpoint, requires Strava Summit subscription, may break | |
| 107 | +| Activity deletion | Destructive operation with no undo — too risky for LLM tool | |
| 108 | +| Webhook subscriptions | Requires public HTTP endpoint — contradicts zero-infrastructure design | |
| 109 | +| Bulk operations | Rate limit risk and amplifies AI mistake potential | |
| 110 | +| Data caching / local DB | Adds staleness complexity; API rate limits are generous for interactive use | |
| 111 | +| Multi-athlete support | One MCP instance per athlete; coaching multiple athletes = separate instances | |
| 112 | +| Training plan generation | LLM/agent layer concern, not a tool concern | |
| 113 | +| Muscle group heat map | Separate project, future milestone integration | |
| 114 | +| OpenAI-compatible tool defs | Go version is MCP-native only | |
| 115 | + |
| 116 | +## Traceability |
| 117 | + |
| 118 | +| Requirement | Phase | Status | |
| 119 | +|-------------|-------|--------| |
| 120 | +| INFRA-01 | Phase 1 | Complete | |
| 121 | +| INFRA-02 | Phase 1 | Complete | |
| 122 | +| INFRA-03 | Phase 1 | Complete | |
| 123 | +| INFRA-04 | Phase 1 | Complete | |
| 124 | +| INFRA-05 | Phase 1 | Complete | |
| 125 | +| ACT-01 | Phase 2 | Complete | |
| 126 | +| ACT-02 | Phase 2 | Complete | |
| 127 | +| ACT-03 | Phase 2 | Complete | |
| 128 | +| ACT-04 | Phase 2 | Complete | |
| 129 | +| ACT-05 | Phase 2 | Complete | |
| 130 | +| ATH-01 | Phase 2 | Complete | |
| 131 | +| ATH-02 | Phase 2 | Complete | |
| 132 | +| STR-01 | Phase 2 | Complete | |
| 133 | +| CLB-01 | Phase 2 | Complete | |
| 134 | +| UPL-01 | Phase 2 | Complete | |
| 135 | +| UPL-02 | Phase 2 | Complete | |
| 136 | +| DOCS-01 | Phase 3 | Complete | |
| 137 | +| DOCS-02 | Phase 3 | Complete | |
| 138 | + |
| 139 | +**Coverage:** |
| 140 | +- v1 requirements: 18 total |
| 141 | +- Mapped to phases: 18/18 |
| 142 | +- Unmapped: 0 |
| 143 | + |
| 144 | +--- |
| 145 | +*Requirements defined: 2026-03-26* |
| 146 | +*Last updated: 2026-03-26 after roadmap creation* |
0 commit comments