hevy-mcp 1.26.0 → 1.26.2

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 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 | Requirements |
42
- | :-------------------- | :------------------------------------------ | :------------------------- |
43
- | **One-off stdio run** | `HEVY_API_KEY=sk_live... npx -y hevy-mcp` | Node.js ≥ 26, Hevy API key |
44
- | **Local development** | `npm install && npm run build && npm start` | `.env` with `HEVY_API_KEY` |
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 (Recommended)
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,39 @@ 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).
173
+
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.
148
177
 
149
- 1. **Environment Variable**: `HEVY_API_KEY` (in `.env` or system environment).
150
- 2. **CLI Argument**: `--hevy-api-key=your_key` (after `--` in npm scripts).
178
+ Set `HEVY_MCP_API_TIMEOUT` to override the default 30-second Hevy API request
179
+ timeout. Its value is in milliseconds.
151
180
 
152
181
  ```env
153
182
  # Example .env
154
183
  HEVY_API_KEY=your_hevy_api_key_here
184
+ # Optional: customize Hevy API request timeout (milliseconds)
185
+ HEVY_MCP_API_TIMEOUT=30000
155
186
  ```
156
187
 
188
+ ### 🧠 Exercise Template Cache Behavior
189
+
190
+ `search-exercise-templates` now uses a shared in-memory async cache for the
191
+ full exercise template catalog:
192
+
193
+ - **TTL**: 5 minutes per cached catalog entry.
194
+ - **Memory bound**: max 1 catalog entry (LRU bounded cache).
195
+ - **In-flight de-duplication**: concurrent requests share the same active
196
+ fetch when possible.
197
+ - **Manual refresh**: set `refresh: true` in the tool input to invalidate the
198
+ cached catalog and force a re-fetch from the Hevy API.
199
+
200
+ This cache currently applies to `search-exercise-templates` only. Paginated
201
+ `get-exercise-templates` requests still call the API directly to keep paging
202
+ behavior explicit and avoid cross-page invalidation complexity.
203
+
157
204
  ### 📡 Sentry Monitoring
158
205
 
159
206
  `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 +213,12 @@ HEVY_API_KEY=your_hevy_api_key_here
166
213
  ---
167
214
 
168
215
  <details>
169
- <summary><strong>⚠️ Deprecation Notices (HTTP/SSE & Docker)</strong></summary>
170
-
171
- ### Stdio Only
216
+ <summary><strong>⚠️ Migration Note (v1.18.0)</strong></summary>
172
217
 
173
- As of version **1.18.0**, `hevy-mcp` only supports **stdio** transport. HTTP/SSE transport has been completely removed to simplify the codebase and focus on the native MCP experience.
218
+ As of **v1.18.0**, `hevy-mcp` removed both HTTP/SSE transport and Docker
219
+ support.
174
220
 
175
- ### Docker
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.
221
+ The supported path is stdio via `npx hevy-mcp`.
178
222
 
179
223
  </details>
180
224
 
@@ -191,6 +235,11 @@ Docker-based workflows are retired. The provided `Dockerfile` now exits with a m
191
235
  | **Body Measurements** | `get-body-measurements`, `get-body-measurement`, `create-body-measurement`, `update-body-measurement` |
192
236
  | **User** | `get-user-info` |
193
237
 
238
+ > **Delete operations are currently unsupported:** The upstream Hevy OpenAPI
239
+ > spec does not expose `DELETE` endpoints for workouts, routines, routine
240
+ > folders, exercise templates, or body measurements, so `hevy-mcp` does not
241
+ > provide delete tools for these resources.
242
+
194
243
  ---
195
244
 
196
245
  ## 👨‍💻 Development & Contributing
@@ -199,6 +248,7 @@ Docker-based workflows are retired. The provided `Dockerfile` now exits with a m
199
248
 
200
249
  - **Build**: `npm run build`
201
250
  - **Lint/Format**: `npm run check` (uses oxlint/oxfmt)
251
+ - **Type Check**: `npm run check:types`
202
252
  - **Unit Tests**: `npx vitest run --exclude tests/integration/**`
203
253
  - **Full Test Suite**: `npm test` (requires `HEVY_API_KEY`)
204
254
  - **Changeset Check**: `npm run check:changeset`
@@ -210,6 +260,8 @@ For a detailed senior engineer guide, please refer to [AGENTS.md](./AGENTS.md).
210
260
  - **Conventional Commits**: CI lints commit messages on pull requests, so use
211
261
  prefixes such as `feat:`, `fix:`, `docs:`, `ci:`, `chore:`, `refactor:`,
212
262
  `test:`, or `style:`.
263
+ - **Type Checking**: CI runs `npm run check:types` on pull requests and pushes
264
+ to `main`; run this locally before opening a PR.
213
265
  - **Changesets**: Contributor pull requests targeting `main` must include a
214
266
  changeset. Dependabot PRs and automated `changeset-release/main` release PRs
215
267
  are handled by automation and skip this check.
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.26.0" };
7
+ e.SENTRY_RELEASE = { id: "hevy-mcp@1.26.2" };
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-Di7keTQA.mjs";
12
+ import { r as runServer } from "./src-CuOZcBEo.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.26.0" };
7
+ e.SENTRY_RELEASE = { id: "hevy-mcp@1.26.2" };
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-Di7keTQA.mjs";
12
+ import { n as createServer, r as runServer, t as configSchema } from "./src-CuOZcBEo.mjs";
13
13
  export { configSchema, createServer, createServer as default, runServer };