@striderlabs/mcp-orangetheory 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +199 -0
- package/dist/index.js +22176 -0
- package/package.json +45 -0
- package/server.json +20 -0
- package/src/auth.ts +85 -0
- package/src/browser.ts +1040 -0
- package/src/index.ts +603 -0
- package/tsconfig.json +14 -0
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# @striderlabs/mcp-orangetheory
|
|
2
|
+
|
|
3
|
+
Orangetheory Fitness MCP server for personal AI agents. Find studios, view class schedules, book and cancel classes, and track your workout performance — all through natural language.
|
|
4
|
+
|
|
5
|
+
Built by [Strider Labs](https://striderlabs.ai).
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Find Studios** — Search for Orangetheory locations by city, zip code, or address
|
|
10
|
+
- **Class Schedules** — View upcoming classes with coach names, times, and available spots
|
|
11
|
+
- **Book Classes** — Reserve your spot in any available class
|
|
12
|
+
- **Cancel Bookings** — Cancel upcoming class reservations (with late-cancel warnings)
|
|
13
|
+
- **Workout History** — View past workouts with splat points, calories, heart rate zones, and coach info
|
|
14
|
+
- **Membership Status** — Check membership type, classes remaining, billing dates, and home studio
|
|
15
|
+
- **Performance Tracking** — Aggregated stats over time: streaks, averages, totals
|
|
16
|
+
- **Upcoming Classes** — See all your booked classes and reminders
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g @striderlabs/mcp-orangetheory
|
|
22
|
+
npx patchright install chromium
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## MCP Configuration
|
|
26
|
+
|
|
27
|
+
### Claude Desktop
|
|
28
|
+
|
|
29
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"orangetheory": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "@striderlabs/mcp-orangetheory"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Cursor / Other MCP Clients
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"mcp": {
|
|
47
|
+
"servers": {
|
|
48
|
+
"orangetheory": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "@striderlabs/mcp-orangetheory"],
|
|
51
|
+
"transport": "stdio"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Using npx (no install required)
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"orangetheory": {
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["@striderlabs/mcp-orangetheory"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Authentication
|
|
72
|
+
|
|
73
|
+
This connector uses browser automation to interact with the Orangetheory member portal. Your session is saved locally so you only need to log in once.
|
|
74
|
+
|
|
75
|
+
### Login
|
|
76
|
+
|
|
77
|
+
Use the `orangetheory_login` tool with your credentials:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
orangetheory_login(email="you@example.com", password="yourpassword")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Or call `orangetheory_login` without arguments to get a manual login URL.
|
|
84
|
+
|
|
85
|
+
Session cookies are saved to `~/.strider/orangetheory/` and reused automatically.
|
|
86
|
+
|
|
87
|
+
### Session Persistence
|
|
88
|
+
|
|
89
|
+
- Cookies are stored in `~/.strider/orangetheory/cookies.json`
|
|
90
|
+
- Session info is stored in `~/.strider/orangetheory/session.json`
|
|
91
|
+
- Sessions typically last several weeks before requiring re-login
|
|
92
|
+
- Use `orangetheory_logout` to clear all saved data
|
|
93
|
+
|
|
94
|
+
## Tools
|
|
95
|
+
|
|
96
|
+
| Tool | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `orangetheory_status` | Check login status and session info |
|
|
99
|
+
| `orangetheory_login` | Authenticate with email/password |
|
|
100
|
+
| `orangetheory_logout` | Clear session and cookies |
|
|
101
|
+
| `orangetheory_find_studios` | Find studios by location |
|
|
102
|
+
| `orangetheory_class_schedule` | View class schedules for a studio |
|
|
103
|
+
| `orangetheory_book_class` | Book an available class (requires confirm=true) |
|
|
104
|
+
| `orangetheory_cancel_booking` | Cancel a booked class (requires confirm=true) |
|
|
105
|
+
| `orangetheory_workout_history` | View past workouts with stats |
|
|
106
|
+
| `orangetheory_membership_status` | Check membership details and billing |
|
|
107
|
+
| `orangetheory_performance_summary` | Aggregated performance stats over time |
|
|
108
|
+
| `orangetheory_upcoming_classes` | View upcoming booked classes |
|
|
109
|
+
|
|
110
|
+
## Example Usage
|
|
111
|
+
|
|
112
|
+
### Finding a Studio and Booking a Class
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
User: Find Orangetheory studios near Austin, TX and book me into tomorrow's 6am class
|
|
116
|
+
|
|
117
|
+
Agent:
|
|
118
|
+
1. orangetheory_find_studios(location="Austin, TX")
|
|
119
|
+
→ Returns list of studios with IDs
|
|
120
|
+
|
|
121
|
+
2. orangetheory_class_schedule(studio_id="austin-domain", date="2024-01-16")
|
|
122
|
+
→ Returns available classes including a 6:00 AM slot (class_id: "abc123")
|
|
123
|
+
|
|
124
|
+
3. orangetheory_book_class(class_id="abc123", confirm=true)
|
|
125
|
+
→ "Successfully booked class! Booking ID: BK987654"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Checking Workout Performance
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
User: How have my workouts been going this month?
|
|
132
|
+
|
|
133
|
+
Agent:
|
|
134
|
+
1. orangetheory_performance_summary(period="month")
|
|
135
|
+
→ Total Workouts: 12
|
|
136
|
+
→ Avg Splat Points: 18
|
|
137
|
+
→ Avg Calories: 542 kcal
|
|
138
|
+
→ Current Streak: 4 workouts
|
|
139
|
+
|
|
140
|
+
2. orangetheory_workout_history(limit=5)
|
|
141
|
+
→ Last 5 workouts with detailed heart rate and zone data
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Managing Bookings
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
User: What classes do I have coming up? Cancel the one on Thursday.
|
|
148
|
+
|
|
149
|
+
Agent:
|
|
150
|
+
1. orangetheory_upcoming_classes()
|
|
151
|
+
→ Lists booked classes including Thursday at 7am (booking_id: "BK111222")
|
|
152
|
+
|
|
153
|
+
2. orangetheory_cancel_booking(booking_id="BK111222", confirm=true)
|
|
154
|
+
→ "Successfully cancelled booking BK111222"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Booking Safety
|
|
158
|
+
|
|
159
|
+
- **Book confirmation**: `orangetheory_book_class` requires `confirm=true` to prevent accidental bookings
|
|
160
|
+
- **Cancel confirmation**: `orangetheory_cancel_booking` requires `confirm=true`
|
|
161
|
+
- **Late cancel warning**: The tool warns if a cancellation may incur a fee (within 8 hours of class)
|
|
162
|
+
|
|
163
|
+
## Technical Details
|
|
164
|
+
|
|
165
|
+
- **Browser automation**: Uses [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) (stealth Playwright) to interact with Orangetheory's web portal
|
|
166
|
+
- **Headless mode**: Runs in background without visible browser window
|
|
167
|
+
- **Session persistence**: Cookies saved locally, no credentials stored in plain text after initial login
|
|
168
|
+
- **Platform**: Node.js 18+, macOS/Linux/Windows
|
|
169
|
+
|
|
170
|
+
## Limitations
|
|
171
|
+
|
|
172
|
+
- Requires initial manual login (CAPTCHA may appear on first login)
|
|
173
|
+
- Class IDs and booking IDs depend on the current page structure
|
|
174
|
+
- Orangetheory website changes may require connector updates
|
|
175
|
+
- Does not support in-studio features (heart rate monitor pairing, etc.)
|
|
176
|
+
|
|
177
|
+
## Troubleshooting
|
|
178
|
+
|
|
179
|
+
**"Not logged in" error**: Run `orangetheory_login` to re-authenticate.
|
|
180
|
+
|
|
181
|
+
**Login CAPTCHA**: Try logging in manually through the browser at https://app.orangetheory.com, then the saved cookies will work for automation.
|
|
182
|
+
|
|
183
|
+
**No studios found**: Try a different location format (zip code works most reliably), or increase the radius parameter.
|
|
184
|
+
|
|
185
|
+
**Browser crashes**: Ensure Chromium is installed: `npx patchright install chromium`
|
|
186
|
+
|
|
187
|
+
## Development
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
git clone https://github.com/striderlabs/mcp-orangetheory
|
|
191
|
+
cd mcp-orangetheory
|
|
192
|
+
npm install
|
|
193
|
+
npm run build
|
|
194
|
+
node dist/index.js
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
MIT — [Strider Labs](https://striderlabs.ai)
|