A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API. This server enables AI assistants like Claude Desktop and Cursor to access and manage workout data, routines, and exercise templates through the Hevy API (requires PRO subscription).
- Features
- Quick Start
- Prerequisites
- Installation
- Why hevy-mcp?
- Configuration
- Available MCP Tools
- Development & Contributing
- Workout Management: Fetch, create, and update workouts.
- Routine Management: Access and manage workout routines.
- Exercise Templates: Browse available exercise templates with in-memory caching.
- Folder Organization: Manage routine folders.
- Webhook Subscriptions: Create, view, and delete webhook subscriptions for workout events.
Pick the workflow that fits your setup:
| Scenario | Command | Requirements |
|---|---|---|
| One-off stdio run | HEVY_API_KEY=sk_live... npx -y hevy-mcp |
Node.js β₯ 24, Hevy API key |
| Local development | npm install && npm run build && npm start |
.env with HEVY_API_KEY |
- Node.js: v24 or higher (strongly recommended to use the exact version pinned in
.nvmrc). - npm: v10 or higher.
- Hevy API key: Required for all operations (available with Hevy PRO).
You can launch the server directly without cloning:
HEVY_API_KEY=your_hevy_api_key_here npx -y hevy-mcp# Clone the repository
git clone https://github.com/chrisdoc/hevy-mcp.git
cd hevy-mcp
# Install dependencies
npm install
# Create .env and add your keys
cp .env.sample .env
# Edit .env and add your HEVY_API_KEYTo use this server with Claude Desktop, add the following to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hevy-mcp": {
"command": "npx",
"args": ["-y", "hevy-mcp"],
"env": {
"HEVY_API_KEY": "sk_live_your_key_here"
}
}
}
}Add this server under "mcpServers" in ~/.cursor/mcp.json:
{
"mcpServers": {
"hevy-mcp": {
"command": "npx",
"args": ["-y", "hevy-mcp"],
"env": {
"HEVY_API_KEY": "your-api-key-here"
}
}
}
}- π High Performance: Built with the Oxc toolchain (
oxlint/oxfmt) for near-instant linting and formatting. - π‘οΈ Type Safety: Fully type-safe implementation using Zod and Kubb-generated API clients.
- π Observability: Built-in Sentry monitoring for error tracking and performance profiling.
- β‘ Optimized: Includes in-memory caching for exercise templates to reduce API latency.
Supply your Hevy API key via:
- Environment Variable:
HEVY_API_KEY(in.envor system environment). - CLI Argument:
--hevy-api-key=your_key(after--in npm scripts).
# Example .env
HEVY_API_KEY=your_hevy_api_key_herehevy-mcp includes Sentry monitoring to observe errors and usage in production. It initializes @sentry/node with tracing enabled and PII collection disabled by default.
β οΈ Deprecation Notices (HTTP/SSE & Docker)
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.
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.
| Category | Tools |
|---|---|
| Workouts | get-workouts, get-workout, create-workout, update-workout, get-workout-count, get-workout-events |
| Routines | get-routines, get-routine-by-id, create-routine, update-routine |
| Templates | get-exercise-templates, get-exercise-template, search-exercise-templates |
| Folders | get-routine-folders, get-routine-folder, create-routine-folder |
| Webhooks | get-webhook-subscription, create-webhook-subscription, delete-webhook-subscription |
- Build:
npm run build - Lint/Format:
npm run check(uses oxlint/oxfmt) - Unit Tests:
npx vitest run --exclude tests/integration/** - Full Test Suite:
npm test(requiresHEVY_API_KEY)
For a detailed senior engineer guide, please refer to AGENTS.md.
The API client is automatically generated from the OpenAPI spec using Kubb:
npm run build:client- License: MIT
- Credits: Model Context Protocol, Hevy Fitness.
Contributions are welcome! Please open an issue or PR for any major changes.