@daveremy/hevy-mcp 0.1.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/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +19 -0
- package/LICENSE +21 -0
- package/README.md +448 -0
- package/dist/cli.d.mts +2 -0
- package/dist/cli.mjs +21 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +13 -0
- package/dist/src-CCpNxeP3.mjs +1488 -0
- package/dist/src-CCpNxeP3.mjs.map +1 -0
- package/package.json +101 -0
- package/skills/hevy/SKILL.md +74 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "daveremy-plugins",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "daveremy"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "hevy-mcp",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "npm",
|
|
11
|
+
"package": "@daveremy/hevy-mcp"
|
|
12
|
+
},
|
|
13
|
+
"description": "MCP server for the Hevy fitness tracking API",
|
|
14
|
+
"version": "0.1.2"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hevy-mcp",
|
|
3
|
+
"description": "MCP server for the Hevy fitness tracking API — workouts, routines, exercises, and more",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "daveremy"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/daveremy/hevy-mcp",
|
|
9
|
+
"repository": "https://github.com/daveremy/hevy-mcp",
|
|
10
|
+
"mcpServers": {
|
|
11
|
+
"hevy-mcp": {
|
|
12
|
+
"command": "npx",
|
|
13
|
+
"args": [
|
|
14
|
+
"-y",
|
|
15
|
+
"@daveremy/hevy-mcp"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Christoph Kieslich
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
# hevy-mcp: Model Context Protocol Server for Hevy Fitness API
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
> **Attribution:** This project is a fork of [chrisdoc/hevy-mcp](https://github.com/chrisdoc/hevy-mcp), originally created by **Christoph Kieslich**. Published as `@daveremy/hevy-mcp` with Claude Code plugin packaging.
|
|
6
|
+
|
|
7
|
+
A Model Context Protocol (MCP) server implementation that interfaces with the [Hevy fitness tracking app](https://www.hevyapp.com/) and its [API](https://api.hevyapp.com/docs/). This server enables AI assistants to access and manage workout data, routines, exercise templates, and more through the Hevy API (requires PRO subscription).
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Workout Management**: Fetch, create, and update workouts
|
|
12
|
+
- **Routine Management**: Access and manage workout routines
|
|
13
|
+
- **Exercise Templates**: Browse available exercise templates
|
|
14
|
+
- **Folder Organization**: Manage routine folders
|
|
15
|
+
- **Webhook Subscriptions**: Create, view, and delete webhook subscriptions for workout events
|
|
16
|
+
|
|
17
|
+
> **Note:** HTTP transport and Docker images are deprecated. The server runs via stdio transport (e.g., `npx hevy-mcp`). Legacy GHCR images remain available but are no longer maintained.
|
|
18
|
+
|
|
19
|
+
## Claude Code Plugin Install
|
|
20
|
+
|
|
21
|
+
Install as a Claude Code plugin:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
claude plugin add @daveremy/hevy-mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then set your Hevy API key when prompted. The `/hevy` skill becomes available for interacting with your fitness data.
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
Pick the workflow that fits your setup:
|
|
32
|
+
|
|
33
|
+
| Scenario | Command | Requirements |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| One-off stdio run | `HEVY_API_KEY=sk_live... npx -y @daveremy/hevy-mcp` | Node.js ≥ 20, Hevy API key |
|
|
36
|
+
| Local development | `pnpm install && pnpm run dev` | `.env` with `HEVY_API_KEY`, pnpm via Corepack |
|
|
37
|
+
|
|
38
|
+
## Prerequisites
|
|
39
|
+
|
|
40
|
+
- Node.js (v20 or higher; strongly recommended to use the exact version pinned in
|
|
41
|
+
`.nvmrc` to match CI)
|
|
42
|
+
- pnpm (via Corepack)
|
|
43
|
+
- A Hevy API key
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
### Run via npx (recommended)
|
|
48
|
+
|
|
49
|
+
You can launch the server directly without cloning:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
HEVY_API_KEY=your_hevy_api_key_here npx -y @daveremy/hevy-mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Manual Installation
|
|
56
|
+
```bash
|
|
57
|
+
# Clone the repository
|
|
58
|
+
git clone https://github.com/daveremy/hevy-mcp.git
|
|
59
|
+
cd hevy-mcp
|
|
60
|
+
|
|
61
|
+
# Install dependencies
|
|
62
|
+
corepack use pnpm@10.22.0
|
|
63
|
+
pnpm install
|
|
64
|
+
|
|
65
|
+
# Create .env and add your keys (never commit real keys)
|
|
66
|
+
cp .env.sample .env
|
|
67
|
+
# Edit .env and add your HEVY_API_KEY.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Integration with Cursor
|
|
71
|
+
|
|
72
|
+
To use this MCP server with Cursor, add/merge this server entry under
|
|
73
|
+
`"mcpServers"` in `~/.cursor/mcp.json`:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"hevy-mcp": {
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": ["-y", "@daveremy/hevy-mcp"],
|
|
80
|
+
"env": {
|
|
81
|
+
"HEVY_API_KEY": "your-api-key-here"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Make sure to replace `your-api-key-here` with your actual Hevy API key.
|
|
88
|
+
|
|
89
|
+
If your `mcp.json` already contains other servers, do not replace the whole
|
|
90
|
+
file—merge the `"hevy-mcp"` entry into your existing `"mcpServers"` object.
|
|
91
|
+
|
|
92
|
+
The `"hevy-mcp"` key name is arbitrary. If you already have an existing config
|
|
93
|
+
using a different name (for example `"hevy-mcp-server"`), you can keep it.
|
|
94
|
+
|
|
95
|
+
If you already have an existing `"mcpServers"` object, merge the `"hevy-mcp"`
|
|
96
|
+
entry into it without removing other servers.
|
|
97
|
+
|
|
98
|
+
<details>
|
|
99
|
+
<summary><strong>Example full ~/.cursor/mcp.json</strong></summary>
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"hevy-mcp": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["-y", "@daveremy/hevy-mcp"],
|
|
107
|
+
"env": {
|
|
108
|
+
"HEVY_API_KEY": "your-api-key-here"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## Configuration
|
|
119
|
+
|
|
120
|
+
You can supply your Hevy API key in two ways:
|
|
121
|
+
|
|
122
|
+
1. Environment variable (`HEVY_API_KEY`)
|
|
123
|
+
2. Command-line argument (`--hevy-api-key=your_key` or `hevy-api-key=your_key` after `--` when using pnpm scripts)
|
|
124
|
+
|
|
125
|
+
Create a `.env` file in the project root (you can copy from [.env.sample](.env.sample)) with the following content if using the environment variable approach:
|
|
126
|
+
|
|
127
|
+
```env
|
|
128
|
+
HEVY_API_KEY=your_hevy_api_key_here
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Replace `your_hevy_api_key_here` with your actual Hevy API key. If you prefer the command argument approach you can skip setting the environment variable and start the server with for example:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pnpm start -- --hevy-api-key=your_hevy_api_key_here
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Sentry monitoring
|
|
138
|
+
|
|
139
|
+
`hevy-mcp` ships with Sentry monitoring baked into the built MCP server so
|
|
140
|
+
that usage and errors from published builds can be observed.
|
|
141
|
+
|
|
142
|
+
The server initializes `@sentry/node` with a fixed DSN, release name derived
|
|
143
|
+
from the package version, and tracing settings
|
|
144
|
+
directly in the code (see `src/index.ts`), and wraps the underlying
|
|
145
|
+
`McpServer` with `Sentry.wrapMcpServerWithSentry` so requests and tool calls
|
|
146
|
+
are captured by Sentry automatically. The configuration uses
|
|
147
|
+
`sendDefaultPii: false` to keep Sentry's default PII collection disabled.
|
|
148
|
+
|
|
149
|
+
There is currently no built-in toggle to disable Sentry for the published
|
|
150
|
+
package. If you need a build without Sentry telemetry, you can fork the
|
|
151
|
+
repository and remove the Sentry initialization in `src/index.ts`.
|
|
152
|
+
|
|
153
|
+
## Transport
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Stdio Only (Current)
|
|
157
|
+
|
|
158
|
+
**As of version 1.18.0, hevy-mcp only supports stdio transport.** HTTP/SSE
|
|
159
|
+
transport has been completely removed.
|
|
160
|
+
|
|
161
|
+
hevy-mcp runs exclusively over stdio, which works seamlessly with MCP-aware clients like Claude Desktop and Cursor. The server communicates via standard input/output streams using JSON-RPC messages.
|
|
162
|
+
|
|
163
|
+
### Migration from HTTP/SSE Transport
|
|
164
|
+
|
|
165
|
+
**If you were using HTTP or SSE transport in an older version (< 1.18.0), you must migrate to stdio.**
|
|
166
|
+
|
|
167
|
+
The HTTP/SSE transport was removed in v1.18.0 to simplify the codebase and focus
|
|
168
|
+
on the stdio-native MCP experience. If you're encountering errors like:
|
|
169
|
+
|
|
170
|
+
- `"stream is not readable"` when making HTTP requests
|
|
171
|
+
- `"HTTP transport mode has been removed from hevy-mcp"`
|
|
172
|
+
- Server messages about SSE mode on `http://localhost:3001`
|
|
173
|
+
|
|
174
|
+
You are likely running an outdated build or trying to connect with an HTTP-based client. Here's how to fix it:
|
|
175
|
+
|
|
176
|
+
#### Steps to Migrate:
|
|
177
|
+
|
|
178
|
+
1. **Update to the latest version:**
|
|
179
|
+
```bash
|
|
180
|
+
npx -y @daveremy/hevy-mcp@latest
|
|
181
|
+
# or if installed locally:
|
|
182
|
+
pnpm install @daveremy/hevy-mcp@latest
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
2. **Update your client configuration** to use stdio transport instead of HTTP. For example, in Cursor's `~/.cursor/mcp.json`:
|
|
186
|
+
|
|
187
|
+
**Old HTTP-based config (no longer supported):**
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"hevy-mcp": {
|
|
191
|
+
"url": "http://localhost:3001/sse"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**New stdio-based config (current):**
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"hevy-mcp": {
|
|
200
|
+
"command": "npx",
|
|
201
|
+
"args": ["-y", "@daveremy/hevy-mcp"],
|
|
202
|
+
"env": {
|
|
203
|
+
"HEVY_API_KEY": "your-api-key-here"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
3. **Clear any cached builds:**
|
|
210
|
+
```bash
|
|
211
|
+
# If you have a local clone, rebuild
|
|
212
|
+
pnpm run build
|
|
213
|
+
|
|
214
|
+
# Or remove node_modules and reinstall
|
|
215
|
+
rm -rf node_modules dist
|
|
216
|
+
pnpm install
|
|
217
|
+
pnpm run build
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
4. **Ensure you're not running a custom HTTP server.** If you have custom code that imports `createHttpServer()`, it will now throw an error. Remove those imports and use stdio transport instead.
|
|
221
|
+
|
|
222
|
+
If you absolutely need HTTP/SSE transport, you can use version `1.17.x` or earlier, but those versions are no longer maintained and contain known bugs (including the "stream is not readable" issue caused by middleware conflicts).
|
|
223
|
+
|
|
224
|
+
## Usage
|
|
225
|
+
|
|
226
|
+
### Development
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
pnpm run dev
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
This starts the MCP server in development mode with hot reloading.
|
|
233
|
+
|
|
234
|
+
### Production
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
pnpm run build
|
|
238
|
+
pnpm start
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Docker (deprecated)
|
|
242
|
+
|
|
243
|
+
Docker-based workflows have been retired so we can focus on the stdio-native experience. The bundled `Dockerfile` now exits with a clear message to prevent accidental builds, and `.dockerignore` simply documents the deprecation. Previously published images remain available on GHCR (for example `ghcr.io/chrisdoc/hevy-mcp:latest`), but they are **no longer updated**. For the best experience, run the server locally via `npx @daveremy/hevy-mcp` or your own Node.js runtime.
|
|
244
|
+
|
|
245
|
+
## Available MCP Tools
|
|
246
|
+
|
|
247
|
+
The server implements the following MCP tools for interacting with the Hevy API:
|
|
248
|
+
|
|
249
|
+
### Workout Tools
|
|
250
|
+
- `get-workouts`: Fetch and format workout data
|
|
251
|
+
- `get-workout`: Get a single workout by ID
|
|
252
|
+
- `create-workout`: Create a new workout
|
|
253
|
+
- `update-workout`: Update an existing workout
|
|
254
|
+
- `get-workout-count`: Get the total count of workouts
|
|
255
|
+
- `get-workout-events`: Get workout update/delete events
|
|
256
|
+
|
|
257
|
+
### Routine Tools
|
|
258
|
+
- `get-routines`: Fetch and format routine data
|
|
259
|
+
- `create-routine`: Create a new routine
|
|
260
|
+
- `update-routine`: Update an existing routine
|
|
261
|
+
- `get-routine-by-id`: Get a single routine by ID using direct endpoint
|
|
262
|
+
|
|
263
|
+
### Exercise Template Tools
|
|
264
|
+
- `get-exercise-templates`: Fetch exercise templates
|
|
265
|
+
- `get-exercise-template`: Get a template by ID
|
|
266
|
+
|
|
267
|
+
### Routine Folder Tools
|
|
268
|
+
- `get-routine-folders`: Fetch routine folders
|
|
269
|
+
- `create-routine-folder`: Create a new folder
|
|
270
|
+
- `get-routine-folder`: Get a folder by ID
|
|
271
|
+
|
|
272
|
+
### Webhook Tools
|
|
273
|
+
- `get-webhook-subscription`: Get the current webhook subscription
|
|
274
|
+
- `create-webhook-subscription`: Create a new webhook subscription
|
|
275
|
+
- `delete-webhook-subscription`: Delete the current webhook subscription
|
|
276
|
+
|
|
277
|
+
## Project Structure
|
|
278
|
+
|
|
279
|
+
```plaintext
|
|
280
|
+
hevy-mcp/
|
|
281
|
+
├── .env # Environment variables (API keys)
|
|
282
|
+
├── src/
|
|
283
|
+
│ ├── index.ts # Main entry point
|
|
284
|
+
│ ├── tools/ # Directory for MCP tool implementations
|
|
285
|
+
│ │ ├── workouts.ts # Workout-related tools
|
|
286
|
+
│ │ ├── routines.ts # Routine-related tools
|
|
287
|
+
│ │ ├── templates.ts # Exercise template tools
|
|
288
|
+
│ │ ├── folders.ts # Routine folder tools
|
|
289
|
+
│ │ └── webhooks.ts # Webhook subscription tools
|
|
290
|
+
│ ├── generated/ # API client (generated code)
|
|
291
|
+
│ │ ├── client/ # Kubb-generated client
|
|
292
|
+
│ │ │ ├── api/ # API client methods
|
|
293
|
+
│ │ │ ├── types/ # TypeScript types
|
|
294
|
+
│ │ │ ├── schemas/ # Zod schemas
|
|
295
|
+
│ │ │ └── mocks/ # Mock data
|
|
296
|
+
│ └── utils/ # Helper utilities
|
|
297
|
+
│ ├── config.ts # Env/CLI config parsing
|
|
298
|
+
│ ├── error-handler.ts # Tool error wrapper + response builder
|
|
299
|
+
│ ├── formatters.ts # Domain formatting helpers
|
|
300
|
+
│ ├── hevyClient.ts # API client factory
|
|
301
|
+
│ ├── httpServer.ts # Legacy HTTP transport (deprecated; throws explicit error; kept only for backward compatibility - removing may be breaking)
|
|
302
|
+
│ ├── response-formatter.ts # MCP response utilities
|
|
303
|
+
│ └── tool-helpers.ts # Zod schema -> TS type inference
|
|
304
|
+
├── scripts/ # Build and utility scripts
|
|
305
|
+
└── tests/ # Test suite
|
|
306
|
+
├── integration/ # Integration tests with real API
|
|
307
|
+
│ └── hevy-mcp.integration.test.ts # MCP server integration tests
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Development Guide
|
|
311
|
+
|
|
312
|
+
### Code Style
|
|
313
|
+
|
|
314
|
+
This project uses Biome for code formatting and linting:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
pnpm run check
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Testing
|
|
321
|
+
|
|
322
|
+
#### Run All Tests
|
|
323
|
+
|
|
324
|
+
To run all tests (unit and integration), use:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
pnpm test
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
> **Note:** `pnpm test` runs **all** tests. Integration tests will fail by design if
|
|
331
|
+
> `HEVY_API_KEY` is missing. If you don’t have an API key locally, use the unit
|
|
332
|
+
> test command below.
|
|
333
|
+
|
|
334
|
+
#### Run Only Unit Tests
|
|
335
|
+
|
|
336
|
+
To run only unit tests (excluding integration tests):
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
pnpm vitest run --exclude tests/integration/**
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Or with coverage:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
pnpm vitest run --coverage --exclude tests/integration/**
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### Run Only Integration Tests
|
|
349
|
+
|
|
350
|
+
To run only the integration tests (requires a valid `HEVY_API_KEY`):
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
pnpm vitest run tests/integration
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Note:** The integration tests will fail if the `HEVY_API_KEY` environment variable is not set. This is by design to ensure that the tests are always run with a valid API key.
|
|
357
|
+
|
|
358
|
+
##### GitHub Actions Configuration
|
|
359
|
+
|
|
360
|
+
For GitHub Actions:
|
|
361
|
+
|
|
362
|
+
1. Unit + integration tests are executed as part of the normal `Build and Test` workflow
|
|
363
|
+
2. Integration tests require the `HEVY_API_KEY` secret to be set
|
|
364
|
+
|
|
365
|
+
The workflow runs `pnpm vitest run --coverage` and provides `HEVY_API_KEY` from
|
|
366
|
+
repository secrets.
|
|
367
|
+
|
|
368
|
+
To set up the `HEVY_API_KEY` secret:
|
|
369
|
+
|
|
370
|
+
1. Go to your GitHub repository
|
|
371
|
+
2. Click on "Settings" > "Secrets and variables" > "Actions"
|
|
372
|
+
3. Click on "New repository secret"
|
|
373
|
+
4. Set the name to `HEVY_API_KEY` and the value to your Hevy API key
|
|
374
|
+
5. Click "Add secret"
|
|
375
|
+
|
|
376
|
+
If the secret is not set, the integration tests will fail (by design).
|
|
377
|
+
|
|
378
|
+
To set up Sentry secrets for source map uploads during builds:
|
|
379
|
+
|
|
380
|
+
The build process uses Sentry's Rollup plugin to upload source maps. You need to configure three secrets:
|
|
381
|
+
|
|
382
|
+
1. Go to your GitHub repository
|
|
383
|
+
2. Click on "Settings" > "Secrets and variables" > "Actions"
|
|
384
|
+
3. Add the following secrets:
|
|
385
|
+
- `SENTRY_ORG`: Your Sentry organization slug
|
|
386
|
+
- `SENTRY_PROJECT`: Your Sentry project slug
|
|
387
|
+
- `SENTRY_AUTH_TOKEN`: A Sentry auth token with `project:releases` scope
|
|
388
|
+
|
|
389
|
+
You can create a Sentry auth token at: https://sentry.io/settings/account/api/auth-tokens/
|
|
390
|
+
|
|
391
|
+
If these secrets are not set, the build will still succeed, but source maps will not be uploaded to Sentry.
|
|
392
|
+
|
|
393
|
+
Note: GitHub does not provide secrets to pull requests from forks by default, so
|
|
394
|
+
fork PRs may fail CI unless a maintainer reruns the checks with `HEVY_API_KEY`
|
|
395
|
+
available.
|
|
396
|
+
|
|
397
|
+
If CI is failing only because the fork PR is missing `HEVY_API_KEY`, that is
|
|
398
|
+
expected; maintainers may rerun the workflow with secrets enabled.
|
|
399
|
+
|
|
400
|
+
For contributors from forks: CI failures caused solely by missing `HEVY_API_KEY`
|
|
401
|
+
do not indicate a problem with your changes.
|
|
402
|
+
|
|
403
|
+
All other CI checks (build, formatting/linting, unit tests, etc.) are still
|
|
404
|
+
expected to pass.
|
|
405
|
+
|
|
406
|
+
Only failures caused solely by missing `HEVY_API_KEY` on forked PRs are
|
|
407
|
+
considered acceptable.
|
|
408
|
+
|
|
409
|
+
### Generating API Client
|
|
410
|
+
|
|
411
|
+
The API client is generated from the OpenAPI specification using [Kubb](https://kubb.dev/):
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
pnpm run export-specs
|
|
415
|
+
pnpm run build:client
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Kubb generates TypeScript types, API clients, Zod schemas, and mock data from the OpenAPI specification.
|
|
419
|
+
|
|
420
|
+
### Troubleshooting
|
|
421
|
+
|
|
422
|
+
- **Rollup optional dependency missing**: If you see an error similar to `Cannot find module @rollup/rollup-linux-x64-gnu`, set the environment variable `ROLLUP_SKIP_NODEJS_NATIVE_BUILD=true` before running `pnpm run build`. This forces Rollup to use the pure JavaScript fallback and avoids the npm optional dependency bug on some Linux runners.
|
|
423
|
+
|
|
424
|
+
## Skills
|
|
425
|
+
|
|
426
|
+
When installed as a Claude Code plugin, the `/hevy` skill is available with the following subcommands:
|
|
427
|
+
|
|
428
|
+
| Command | Description |
|
|
429
|
+
|---------|-------------|
|
|
430
|
+
| `/hevy` or `/hevy status` | Quick dashboard of recent activity |
|
|
431
|
+
| `/hevy log` | Log a new workout interactively |
|
|
432
|
+
| `/hevy history` | View recent workout history |
|
|
433
|
+
| `/hevy routines` | Browse and manage routines |
|
|
434
|
+
| `/hevy exercises` | Search exercise templates |
|
|
435
|
+
| `/hevy help` | Show available commands |
|
|
436
|
+
|
|
437
|
+
## License
|
|
438
|
+
|
|
439
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
440
|
+
|
|
441
|
+
## Contributing
|
|
442
|
+
|
|
443
|
+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
|
|
444
|
+
|
|
445
|
+
## Acknowledgements
|
|
446
|
+
|
|
447
|
+
- [Model Context Protocol](https://github.com/modelcontextprotocol) for the MCP SDK
|
|
448
|
+
- [Hevy](https://www.hevyapp.com/) for their fitness tracking platform and API
|
package/dist/cli.d.mts
ADDED
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Generated with tsdown
|
|
3
|
+
// https://tsdown.dev
|
|
4
|
+
(function() {
|
|
5
|
+
try {
|
|
6
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
|
|
7
|
+
e.SENTRY_RELEASE = { id: "0.1.2" };
|
|
8
|
+
var n = new e.Error().stack;
|
|
9
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "03cf150f-6466-4ca3-9cf1-e423cc0e3cd2", e._sentryDebugIdIdentifier = "sentry-dbid-03cf150f-6466-4ca3-9cf1-e423cc0e3cd2");
|
|
10
|
+
} catch (e) {}
|
|
11
|
+
})();
|
|
12
|
+
import { r as runServer } from "./src-CCpNxeP3.mjs";
|
|
13
|
+
//#region src/cli.ts
|
|
14
|
+
runServer().catch((error) => {
|
|
15
|
+
console.error("Fatal error in main():", error);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export {};
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=cli.mjs.map
|
package/dist/cli.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { runServer } from \"./index.js\";\n\nvoid runServer().catch((error) => {\n\tconsole.error(\"Fatal error in main():\", error);\n\tprocess.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;AAEK,WAAW,CAAC,OAAO,UAAU;AACjC,SAAQ,MAAM,0BAA0B,MAAM;AAC9C,SAAQ,KAAK,EAAE;EACd"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/index.d.ts
|
|
6
|
+
declare const serverConfigSchema: z.ZodObject<{
|
|
7
|
+
apiKey: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const configSchema: z.ZodObject<{
|
|
10
|
+
apiKey: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
type ServerConfig = z.infer<typeof serverConfigSchema>;
|
|
13
|
+
declare function createServer({
|
|
14
|
+
config
|
|
15
|
+
}: {
|
|
16
|
+
config: ServerConfig;
|
|
17
|
+
}): McpServer;
|
|
18
|
+
declare function runServer(): Promise<void>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { configSchema, createServer as default, runServer };
|
|
21
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Generated with tsdown
|
|
3
|
+
// https://tsdown.dev
|
|
4
|
+
(function() {
|
|
5
|
+
try {
|
|
6
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
|
|
7
|
+
e.SENTRY_RELEASE = { id: "0.1.2" };
|
|
8
|
+
var n = new e.Error().stack;
|
|
9
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a23492d3-dc93-45b6-9c01-6c2fef1c843d", e._sentryDebugIdIdentifier = "sentry-dbid-a23492d3-dc93-45b6-9c01-6c2fef1c843d");
|
|
10
|
+
} catch (e) {}
|
|
11
|
+
})();
|
|
12
|
+
import { n as createServer, r as runServer, t as configSchema } from "./src-CCpNxeP3.mjs";
|
|
13
|
+
export { configSchema, createServer as default, runServer };
|