hevy-mcp 1.13.2 → 1.14.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 CHANGED
@@ -95,6 +95,21 @@ Replace `your_hevy_api_key_here` with your actual Hevy API key. If you prefer th
95
95
  pnpm start -- --hevy-api-key=your_hevy_api_key_here
96
96
  ```
97
97
 
98
+ ### Sentry monitoring
99
+
100
+ `hevy-mcp` ships with Sentry monitoring baked into the built MCP server so
101
+ that usage and errors from published builds can be observed.
102
+
103
+ The server initializes `@sentry/node` with a fixed DSN and tracing settings
104
+ directly in the code (see `src/index.ts`), and wraps the underlying
105
+ `McpServer` with `Sentry.wrapMcpServerWithSentry` so requests and tool calls
106
+ are captured by Sentry automatically. The configuration uses
107
+ `sendDefaultPii: false` to keep Sentry's default PII collection disabled.
108
+
109
+ There is currently no built-in toggle to disable Sentry for the published
110
+ package. If you need a build without Sentry telemetry, you can fork the
111
+ repository and remove the Sentry initialization in `src/index.ts`.
112
+
98
113
  ## Transport
99
114
 
100
115
  ### Deploy via Smithery (TypeScript runtime)
@@ -299,4 +314,4 @@ Contributions are welcome! Please feel free to submit a Pull Request. For major
299
314
  ## Acknowledgements
300
315
 
301
316
  - [Model Context Protocol](https://github.com/modelcontextprotocol) for the MCP SDK
302
- - [Hevy](https://www.hevyapp.com/) for their fitness tracking platform and API
317
+ - [Hevy](https://www.hevyapp.com/) for their fitness tracking platform and API
package/dist/cli.js CHANGED
@@ -4,13 +4,14 @@
4
4
 
5
5
  // src/index.ts
6
6
  import dotenvx from "@dotenvx/dotenvx";
7
+ import * as Sentry from "@sentry/node";
7
8
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
9
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
10
  import { z as z6 } from "zod";
10
11
 
11
12
  // package.json
12
13
  var name = "hevy-mcp";
13
- var version = "1.13.1";
14
+ var version = "1.14.0";
14
15
 
15
16
  // src/tools/folders.ts
16
17
  import { z } from "zod";
@@ -1232,15 +1233,23 @@ function createClient2(apiKey, baseUrl) {
1232
1233
 
1233
1234
  // src/index.ts
1234
1235
  dotenvx.config({ quiet: true });
1236
+ var sentryConfig = {
1237
+ dsn: "https://ce696d8333b507acbf5203eb877bce0f@o4508975499575296.ingest.de.sentry.io/4509049671647312",
1238
+ // Tracing must be enabled for MCP monitoring to work
1239
+ tracesSampleRate: 1,
1240
+ sendDefaultPii: false
1241
+ };
1242
+ Sentry.init(sentryConfig);
1235
1243
  var HEVY_API_BASEURL = "https://api.hevyapp.com";
1236
1244
  var serverConfigSchema = z6.object({
1237
1245
  apiKey: z6.string().min(1, "Hevy API key is required").describe("Your Hevy API key (available in the Hevy app settings).")
1238
1246
  });
1239
1247
  function buildServer(apiKey) {
1240
- const server = new McpServer({
1248
+ const baseServer = new McpServer({
1241
1249
  name,
1242
1250
  version
1243
1251
  });
1252
+ const server = Sentry.wrapMcpServerWithSentry(baseServer);
1244
1253
  const hevyClient = createClient2(apiKey, HEVY_API_BASEURL);
1245
1254
  console.error("Hevy client initialized with API key");
1246
1255
  registerWorkoutTools(server, hevyClient);