hevy-mcp 1.26.6 → 1.28.1-beta.1
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 +56 -8
- package/dist/cli.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{src-B9KZiN70.mjs → src-CHT_Meh8.mjs} +1604 -424
- package/dist/src-CHT_Meh8.mjs.map +1 -0
- package/package.json +12 -4
- package/server.json +29 -0
- package/dist/src-B9KZiN70.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ A Model Context Protocol (MCP) server implementation that interfaces with the [H
|
|
|
21
21
|
- [Why hevy-mcp?](#why-hevy-mcp)
|
|
22
22
|
- [Configuration](#configuration)
|
|
23
23
|
- [Available MCP Tools](#available-mcp-tools)
|
|
24
|
+
- [Available MCP Resources](#available-mcp-resources)
|
|
24
25
|
- [Development & Contributing](#development--contributing)
|
|
25
26
|
|
|
26
27
|
---
|
|
@@ -40,14 +41,14 @@ Pick the workflow that fits your setup:
|
|
|
40
41
|
|
|
41
42
|
| Scenario | Command | Requirements |
|
|
42
43
|
| :-------------------- | :------------------------------------------------------------------------------------------ | :------------------------- |
|
|
43
|
-
| **One-off stdio run** | `HEVY_API_KEY=sk_live... npx -y hevy-mcp` or `HEVY_API_KEY=sk_live... bunx hevy-mcp@latest` | Node.js ≥
|
|
44
|
+
| **One-off stdio run** | `HEVY_API_KEY=sk_live... npx -y hevy-mcp` or `HEVY_API_KEY=sk_live... bunx hevy-mcp@latest` | Node.js ≥ 20, Hevy API key |
|
|
44
45
|
| **Local development** | `npm install && npm run build && npm start` | `.env` with `HEVY_API_KEY` |
|
|
45
46
|
|
|
46
47
|
---
|
|
47
48
|
|
|
48
49
|
## 🛠️ Prerequisites
|
|
49
50
|
|
|
50
|
-
- **Node.js**:
|
|
51
|
+
- **Node.js**: v20 or higher (strongly recommended to use the exact version pinned in `.nvmrc`).
|
|
51
52
|
- **npm**: v10 or higher.
|
|
52
53
|
- **Bun** (optional): If you want to launch with `bunx`.
|
|
53
54
|
- **Hevy API key**: Required for all operations (available with Hevy PRO).
|
|
@@ -69,6 +70,25 @@ HEVY_API_KEY=your_hevy_api_key_here npx -y hevy-mcp
|
|
|
69
70
|
HEVY_API_KEY=your_hevy_api_key_here bunx hevy-mcp@latest
|
|
70
71
|
```
|
|
71
72
|
|
|
73
|
+
### Prerelease channel
|
|
74
|
+
|
|
75
|
+
Install `hevy-mcp@beta` to opt into changes merged to `main` that have not yet
|
|
76
|
+
reached a stable release:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install hevy-mcp@beta
|
|
80
|
+
|
|
81
|
+
# npx launcher
|
|
82
|
+
npx -y hevy-mcp@beta
|
|
83
|
+
|
|
84
|
+
# bun launcher
|
|
85
|
+
bunx hevy-mcp@beta
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Beta builds may be less stable and can change before their stable release.
|
|
89
|
+
`npm install hevy-mcp@latest` remains the stable channel. To switch back from
|
|
90
|
+
beta, install `hevy-mcp@latest` again.
|
|
91
|
+
|
|
72
92
|
### Manual Installation
|
|
73
93
|
|
|
74
94
|
```bash
|
|
@@ -178,17 +198,24 @@ Supply your Hevy API key via the `HEVY_API_KEY` environment variable (in
|
|
|
178
198
|
Set `HEVY_MCP_API_TIMEOUT` to override the default 30-second Hevy API request
|
|
179
199
|
timeout. Its value is in milliseconds.
|
|
180
200
|
|
|
201
|
+
Set `HEVY_MCP_DEBUG=1` to emit verbose, privacy-bounded diagnostics to stderr.
|
|
202
|
+
Debug records include tool invocations and sanitized Hevy API response timing
|
|
203
|
+
and status details. Other values leave diagnostics disabled, and stdout remains
|
|
204
|
+
reserved for the MCP JSON-RPC stream.
|
|
205
|
+
|
|
181
206
|
```env
|
|
182
207
|
# Example .env
|
|
183
208
|
HEVY_API_KEY=your_hevy_api_key_here
|
|
184
209
|
# Optional: customize Hevy API request timeout (milliseconds)
|
|
185
210
|
HEVY_MCP_API_TIMEOUT=30000
|
|
211
|
+
# Optional: enable verbose stderr diagnostics (only the value 1 enables it)
|
|
212
|
+
HEVY_MCP_DEBUG=1
|
|
186
213
|
```
|
|
187
214
|
|
|
188
215
|
### 🧠 Exercise Template Cache Behavior
|
|
189
216
|
|
|
190
|
-
`search-exercise-templates`
|
|
191
|
-
full exercise template catalog:
|
|
217
|
+
`search-exercise-templates` and the `hevy://exercise-templates` resource use a
|
|
218
|
+
shared in-memory async cache for the full exercise template catalog:
|
|
192
219
|
|
|
193
220
|
- **TTL**: 5 minutes per cached catalog entry.
|
|
194
221
|
- **Memory bound**: max 1 catalog entry (LRU bounded cache).
|
|
@@ -197,9 +224,8 @@ full exercise template catalog:
|
|
|
197
224
|
- **Manual refresh**: set `refresh: true` in the tool input to invalidate the
|
|
198
225
|
cached catalog and force a re-fetch from the Hevy API.
|
|
199
226
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
behavior explicit and avoid cross-page invalidation complexity.
|
|
227
|
+
Paginated `get-exercise-templates` requests still call the API directly to keep
|
|
228
|
+
paging behavior explicit and avoid cross-page invalidation complexity.
|
|
203
229
|
|
|
204
230
|
### 📡 Sentry Monitoring
|
|
205
231
|
|
|
@@ -240,6 +266,28 @@ The supported path is stdio via `npx hevy-mcp`.
|
|
|
240
266
|
> folders, exercise templates, or body measurements, so `hevy-mcp` does not
|
|
241
267
|
> provide delete tools for these resources.
|
|
242
268
|
|
|
269
|
+
## 💬 Available MCP Prompts
|
|
270
|
+
|
|
271
|
+
| Prompt | Arguments | Guided workflow |
|
|
272
|
+
| :---------------------------- | :------------------------------------------------------------------------------------- | :---------------------------------------------------- |
|
|
273
|
+
| `analyze-workout-progress` | Optional `weeks` (1-12; defaults to `4` when omitted from a supplied arguments object) | Analyze recent workout and body-measurement trends. |
|
|
274
|
+
| `create-workout-from-routine` | `routineId`, `startTime` (UTC ISO seconds) | Record a completed workout using a routine as a plan. |
|
|
275
|
+
|
|
276
|
+
Compatibility note: with MCP SDK v1.29.0, clients using the default must send
|
|
277
|
+
`arguments: {}` because the SDK rejects requests that omit the entire
|
|
278
|
+
`arguments` object before prompt field defaults are evaluated.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 📚 Available MCP Resources
|
|
283
|
+
|
|
284
|
+
| Name | URI |
|
|
285
|
+
| :------------------- | :-------------------------- |
|
|
286
|
+
| `user-profile` | `hevy://user` |
|
|
287
|
+
| `workout-count` | `hevy://workout-count` |
|
|
288
|
+
| `exercise-templates` | `hevy://exercise-templates` |
|
|
289
|
+
| `routine-folders` | `hevy://routine-folders` |
|
|
290
|
+
|
|
243
291
|
---
|
|
244
292
|
|
|
245
293
|
## 👨💻 Development & Contributing
|
|
@@ -249,7 +297,7 @@ The supported path is stdio via `npx hevy-mcp`.
|
|
|
249
297
|
- **Build**: `npm run build`
|
|
250
298
|
- **Lint/Format**: `npm run check` (uses oxlint/oxfmt)
|
|
251
299
|
- **Type Check**: `npm run check:types`
|
|
252
|
-
- **Unit Tests**: `npx vitest run --exclude tests/integration
|
|
300
|
+
- **Unit Tests**: `npx vitest run --exclude 'tests/integration/**'`
|
|
253
301
|
- **Full Test Suite**: `npm test` (requires `HEVY_API_KEY`)
|
|
254
302
|
- **Changeset Check**: `npm run check:changeset`
|
|
255
303
|
|
package/dist/cli.mjs
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
(function() {
|
|
5
5
|
try {
|
|
6
6
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
|
|
7
|
-
e.SENTRY_RELEASE = { id: "hevy-mcp@1.
|
|
7
|
+
e.SENTRY_RELEASE = { id: "hevy-mcp@1.28.1-beta.1" };
|
|
8
8
|
var n = new e.Error().stack;
|
|
9
9
|
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "03cf150f-6466-4ca3-9cf1-e423cc0e3cd2", e._sentryDebugIdIdentifier = "sentry-dbid-03cf150f-6466-4ca3-9cf1-e423cc0e3cd2");
|
|
10
10
|
} catch (e) {}
|
|
11
11
|
})();
|
|
12
|
-
import { r as runServer } from "./src-
|
|
12
|
+
import { r as runServer } from "./src-CHT_Meh8.mjs";
|
|
13
13
|
//#region src/cli.ts
|
|
14
14
|
runServer().catch((error) => {
|
|
15
15
|
console.error("Fatal error in main():", error);
|
package/dist/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
(function() {
|
|
5
5
|
try {
|
|
6
6
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
|
|
7
|
-
e.SENTRY_RELEASE = { id: "hevy-mcp@1.
|
|
7
|
+
e.SENTRY_RELEASE = { id: "hevy-mcp@1.28.1-beta.1" };
|
|
8
8
|
var n = new e.Error().stack;
|
|
9
9
|
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5b077b94-9ef8-4f24-a0b0-8dcfbf491be1", e._sentryDebugIdIdentifier = "sentry-dbid-5b077b94-9ef8-4f24-a0b0-8dcfbf491be1");
|
|
10
10
|
} catch (e) {}
|
|
11
11
|
})();
|
|
12
|
-
import { n as createServer, r as runServer, t as configSchema } from "./src-
|
|
12
|
+
import { n as createServer, r as runServer, t as configSchema } from "./src-CHT_Meh8.mjs";
|
|
13
13
|
export { configSchema, createServer, createServer as default, runServer };
|