{"_id":"@daveremy/hevy-mcp","_rev":"7-ca036890104bf0ae48d948c0795e2d56","name":"@daveremy/hevy-mcp","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.2":{"name":"@daveremy/hevy-mcp","version":"0.1.2","keywords":["mcp","hevy","fitness","api","model context protocol"],"author":{"name":"daveremy"},"license":"MIT","_id":"@daveremy/hevy-mcp@0.1.2","maintainers":[{"name":"daveremy","email":"email@daveremy.com"}],"contributors":[{"name":"Christoph Kieslich"}],"homepage":"https://github.com/daveremy/hevy-mcp#readme","bugs":{"url":"https://github.com/daveremy/hevy-mcp/issues"},"bin":{"hevy-mcp":"dist/cli.mjs"},"dist":{"shasum":"2acd7ce8a86b180a9a3578c4f35a5dbbfad96669","tarball":"https://registry.npmjs.org/@daveremy/hevy-mcp/-/hevy-mcp-0.1.2.tgz","fileCount":13,"integrity":"sha512-kyG4d93RTyqZRlEc5a2jRTKJ5P336FLBOqZ/VSlHisIOxUfty9Obn71hLYWG/eVDe4rxTY/3CTIuVerXOD/AyA==","signatures":[{"sig":"MEYCIQD3VyaGqAf0tnZtaJ9rjTQH1M6sfkgtxVerYdIRM4m+YwIhAOmFKivnIoOwVQThmCExHdfm3KAQ37AxKsoaIZlEp6U+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":204043},"main":"dist/index.mjs","type":"module","types":"dist/index.d.mts","module":"src/index.ts","engines":{"node":">=20.0.0"},"gitHead":"61a13e37e27be8cbc280bcfcba91dc354dbc7c8b","scripts":{"dev":"tsx watch --env-file .env --clear-screen=false src/cli.ts","test":"node --env-file .env node_modules/vitest/vitest.mjs --run","build":"tsdown","check":"biome check --write --unsafe","start":"node --env-file .env dist/cli.mjs","commit":"commit","inspect":"pnpm run build && pnpm dlx @modelcontextprotocol/inspector@latest node --env-file .env dist/index.mjs","openapi":"node ./scripts/openapi-spec.js","release":"semantic-release","check:types":"tsc --noEmit","inspect:npm":"pnpm dlx @modelcontextprotocol/inspector@latest pnpm dlx @daveremy/hevy-mcp@latest","build:client":"kubb generate","version:major":"pnpm version major","version:minor":"pnpm version minor","version:patch":"pnpm version patch","validate:openapi":"lint-openapi -c .ibm-openapi-validator.yaml openapi-spec.json"},"_npmUser":{"name":"daveremy","email":"email@daveremy.com"},"repository":{"url":"git+https://github.com/daveremy/hevy-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"zod":"^4.3.6","axios":"^1.13.5","@kubb/cli":"^4.27.4","@kubb/core":"^4.27.4","@sentry/node":"^10.39.0","@kubb/plugin-ts":"^4.27.4","@kubb/plugin-oas":"^4.27.4","@kubb/plugin-zod":"^4.27.4","@kubb/plugin-faker":"^4.27.4","@kubb/plugin-client":"^4.27.4","@modelcontextprotocol/sdk":"^1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c","devDependencies":{"tsx":"^4.21.0","tsdown":"^0.21.0","vitest":"^4.0.18","lefthook":"^2.1.1","cross-env":"^10.1.0","typescript":"^5.9.3","@types/node":"^25.3.0","@biomejs/biome":"2.4.6","@commitlint/cli":"^20.4.2","semantic-release":"^25.0.3","@vitest/coverage-v8":"^4.0.18","abstract-syntax-tree":"^2.22.0","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","@sentry/rollup-plugin":"^5.1.1","ibm-openapi-validator":"^1.37.11","@commitlint/prompt-cli":"^20.4.2","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.4.2","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"_npmOperationalInternal":{"tmp":"tmp/hevy-mcp_0.1.2_1773336805316_0.03905434524712925","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@daveremy/hevy-mcp","version":"0.1.3","keywords":["mcp","hevy","fitness","api","model context protocol"],"author":{"name":"daveremy"},"license":"MIT","_id":"@daveremy/hevy-mcp@0.1.3","maintainers":[{"name":"daveremy","email":"email@daveremy.com"}],"contributors":[{"name":"Christoph Kieslich"}],"homepage":"https://github.com/daveremy/hevy-mcp#readme","bugs":{"url":"https://github.com/daveremy/hevy-mcp/issues"},"bin":{"hevy-mcp":"dist/cli.mjs"},"dist":{"shasum":"cea6f4d0741c5091046dd7036a4cebae1b428ca5","tarball":"https://registry.npmjs.org/@daveremy/hevy-mcp/-/hevy-mcp-0.1.3.tgz","fileCount":13,"integrity":"sha512-n1372zDR/LqqhrWrYUIWszh94J3zFMSNReiCPHlfyhhrKrLHs0iuqOeK5QYSNr5a4jNfy6IxRQdHrS2QYidOtA==","signatures":[{"sig":"MEUCIDadXBIO6z54kGcGW54THRx5/geCSF8vuuQXiplYLABtAiEAqoWwb2E8oRyiwVUOxsCPxrCAwNjIJLFtlrS9XOUG4Fc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":204035},"main":"dist/index.mjs","type":"module","types":"dist/index.d.mts","module":"src/index.ts","engines":{"node":">=20.0.0"},"gitHead":"55b3847f4841c23492cd6eb52701581158869a4a","scripts":{"dev":"tsx watch --env-file .env --clear-screen=false src/cli.ts","test":"node --env-file .env node_modules/vitest/vitest.mjs --run","build":"tsdown","check":"biome check --write --unsafe","start":"node --env-file .env dist/cli.mjs","commit":"commit","inspect":"pnpm run build && pnpm dlx @modelcontextprotocol/inspector@latest node --env-file .env dist/index.mjs","openapi":"node ./scripts/openapi-spec.js","release":"semantic-release","check:types":"tsc --noEmit","inspect:npm":"pnpm dlx @modelcontextprotocol/inspector@latest pnpm dlx @daveremy/hevy-mcp@latest","build:client":"kubb generate","version:major":"pnpm version major","version:minor":"pnpm version minor","version:patch":"pnpm version patch","validate:openapi":"lint-openapi -c .ibm-openapi-validator.yaml openapi-spec.json"},"_npmUser":{"name":"daveremy","email":"email@daveremy.com"},"repository":{"url":"git+https://github.com/daveremy/hevy-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"zod":"^4.3.6","axios":"^1.13.5","@kubb/cli":"^4.27.4","@kubb/core":"^4.27.4","@sentry/node":"^10.39.0","@kubb/plugin-ts":"^4.27.4","@kubb/plugin-oas":"^4.27.4","@kubb/plugin-zod":"^4.27.4","@kubb/plugin-faker":"^4.27.4","@kubb/plugin-client":"^4.27.4","@modelcontextprotocol/sdk":"^1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c","devDependencies":{"tsx":"^4.21.0","tsdown":"^0.21.0","vitest":"^4.0.18","lefthook":"^2.1.1","cross-env":"^10.1.0","typescript":"^5.9.3","@types/node":"^25.3.0","@biomejs/biome":"2.4.6","@commitlint/cli":"^20.4.2","semantic-release":"^25.0.3","@vitest/coverage-v8":"^4.0.18","abstract-syntax-tree":"^2.22.0","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","@sentry/rollup-plugin":"^5.1.1","ibm-openapi-validator":"^1.37.11","@commitlint/prompt-cli":"^20.4.2","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.4.2","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"_npmOperationalInternal":{"tmp":"tmp/hevy-mcp_0.1.3_1773336973749_0.6338593316024896","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@daveremy/hevy-mcp","version":"0.2.0","main":"dist/index.mjs","module":"src/index.ts","types":"dist/index.d.mts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/daveremy/hevy-mcp.git"},"bugs":{"url":"https://github.com/daveremy/hevy-mcp/issues"},"homepage":"https://github.com/daveremy/hevy-mcp#readme","bin":{"hevy-mcp":"dist/cli.mjs"},"type":"module","keywords":["mcp","hevy","fitness","api","model context protocol"],"author":{"name":"daveremy"},"contributors":[{"name":"Christoph Kieslich"}],"license":"MIT","description":"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.","dependencies":{"@kubb/cli":"^4.27.4","@kubb/core":"^4.27.4","@kubb/plugin-client":"^4.27.4","@kubb/plugin-faker":"^4.27.4","@kubb/plugin-oas":"^4.27.4","@kubb/plugin-ts":"^4.27.4","@kubb/plugin-zod":"^4.27.4","@modelcontextprotocol/sdk":"^1.27.0","@sentry/node":"^10.39.0","axios":"^1.13.5","zod":"^4.3.6"},"devDependencies":{"@biomejs/biome":"2.4.6","@commitlint/cli":"^20.4.2","@commitlint/config-conventional":"^20.4.2","@commitlint/prompt-cli":"^20.4.2","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.6","@semantic-release/npm":"^13.1.4","@semantic-release/release-notes-generator":"^14.1.0","@sentry/rollup-plugin":"^5.1.1","@types/node":"^25.3.0","@vitest/coverage-v8":"^4.0.18","abstract-syntax-tree":"^2.22.0","cross-env":"^10.1.0","ibm-openapi-validator":"^1.37.11","lefthook":"^2.1.1","semantic-release":"^25.0.3","tsdown":"^0.21.0","tsx":"^4.21.0","typescript":"^5.9.3","vitest":"^4.0.18"},"engines":{"node":">=20.0.0"},"scripts":{"inspect":"pnpm run build && pnpm dlx @modelcontextprotocol/inspector@latest node --env-file .env dist/index.mjs","inspect:npm":"pnpm dlx @modelcontextprotocol/inspector@latest pnpm dlx @daveremy/hevy-mcp@latest","test":"node --env-file .env node_modules/vitest/vitest.mjs --run","openapi":"node ./scripts/openapi-spec.js","build":"tsdown","build:client":"kubb generate","validate:openapi":"lint-openapi -c .ibm-openapi-validator.yaml openapi-spec.json","start":"node --env-file .env dist/cli.mjs","dev":"tsx watch --env-file .env --clear-screen=false src/cli.ts","check":"biome check --write --unsafe","check:types":"tsc --noEmit","version:patch":"pnpm version patch","version:minor":"pnpm version minor","version:major":"pnpm version major","release":"semantic-release","commit":"commit"},"_id":"@daveremy/hevy-mcp@0.2.0","_integrity":"sha512-XEXTd+I0PftXLN/d5QSYtbjK+gJg2/a1XwKh3/Z+WxXB30/IHGityUj+6maUliSNJQBsUxkqFvP/yuciciV/Bw==","_resolved":"/private/var/folders/y1/w0p0g4454bq1_mbcfk9tql380000gn/T/891fda8cb45ac03fbc5aadd117362250/daveremy-hevy-mcp-0.2.0.tgz","_from":"file:daveremy-hevy-mcp-0.2.0.tgz","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-XEXTd+I0PftXLN/d5QSYtbjK+gJg2/a1XwKh3/Z+WxXB30/IHGityUj+6maUliSNJQBsUxkqFvP/yuciciV/Bw==","shasum":"5bfc201cc8b668c9382d3747847c5ebaed252039","tarball":"https://registry.npmjs.org/@daveremy/hevy-mcp/-/hevy-mcp-0.2.0.tgz","fileCount":13,"unpackedSize":209309,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGXifYSWr4s7P28lK0ot51nqhey6HSLg/0ouLO7dkUP7AiAZnzWJL6HolcR7JJ1RAjRshwF7o0T32F9sB+g8IZKdtg=="}]},"_npmUser":{"name":"daveremy","email":"email@daveremy.com"},"directories":{},"maintainers":[{"name":"daveremy","email":"email@daveremy.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hevy-mcp_0.2.0_1773349192757_0.6701188870516821"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-12T17:09:02.436Z","modified":"2026-03-12T20:59:53.059Z","0.1.0":"2026-03-12T17:09:02.656Z","0.1.1":"2026-03-12T17:21:27.159Z","0.1.2":"2026-03-12T17:33:25.470Z","0.1.3":"2026-03-12T17:36:13.904Z","0.2.0":"2026-03-12T20:59:52.919Z"},"bugs":{"url":"https://github.com/daveremy/hevy-mcp/issues"},"author":{"name":"daveremy"},"license":"MIT","homepage":"https://github.com/daveremy/hevy-mcp#readme","keywords":["mcp","hevy","fitness","api","model context protocol"],"repository":{"type":"git","url":"git+https://github.com/daveremy/hevy-mcp.git"},"description":"A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.","contributors":[{"name":"Christoph Kieslich"}],"maintainers":[{"name":"daveremy","email":"email@daveremy.com"}],"readme":"# hevy-mcp: Model Context Protocol Server for Hevy Fitness API\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n> **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.\n\nA 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).\n\n## Features\n\n- **Workout Management**: Fetch, create, and update workouts\n- **Routine Management**: Access and manage workout routines\n- **Exercise Templates**: Browse available exercise templates\n- **Folder Organization**: Manage routine folders\n- **Webhook Subscriptions**: Create, view, and delete webhook subscriptions for workout events\n\n> **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.\n\n## Claude Code Plugin Install\n\nInstall as a Claude Code plugin:\n\n```bash\nclaude plugin add @daveremy/hevy-mcp\n```\n\nThen set your Hevy API key when prompted. The `/hevy` skill becomes available for interacting with your fitness data.\n\n## Quick start\n\nPick the workflow that fits your setup:\n\n| Scenario | Command | Requirements |\n| --- | --- | --- |\n| One-off stdio run | `HEVY_API_KEY=sk_live... npx -y @daveremy/hevy-mcp` | Node.js ≥ 20, Hevy API key |\n| Local development | `pnpm install && pnpm run dev` | `.env` with `HEVY_API_KEY`, pnpm via Corepack |\n\n## Prerequisites\n\n- Node.js (v20 or higher; strongly recommended to use the exact version pinned in\n  `.nvmrc` to match CI)\n- pnpm (via Corepack)\n- A Hevy API key\n\n## Installation\n\n### Run via npx (recommended)\n\nYou can launch the server directly without cloning:\n\n```bash\nHEVY_API_KEY=your_hevy_api_key_here npx -y @daveremy/hevy-mcp\n```\n\n### Manual Installation\n```bash\n# Clone the repository\ngit clone https://github.com/daveremy/hevy-mcp.git\ncd hevy-mcp\n\n# Install dependencies\ncorepack use pnpm@10.22.0\npnpm install\n\n# Create .env and add your keys (never commit real keys)\ncp .env.sample .env\n# Edit .env and add your HEVY_API_KEY.\n```\n\n### Integration with Cursor\n\nTo use this MCP server with Cursor, add/merge this server entry under\n`\"mcpServers\"` in `~/.cursor/mcp.json`:\n\n```json\n{\n  \"hevy-mcp\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@daveremy/hevy-mcp\"],\n    \"env\": {\n      \"HEVY_API_KEY\": \"your-api-key-here\"\n    }\n  }\n}\n```\n\nMake sure to replace `your-api-key-here` with your actual Hevy API key.\n\nIf your `mcp.json` already contains other servers, do not replace the whole\nfile—merge the `\"hevy-mcp\"` entry into your existing `\"mcpServers\"` object.\n\nThe `\"hevy-mcp\"` key name is arbitrary. If you already have an existing config\nusing a different name (for example `\"hevy-mcp-server\"`), you can keep it.\n\nIf you already have an existing `\"mcpServers\"` object, merge the `\"hevy-mcp\"`\nentry into it without removing other servers.\n\n<details>\n<summary><strong>Example full ~/.cursor/mcp.json</strong></summary>\n\n```json\n{\n  \"mcpServers\": {\n    \"hevy-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@daveremy/hevy-mcp\"],\n      \"env\": {\n        \"HEVY_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n\n## Configuration\n\nYou can supply your Hevy API key in two ways:\n\n1. Environment variable (`HEVY_API_KEY`)\n2. Command-line argument (`--hevy-api-key=your_key` or `hevy-api-key=your_key` after `--` when using pnpm scripts)\n\nCreate 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:\n\n```env\nHEVY_API_KEY=your_hevy_api_key_here\n```\n\nReplace `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:\n\n```bash\npnpm start -- --hevy-api-key=your_hevy_api_key_here\n```\n\n### Sentry monitoring\n\n`hevy-mcp` ships with Sentry monitoring baked into the built MCP server so\nthat usage and errors from published builds can be observed.\n\nThe server initializes `@sentry/node` with a fixed DSN, release name derived\nfrom the package version, and tracing settings\ndirectly in the code (see `src/index.ts`), and wraps the underlying\n`McpServer` with `Sentry.wrapMcpServerWithSentry` so requests and tool calls\nare captured by Sentry automatically. The configuration uses\n`sendDefaultPii: false` to keep Sentry's default PII collection disabled.\n\nThere is currently no built-in toggle to disable Sentry for the published\npackage. If you need a build without Sentry telemetry, you can fork the\nrepository and remove the Sentry initialization in `src/index.ts`.\n\n## Transport\n\n\n### Stdio Only (Current)\n\n**As of version 1.18.0, hevy-mcp only supports stdio transport.** HTTP/SSE\ntransport has been completely removed.\n\nhevy-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.\n\n### Migration from HTTP/SSE Transport\n\n**If you were using HTTP or SSE transport in an older version (< 1.18.0), you must migrate to stdio.**\n\nThe HTTP/SSE transport was removed in v1.18.0 to simplify the codebase and focus\non the stdio-native MCP experience. If you're encountering errors like:\n\n- `\"stream is not readable\"` when making HTTP requests\n- `\"HTTP transport mode has been removed from hevy-mcp\"`\n- Server messages about SSE mode on `http://localhost:3001`\n\nYou are likely running an outdated build or trying to connect with an HTTP-based client. Here's how to fix it:\n\n#### Steps to Migrate:\n\n1. **Update to the latest version:**\n   ```bash\n   npx -y @daveremy/hevy-mcp@latest\n   # or if installed locally:\n   pnpm install @daveremy/hevy-mcp@latest\n   ```\n\n2. **Update your client configuration** to use stdio transport instead of HTTP. For example, in Cursor's `~/.cursor/mcp.json`:\n   \n   **Old HTTP-based config (no longer supported):**\n   ```json\n   {\n     \"hevy-mcp\": {\n       \"url\": \"http://localhost:3001/sse\"\n     }\n   }\n   ```\n   \n   **New stdio-based config (current):**\n   ```json\n   {\n     \"hevy-mcp\": {\n       \"command\": \"npx\",\n       \"args\": [\"-y\", \"@daveremy/hevy-mcp\"],\n       \"env\": {\n         \"HEVY_API_KEY\": \"your-api-key-here\"\n       }\n     }\n   }\n   ```\n\n3. **Clear any cached builds:**\n   ```bash\n   # If you have a local clone, rebuild\n   pnpm run build\n   \n   # Or remove node_modules and reinstall\n   rm -rf node_modules dist\n   pnpm install\n   pnpm run build\n   ```\n\n4. **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.\n\nIf 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).\n\n## Usage\n\n### Development\n\n```bash\npnpm run dev\n```\n\nThis starts the MCP server in development mode with hot reloading.\n\n### Production\n\n```bash\npnpm run build\npnpm start\n```\n\n### Docker (deprecated)\n\nDocker-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.\n\n## Available MCP Tools\n\nThe server implements the following MCP tools for interacting with the Hevy API:\n\n### Workout Tools\n- `get-workouts`: Fetch and format workout data\n- `get-workout`: Get a single workout by ID\n- `create-workout`: Create a new workout\n- `update-workout`: Update an existing workout\n- `get-workout-count`: Get the total count of workouts\n- `get-workout-events`: Get workout update/delete events\n\n### Routine Tools\n- `get-routines`: Fetch and format routine data\n- `create-routine`: Create a new routine\n- `update-routine`: Update an existing routine\n- `get-routine-by-id`: Get a single routine by ID using direct endpoint\n\n### Exercise Template Tools\n- `get-exercise-templates`: Fetch exercise templates\n- `get-exercise-template`: Get a template by ID\n\n### Routine Folder Tools\n- `get-routine-folders`: Fetch routine folders\n- `create-routine-folder`: Create a new folder\n- `get-routine-folder`: Get a folder by ID\n\n### Webhook Tools\n- `get-webhook-subscription`: Get the current webhook subscription\n- `create-webhook-subscription`: Create a new webhook subscription\n- `delete-webhook-subscription`: Delete the current webhook subscription\n\n## Project Structure\n\n```plaintext\nhevy-mcp/\n├── .env                   # Environment variables (API keys)\n├── src/\n│   ├── index.ts           # Main entry point\n│   ├── tools/             # Directory for MCP tool implementations\n│   │   ├── workouts.ts    # Workout-related tools\n│   │   ├── routines.ts    # Routine-related tools\n│   │   ├── templates.ts   # Exercise template tools\n│   │   ├── folders.ts     # Routine folder tools\n│   │   └── webhooks.ts    # Webhook subscription tools\n│   ├── generated/         # API client (generated code)\n│   │   ├── client/        # Kubb-generated client\n│   │   │   ├── api/       # API client methods\n│   │   │   ├── types/     # TypeScript types\n│   │   │   ├── schemas/   # Zod schemas\n│   │   │   └── mocks/     # Mock data\n│   └── utils/             # Helper utilities\n│       ├── config.ts              # Env/CLI config parsing\n│       ├── error-handler.ts       # Tool error wrapper + response builder\n│       ├── formatters.ts          # Domain formatting helpers\n│       ├── hevyClient.ts          # API client factory\n│       ├── httpServer.ts          # Legacy HTTP transport (deprecated; throws explicit error; kept only for backward compatibility - removing may be breaking)\n│       ├── response-formatter.ts  # MCP response utilities\n│       └── tool-helpers.ts        # Zod schema -> TS type inference\n├── scripts/               # Build and utility scripts\n└── tests/                 # Test suite\n    ├── integration/       # Integration tests with real API\n    │   └── hevy-mcp.integration.test.ts  # MCP server integration tests\n```\n\n## Development Guide\n\n### Code Style\n\nThis project uses Biome for code formatting and linting:\n\n```bash\npnpm run check\n```\n\n### Testing\n\n#### Run All Tests\n\nTo run all tests (unit and integration), use:\n\n```bash\npnpm test\n```\n\n> **Note:** `pnpm test` runs **all** tests. Integration tests will fail by design if\n> `HEVY_API_KEY` is missing. If you don’t have an API key locally, use the unit\n> test command below.\n\n#### Run Only Unit Tests\n\nTo run only unit tests (excluding integration tests):\n\n```bash\npnpm vitest run --exclude tests/integration/**\n```\n\nOr with coverage:\n\n```bash\npnpm vitest run --coverage --exclude tests/integration/**\n```\n\n#### Run Only Integration Tests\n\nTo run only the integration tests (requires a valid `HEVY_API_KEY`):\n\n```bash\npnpm vitest run tests/integration\n```\n\n**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.\n\n##### GitHub Actions Configuration\n\nFor GitHub Actions:\n\n1. Unit + integration tests are executed as part of the normal `Build and Test` workflow\n2. Integration tests require the `HEVY_API_KEY` secret to be set\n\nThe workflow runs `pnpm vitest run --coverage` and provides `HEVY_API_KEY` from\nrepository secrets.\n\nTo set up the `HEVY_API_KEY` secret:\n\n1. Go to your GitHub repository\n2. Click on \"Settings\" > \"Secrets and variables\" > \"Actions\"\n3. Click on \"New repository secret\"\n4. Set the name to `HEVY_API_KEY` and the value to your Hevy API key\n5. Click \"Add secret\"\n\nIf the secret is not set, the integration tests will fail (by design).\n\nTo set up Sentry secrets for source map uploads during builds:\n\nThe build process uses Sentry's Rollup plugin to upload source maps. You need to configure three secrets:\n\n1. Go to your GitHub repository\n2. Click on \"Settings\" > \"Secrets and variables\" > \"Actions\"\n3. Add the following secrets:\n   - `SENTRY_ORG`: Your Sentry organization slug\n   - `SENTRY_PROJECT`: Your Sentry project slug\n   - `SENTRY_AUTH_TOKEN`: A Sentry auth token with `project:releases` scope\n\n   You can create a Sentry auth token at: https://sentry.io/settings/account/api/auth-tokens/\n\nIf these secrets are not set, the build will still succeed, but source maps will not be uploaded to Sentry.\n\nNote: GitHub does not provide secrets to pull requests from forks by default, so\nfork PRs may fail CI unless a maintainer reruns the checks with `HEVY_API_KEY`\navailable.\n\nIf CI is failing only because the fork PR is missing `HEVY_API_KEY`, that is\nexpected; maintainers may rerun the workflow with secrets enabled.\n\nFor contributors from forks: CI failures caused solely by missing `HEVY_API_KEY`\ndo not indicate a problem with your changes.\n\nAll other CI checks (build, formatting/linting, unit tests, etc.) are still\nexpected to pass.\n\nOnly failures caused solely by missing `HEVY_API_KEY` on forked PRs are\nconsidered acceptable.\n\n### Generating API Client\n\nThe API client is generated from the OpenAPI specification using [Kubb](https://kubb.dev/):\n\n```bash\npnpm run export-specs\npnpm run build:client\n```\n\nKubb generates TypeScript types, API clients, Zod schemas, and mock data from the OpenAPI specification.\n\n### Troubleshooting\n\n- **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.\n\n## Skills\n\nWhen installed as a Claude Code plugin, the `/hevy` skill is available with the following subcommands:\n\n| Command | Description |\n|---------|-------------|\n| `/hevy` or `/hevy status` | Quick dashboard of recent activity |\n| `/hevy log` | Log a new workout interactively |\n| `/hevy history` | View recent workout history |\n| `/hevy routines` | Browse and manage routines |\n| `/hevy exercises` | Search exercise templates |\n| `/hevy help` | Show available commands |\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions 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.\n\n## Acknowledgements\n\n- [Model Context Protocol](https://github.com/modelcontextprotocol) for the MCP SDK\n- [Hevy](https://www.hevyapp.com/) for their fitness tracking platform and API\n","readmeFilename":"README.md"}