hevy-mcp 1.25.17 → 1.26.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 +97 -25
- package/dist/cli.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{src-1TMPprRG.mjs → src-_FHG1OUO.mjs} +556 -157
- package/dist/src-_FHG1OUO.mjs.map +1 -0
- package/package.json +11 -2
- package/dist/src-1TMPprRG.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -38,10 +38,10 @@ A Model Context Protocol (MCP) server implementation that interfaces with the [H
|
|
|
38
38
|
|
|
39
39
|
Pick the workflow that fits your setup:
|
|
40
40
|
|
|
41
|
-
| Scenario | Command
|
|
42
|
-
| :-------------------- |
|
|
43
|
-
| **One-off stdio run** | `HEVY_API_KEY=sk_live... npx -y hevy-mcp`
|
|
44
|
-
| **Local development** | `npm install && npm run build && npm start`
|
|
41
|
+
| Scenario | Command | Requirements |
|
|
42
|
+
| :-------------------- | :------------------------------------------------------------------------------------------ | :------------------------- |
|
|
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 ≥ 26, Hevy API key |
|
|
44
|
+
| **Local development** | `npm install && npm run build && npm start` | `.env` with `HEVY_API_KEY` |
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -49,18 +49,24 @@ Pick the workflow that fits your setup:
|
|
|
49
49
|
|
|
50
50
|
- **Node.js**: v26 or higher (strongly recommended to use the exact version pinned in `.nvmrc`).
|
|
51
51
|
- **npm**: v10 or higher.
|
|
52
|
+
- **Bun** (optional): If you want to launch with `bunx`.
|
|
52
53
|
- **Hevy API key**: Required for all operations (available with Hevy PRO).
|
|
53
54
|
|
|
54
55
|
---
|
|
55
56
|
|
|
56
57
|
## 📦 Installation
|
|
57
58
|
|
|
58
|
-
### Run via npx
|
|
59
|
+
### Run via npx or bunx
|
|
59
60
|
|
|
60
|
-
You can launch the server directly without cloning
|
|
61
|
+
You can launch the server directly without cloning. Both launchers are covered
|
|
62
|
+
by nightly smoke tests:
|
|
61
63
|
|
|
62
64
|
```bash
|
|
65
|
+
# npm launcher
|
|
63
66
|
HEVY_API_KEY=your_hevy_api_key_here npx -y hevy-mcp
|
|
67
|
+
|
|
68
|
+
# bun launcher
|
|
69
|
+
HEVY_API_KEY=your_hevy_api_key_here bunx hevy-mcp@latest
|
|
64
70
|
```
|
|
65
71
|
|
|
66
72
|
### Manual Installation
|
|
@@ -103,6 +109,15 @@ To use this server with Claude Desktop, add the following to your `claude_deskto
|
|
|
103
109
|
}
|
|
104
110
|
```
|
|
105
111
|
|
|
112
|
+
If you prefer Bun, swap the launcher fields:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"command": "bunx",
|
|
117
|
+
"args": ["hevy-mcp@latest"]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
106
121
|
### Cursor Configuration
|
|
107
122
|
|
|
108
123
|
Add this server under `"mcpServers"` in `~/.cursor/mcp.json`:
|
|
@@ -121,6 +136,15 @@ Add this server under `"mcpServers"` in `~/.cursor/mcp.json`:
|
|
|
121
136
|
}
|
|
122
137
|
```
|
|
123
138
|
|
|
139
|
+
If you prefer Bun, swap the launcher fields:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"command": "bunx",
|
|
144
|
+
"args": ["hevy-mcp@latest"]
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
124
148
|
### Other MCP Clients (via add-mcp)
|
|
125
149
|
|
|
126
150
|
For a generic setup flow across MCP clients, use [`add-mcp`](https://github.com/neon-solutions/add-mcp):
|
|
@@ -144,16 +168,34 @@ This bootstraps the `hevy-mcp` entry in your client config without manual JSON e
|
|
|
144
168
|
|
|
145
169
|
## ⚙️ Configuration
|
|
146
170
|
|
|
147
|
-
Supply your Hevy API key via
|
|
171
|
+
Supply your Hevy API key via the `HEVY_API_KEY` environment variable (in
|
|
172
|
+
`.env` or system environment).
|
|
148
173
|
|
|
149
|
-
|
|
150
|
-
|
|
174
|
+
> ⚠️ CLI API key arguments (`--hevy-api-key=...`, `--hevyApiKey=...`,
|
|
175
|
+
> `hevy-api-key=...`) are still accepted for backward compatibility, but are
|
|
176
|
+
> deprecated and insecure. Use `HEVY_API_KEY` instead.
|
|
151
177
|
|
|
152
178
|
```env
|
|
153
179
|
# Example .env
|
|
154
180
|
HEVY_API_KEY=your_hevy_api_key_here
|
|
155
181
|
```
|
|
156
182
|
|
|
183
|
+
### 🧠 Exercise Template Cache Behavior
|
|
184
|
+
|
|
185
|
+
`search-exercise-templates` now uses a shared in-memory async cache for the
|
|
186
|
+
full exercise template catalog:
|
|
187
|
+
|
|
188
|
+
- **TTL**: 5 minutes per cached catalog entry.
|
|
189
|
+
- **Memory bound**: max 1 catalog entry (LRU bounded cache).
|
|
190
|
+
- **In-flight de-duplication**: concurrent requests share the same active
|
|
191
|
+
fetch when possible.
|
|
192
|
+
- **Manual refresh**: set `refresh: true` in the tool input to invalidate the
|
|
193
|
+
cached catalog and force a re-fetch from the Hevy API.
|
|
194
|
+
|
|
195
|
+
This cache currently applies to `search-exercise-templates` only. Paginated
|
|
196
|
+
`get-exercise-templates` requests still call the API directly to keep paging
|
|
197
|
+
behavior explicit and avoid cross-page invalidation complexity.
|
|
198
|
+
|
|
157
199
|
### 📡 Sentry Monitoring
|
|
158
200
|
|
|
159
201
|
`hevy-mcp` includes Sentry monitoring to observe errors and usage in production. It initializes `@sentry/node` with tracing enabled and PII collection disabled by default. Recent observability changes also add:
|
|
@@ -166,15 +208,12 @@ HEVY_API_KEY=your_hevy_api_key_here
|
|
|
166
208
|
---
|
|
167
209
|
|
|
168
210
|
<details>
|
|
169
|
-
<summary><strong>⚠️
|
|
170
|
-
|
|
171
|
-
### Stdio Only
|
|
211
|
+
<summary><strong>⚠️ Migration Note (v1.18.0)</strong></summary>
|
|
172
212
|
|
|
173
|
-
As of
|
|
213
|
+
As of **v1.18.0**, `hevy-mcp` removed both HTTP/SSE transport and Docker
|
|
214
|
+
support.
|
|
174
215
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
Docker-based workflows are retired. The provided `Dockerfile` now exits with a message pointing to the stdio-native experience. Legacy GHCR images are no longer updated.
|
|
216
|
+
The supported path is stdio via `npx hevy-mcp`.
|
|
178
217
|
|
|
179
218
|
</details>
|
|
180
219
|
|
|
@@ -191,6 +230,11 @@ Docker-based workflows are retired. The provided `Dockerfile` now exits with a m
|
|
|
191
230
|
| **Body Measurements** | `get-body-measurements`, `get-body-measurement`, `create-body-measurement`, `update-body-measurement` |
|
|
192
231
|
| **User** | `get-user-info` |
|
|
193
232
|
|
|
233
|
+
> **Delete operations are currently unsupported:** The upstream Hevy OpenAPI
|
|
234
|
+
> spec does not expose `DELETE` endpoints for workouts, routines, routine
|
|
235
|
+
> folders, exercise templates, or body measurements, so `hevy-mcp` does not
|
|
236
|
+
> provide delete tools for these resources.
|
|
237
|
+
|
|
194
238
|
---
|
|
195
239
|
|
|
196
240
|
## 👨💻 Development & Contributing
|
|
@@ -199,12 +243,24 @@ Docker-based workflows are retired. The provided `Dockerfile` now exits with a m
|
|
|
199
243
|
|
|
200
244
|
- **Build**: `npm run build`
|
|
201
245
|
- **Lint/Format**: `npm run check` (uses oxlint/oxfmt)
|
|
246
|
+
- **Type Check**: `npm run check:types`
|
|
202
247
|
- **Unit Tests**: `npx vitest run --exclude tests/integration/**`
|
|
203
248
|
- **Full Test Suite**: `npm test` (requires `HEVY_API_KEY`)
|
|
204
249
|
- **Changeset Check**: `npm run check:changeset`
|
|
205
250
|
|
|
206
251
|
For a detailed senior engineer guide, please refer to [AGENTS.md](./AGENTS.md).
|
|
207
252
|
|
|
253
|
+
### Pull Request Checks
|
|
254
|
+
|
|
255
|
+
- **Conventional Commits**: CI lints commit messages on pull requests, so use
|
|
256
|
+
prefixes such as `feat:`, `fix:`, `docs:`, `ci:`, `chore:`, `refactor:`,
|
|
257
|
+
`test:`, or `style:`.
|
|
258
|
+
- **Type Checking**: CI runs `npm run check:types` on pull requests and pushes
|
|
259
|
+
to `main`; run this locally before opening a PR.
|
|
260
|
+
- **Changesets**: Contributor pull requests targeting `main` must include a
|
|
261
|
+
changeset. Dependabot PRs and automated `changeset-release/main` release PRs
|
|
262
|
+
are handled by automation and skip this check.
|
|
263
|
+
|
|
208
264
|
### API Client Generation
|
|
209
265
|
|
|
210
266
|
The API client is automatically generated from the OpenAPI spec using [Kubb](https://kubb.dev/):
|
|
@@ -215,24 +271,40 @@ npm run build:client
|
|
|
215
271
|
|
|
216
272
|
### Versioning & Releases
|
|
217
273
|
|
|
218
|
-
This project uses [Changesets](https://github.com/changesets/changesets) to
|
|
219
|
-
|
|
220
|
-
|
|
274
|
+
This project uses [Changesets](https://github.com/changesets/changesets) to
|
|
275
|
+
manage versioning, changelogs, releases, and pull request validation.
|
|
276
|
+
|
|
277
|
+
1. **Routine Release Cadence**: Merge the automated
|
|
278
|
+
`changeset-release/main` (**"Version Packages"**) Pull Request on a regular
|
|
279
|
+
cadence (weekly is a good default) instead of ad-hoc frequent merges.
|
|
280
|
+
2. **Urgent Release Exception**: Security fixes and high-impact,
|
|
281
|
+
user-facing bug fixes can be released immediately outside the routine
|
|
282
|
+
cadence.
|
|
283
|
+
3. **Use Bump Changesets Only for User-Facing Runtime Changes**: If your
|
|
284
|
+
change is user-facing/runtime-visible, run:
|
|
221
285
|
```bash
|
|
222
286
|
npx changeset
|
|
223
287
|
```
|
|
224
|
-
Follow the prompts to
|
|
225
|
-
|
|
288
|
+
Follow the prompts to choose `patch`, `minor`, or `major`, then write a
|
|
289
|
+
short summary. This creates a markdown file under `.changeset/`.
|
|
290
|
+
4. **Use Empty Changesets for Internal-Only Work**: Docs, CI, test-only,
|
|
291
|
+
refactor, and chore changes should use an empty changeset:
|
|
226
292
|
```bash
|
|
227
293
|
npx changeset --empty
|
|
228
294
|
```
|
|
229
|
-
|
|
295
|
+
5. **Validate Before Opening a PR**: Contributor pull requests targeting
|
|
296
|
+
`main` are checked for a changeset in CI. Dependabot PRs and automated
|
|
297
|
+
`changeset-release/main` release PRs are handled separately. You can run the
|
|
298
|
+
same validation locally with:
|
|
230
299
|
```bash
|
|
231
300
|
npm run check:changeset
|
|
232
301
|
```
|
|
233
|
-
|
|
234
|
-
- Pushing changesets to `main` triggers a GitHub Action that automatically
|
|
235
|
-
|
|
302
|
+
6. **Automated Releases**:
|
|
303
|
+
- Pushing changesets to `main` triggers a GitHub Action that automatically
|
|
304
|
+
creates or updates a **"Version Packages"** Pull Request.
|
|
305
|
+
- When this Pull Request is merged, the package is automatically built,
|
|
306
|
+
published to npm (via OIDC Trusted Publishing), and a GitHub Release is
|
|
307
|
+
created.
|
|
236
308
|
|
|
237
309
|
---
|
|
238
310
|
|
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.26.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-_FHG1OUO.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.26.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-_FHG1OUO.mjs";
|
|
13
13
|
export { configSchema, createServer, createServer as default, runServer };
|