Skip to content

Commit 038c34e

Browse files
committed
chore: complete v1.0 milestone
- Archive ROADMAP.md and REQUIREMENTS.md to milestones/ - Create MILESTONES.md with accomplishments - Evolve PROJECT.md with validated requirements and current state - Delete original ROADMAP.md and REQUIREMENTS.md (fresh for next milestone)
1 parent b18e28e commit 038c34e

5 files changed

Lines changed: 265 additions & 35 deletions

File tree

.planning/MILESTONES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Milestones
2+
3+
## v1.0 StravaMCP Go Rewrite (Shipped: 2026-04-01)
4+
5+
**Phases completed:** 3 phases, 8 plans, 18 tasks
6+
7+
**Key accomplishments:**
8+
9+
- Go binary with mcp-go stdio server shell, file-based token store with atomic writes, and env-var config loader with validation
10+
- Strava HTTP client with singleflight token refresh and browser OAuth flow with GET /athlete end-to-end validation
11+
- FormatResponse/HandleToolError shared helpers plus 5 activity MCP tools (get, get_by_id, create, update, zones) with map-based partial update and 18 tests
12+
- 4 MCP tools (athlete profile/stats, activity streams, club activities) with auto-fetch athlete ID and array-to-CSV key joining, all following Plan 01 closure-over-client pattern
13+
- PostMultipart client method, create_upload/get_upload MCP tools with extension auto-detection, and RegisterAll wiring all 11 tools from 5 resource files
14+
- Go module migrated to github.com/Stealinglight/StravaMCP, all TypeScript/Lambda artifacts deleted, ISC license created, .gitignore rewritten for Go
15+
- goreleaser v2 cross-platform release config with Homebrew cask distribution, tag-triggered GitHub Actions workflow, and Go-focused CONTRIBUTING.md
16+
- Portfolio-quality README with 8 badges, dual Mermaid architecture diagrams, 11-tool reference table, and simplified Go-focused docs site
17+
18+
---

.planning/PROJECT.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ A fast, self-contained Go binary that gives any MCP client full access to the St
1212

1313
### Validated
1414

15-
<!-- Inferred from existing TypeScript codebase -->
16-
17-
- ✓ List athlete activities with date filtering and pagination — existing
18-
- ✓ Get detailed activity by ID — existing
19-
- ✓ Create manual activities — existing
20-
- ✓ Update existing activities (name, description, gear, metadata) — existing
21-
- ✓ Get activity heart rate and power zones — existing
22-
- ✓ Get authenticated athlete profile — existing
23-
- ✓ Get athlete aggregate statistics — existing
24-
- ✓ Get activity time-series streams (HR, GPS, power, cadence, etc.) — existing
25-
- ✓ Get club activities — existing
26-
- ✓ Upload activity files (GPX, TCX, FIT) — existing
27-
- ✓ Check upload status — existing
28-
- ✓ Automatic OAuth token refresh with expiry buffer — existing
29-
- ✓ File-based token storage (Rusty Claw pattern) — existing in RustyClaw
15+
- ✓ Full rewrite in Go with stdio MCP transport — v1.0
16+
- ✓ Go MCP SDK integration (mcp-go v0.46.0) — v1.0
17+
- ✓ Built-in OAuth browser flow for initial token acquisition — v1.0
18+
- ✓ File-based token store with automatic refresh persistence — v1.0
19+
- ✓ 11 MCP tools with full TypeScript feature parity — v1.0
20+
- ✓ Portfolio-quality README with badges, diagrams, tool reference — v1.0
21+
- ✓ Single-binary distribution via goreleaser with Homebrew — v1.0
22+
- ✓ Cross-platform builds (darwin/linux, amd64/arm64) — v1.0
3023

3124
### Active
3225

@@ -37,15 +30,6 @@ A fast, self-contained Go binary that gives any MCP client full access to the St
3730
- [ ] Gear tools: gear details, manage equipment
3831
- [ ] Laps & efforts tools: activity laps, segment efforts, best efforts
3932

40-
### Validated in v1.0 Milestone
41-
42-
- ✓ Full rewrite in Go with stdio MCP transport — Phase 1
43-
- ✓ Go MCP SDK integration (mcp-go v0.46.0) — Phase 1
44-
- ✓ Built-in OAuth browser flow for initial token acquisition — Phase 1
45-
- ✓ File-based token store with automatic refresh persistence — Phase 1
46-
- ✓ Portfolio-quality README with badges, architecture diagram, feature highlights, and visual polish — Phase 3
47-
- ✓ Single-binary distribution (go build, no runtime dependencies) — Phase 3
48-
- ✓ goreleaser cross-platform release pipeline with Homebrew distribution — Phase 3
4933

5034
### Out of Scope
5135

@@ -59,12 +43,13 @@ A fast, self-contained Go binary that gives any MCP client full access to the St
5943

6044
## Context
6145

62-
- This MCP is part of the RustyClaw/ZeroClaw ecosystem, which runs multiple local MCP servers (Strava, Slack, video, web-research) as stdio-based tools
63-
- The existing TypeScript version at `src/` has 11 Strava tools and a full AWS Lambda deployment stack
64-
- The RustyClaw version at `mcp-servers/strava-mcp/` is already a simplified local-only TypeScript version — the Go rewrite follows this pattern
65-
- The Go rewrite adds expanded Strava API coverage (segments, routes, gear, laps) beyond the current 11 tools
66-
- Chris wants this as a portfolio piece — clean code, excellent README, architecture documentation
67-
- The muscle group heat map renderer is being built separately and will integrate with this MCP in a future milestone
46+
- v1.0 shipped: 4,791 LOC Go across 5 packages (auth, config, server, strava, tools)
47+
- 80+ tests passing, all packages covered
48+
- Tech stack: Go 1.25, mcp-go v0.46.0, goreleaser v2, GitHub Actions
49+
- Part of the RustyClaw/ZeroClaw ecosystem (local MCP servers for Strava, Slack, video, web-research)
50+
- All TypeScript/Lambda code removed — clean Go-only repository
51+
- Portfolio piece with polished README, badges, Mermaid diagrams
52+
- The muscle group heat map renderer is being built separately and will integrate in a future milestone
6853

6954
## Constraints
7055

@@ -87,12 +72,15 @@ A fast, self-contained Go binary that gives any MCP client full access to the St
8772
| Raw JSON responses (no Go structs for Strava data) | D-01: pass through Strava JSON with pretty-printing, avoid schema coupling | ✓ Phase 2 |
8873
| Map-based PUT body for update_activity | Avoids Go zero-value trap — only sends user-provided fields | ✓ Phase 2 |
8974
| Auto-detect upload data_type from file extension | D-04: .gpx/.fit/.tcx/.tcx.gz mapped automatically, explicit override available | ✓ Phase 2 |
90-
| Add segments/routes/gear/laps | Expand beyond current 11 tools to comprehensive Strava coverage | — Pending |
91-
| Heat map as future milestone | Separate project, don't couple it to the core rewrite | — Pending |
75+
| Module path github.com/Stealinglight/StravaMCP | Enables `go install` and proper Go module ecosystem integration | ✓ Phase 3 |
76+
| goreleaser v2 with homebrew_casks | Cross-platform binary distribution + Homebrew tap | ✓ Phase 3 |
77+
| ISC License | Simple permissive license for open source distribution | ✓ Phase 3 |
78+
| Add segments/routes/gear/laps | Expand beyond current 11 tools to comprehensive Strava coverage | — v2.0 |
79+
| Heat map as future milestone | Separate project, don't couple it to the core rewrite | — v2.0+ |
9280

9381
## Current State
9482

95-
v1.0 milestone complete — All three phases delivered. Phase 1 built the Go project scaffold, OAuth browser flow, token store, and MCP server wiring. Phase 2 ported all 11 Strava tools with full feature parity. Phase 3 migrated the module path to `github.com/Stealinglight/StravaMCP`, cleaned up all TypeScript/Lambda legacy artifacts, created the goreleaser release pipeline with Homebrew cask distribution, and delivered a portfolio-quality README with badges, Mermaid diagrams, and comprehensive documentation. 80+ tests passing. Ready for first release tag.
83+
v1.0 milestone shipped (2026-04-01). Complete Go rewrite with 11 MCP tools, OAuth browser flow, singleflight token refresh, goreleaser cross-platform release pipeline with Homebrew distribution, and portfolio-quality README. 4,791 LOC Go, 80+ tests, all TypeScript/Lambda artifacts removed. Ready for first `v1.0.0` release tag and v2.0 planning (expanded Strava API coverage: segments, routes, gear, laps).
9684

9785
---
98-
*Last updated: 2026-04-01 after Phase 3 completion*
86+
*Last updated: 2026-04-01 after v1.0 milestone completion*

.planning/STATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ milestone: v1.0
44
milestone_name: milestone
55
status: executing
66
stopped_at: Phase 3 context gathered
7-
last_updated: "2026-04-01T21:08:51.217Z"
7+
last_updated: "2026-04-01T21:19:26.541Z"
88
last_activity: 2026-04-01
99
progress:
1010
total_phases: 3
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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*
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Roadmap: StravaMCP Go Rewrite
2+
3+
## Overview
4+
5+
This roadmap delivers a complete Go rewrite of the Strava MCP server in three phases: first, build all infrastructure (project scaffold, token management, OAuth browser flow, Strava HTTP client, MCP server wiring); second, port all 11 existing tools to Go with full feature parity; third, polish the README and set up single-binary distribution for portfolio presentation. The dependency chain is strict -- no tool can work without the infrastructure layer, and the README cannot be finalized until all tools are implemented.
6+
7+
## Phases
8+
9+
**Phase Numbering:**
10+
- Integer phases (1, 2, 3): Planned milestone work
11+
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
12+
13+
Decimal phases appear between their surrounding integers in numeric order.
14+
15+
- [x] **Phase 1: Foundation and Auth** - Go project scaffold, file-based token store, OAuth browser flow, Strava HTTP client, and MCP server wiring (completed 2026-03-27)
16+
- [x] **Phase 2: Tool Suite** - Port all 11 existing Strava tools with full feature parity (activities, athlete, streams, clubs, uploads)
17+
- [ ] **Phase 3: Polish and Distribution** - Portfolio-quality README and single-binary cross-platform release pipeline
18+
19+
## Phase Details
20+
21+
### Phase 1: Foundation and Auth
22+
**Goal**: A running MCP server binary that authenticates with Strava and can make API calls, with all infrastructure ready for tool registration
23+
**Depends on**: Nothing (first phase)
24+
**Requirements**: INFRA-01, INFRA-02, INFRA-03, INFRA-04, INFRA-05
25+
**Success Criteria** (what must be TRUE):
26+
1. Running `go build` produces a single binary with no runtime dependencies
27+
2. Running `strava-mcp auth` opens a browser, completes OAuth, and persists tokens to ~/.strava/tokens.json
28+
3. The MCP server connects via stdio and responds to MCP protocol handshake (list tools returns empty tool set)
29+
4. Token auto-refresh works transparently -- an expired access token triggers refresh without user intervention, and concurrent refresh attempts are coalesced into one
30+
5. All logging goes to stderr only -- stdout carries exclusively MCP JSON-RPC traffic
31+
**Plans**: 2 plans
32+
33+
Plans:
34+
- [x] 01-01-PLAN.md -- Go project scaffold, config loader, token store, and MCP server shell
35+
- [x] 01-02-PLAN.md -- Strava HTTP client with auto-refresh and OAuth browser flow
36+
37+
### Phase 2: Tool Suite
38+
**Goal**: Users can access all core Strava data through 11 MCP tools matching the existing TypeScript feature set
39+
**Depends on**: Phase 1
40+
**Requirements**: ACT-01, ACT-02, ACT-03, ACT-04, ACT-05, ATH-01, ATH-02, STR-01, CLB-01, UPL-01, UPL-02
41+
**Success Criteria** (what must be TRUE):
42+
1. User can list, view, create, and update activities through MCP tool calls
43+
2. User can retrieve heart rate/power zones, time-series streams, and athlete statistics
44+
3. User can upload activity files (GPX/TCX/FIT) via multipart form data and check upload status
45+
4. User can list club activities with pagination
46+
5. All 11 tool descriptions match the existing TypeScript versions in detail and quality (descriptions are the product UI for LLMs)
47+
**Plans**: 3 plans
48+
49+
Plans:
50+
- [x] 02-01-PLAN.md -- Shared helpers (formatResponse, handleToolError) and 5 activity tools
51+
- [x] 02-02-PLAN.md -- Athlete, streams, and club tools (4 tools)
52+
- [x] 02-03-PLAN.md -- PostMultipart client method, upload tools, and RegisterAll wiring (2 tools + final wiring)
53+
54+
### Phase 3: Polish and Distribution
55+
**Goal**: The project is portfolio-ready with a polished README and frictionless installation via single-binary releases
56+
**Depends on**: Phase 2
57+
**Requirements**: DOCS-01, DOCS-02
58+
**Success Criteria** (what must be TRUE):
59+
1. README includes badges, architecture diagram, complete tool reference, quick-start guide, and visual polish worthy of a portfolio piece
60+
2. `goreleaser` produces cross-platform binaries (macOS, Linux) from a single GitHub Actions workflow
61+
3. A new user can go from zero to working MCP server by following only the README instructions
62+
**Plans**: 3 plans
63+
64+
Plans:
65+
- [x] 03-01-PLAN.md -- Module path migration, legacy cleanup, LICENSE, .gitignore
66+
- [x] 03-02-PLAN.md -- goreleaser config, release workflow, CONTRIBUTING.md, repo metadata
67+
- [x] 03-03-PLAN.md -- Portfolio-quality README and docs site rewrite
68+
69+
## Progress
70+
71+
**Execution Order:**
72+
Phases execute in numeric order: 1 -> 2 -> 3
73+
74+
| Phase | Plans Complete | Status | Completed |
75+
|-------|----------------|--------|-----------|
76+
| 1. Foundation and Auth | 2/2 | Complete | 2026-03-27 |
77+
| 2. Tool Suite | 3/3 | Complete | 2026-03-27 |
78+
| 3. Polish and Distribution | 1/3 | In progress | - |

0 commit comments

Comments
 (0)