Skip to main content
Glama

hevy-mcp-remote: Hosted / gateway-ready MCP for Hevy Fitness

License: MIT Build Docker image ghcr.io

Fork notice. This is an independently-maintained fork of chrisdoc/hevy-mcp, repackaged for multi-tenant MCP gateways. It ships the same Hevy tools wrapped in supergateway as an OCI image that speaks MCP streamable-HTTP over HTTP, instead of stdio. Use the upstream hevy-mcp npm package for local/stdio use in Claude Desktop, Cursor, etc.

A Model Context Protocol (MCP) server for the Hevy fitness tracking app, packaged as a supergateway-wrapped OCI image for hosting behind an MCP gateway. Exposes MCP streamable-HTTP on /mcp and health on /healthz; reads HEVY_API_KEY from the container environment.


📋 Table of Contents


Related MCP server: Hevy MCP

🚀 Features

  • 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.


🏁 Quick Start

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


🛠️ Prerequisites

  • 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).


📦 Installation

You can launch the server directly without cloning:

HEVY_API_KEY=your_hevy_api_key_here npx -y hevy-mcp

Manual Installation

# 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_KEY

🔗 Integration

Claude Desktop Configuration

To 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"
			}
		}
	}
}

Cursor Configuration

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"
			}
		}
	}
}

✨ Why hevy-mcp?

  • 🚀 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.


⚙️ Configuration

Supply your Hevy API key via:

  1. Environment Variable: HEVY_API_KEY (in .env or system environment).

  2. CLI Argument: --hevy-api-key=your_key (after -- in npm scripts).

# Example .env
HEVY_API_KEY=your_hevy_api_key_here

📡 Sentry Monitoring

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.


🐳 Running behind an MCP gateway (supergateway contract)

The MCP server itself speaks stdio only. For multi-tenant gateway deployments (e.g. mcp-gateway-poc), this repo ships a Dockerfile that wraps the stdio binary with supergateway so a single container exposes MCP streamable-HTTP.

The image follows the same contract every gateway-hosted MCP uses:

  • MCP streamable-HTTP on 0.0.0.0:$PORT at /mcp

  • Health endpoint at /healthz

  • Stateful sessions (Mcp-Session-Id honored)

  • HEVY_API_KEY is read from the container environment and passed to the spawned stdio child

Images are published to ghcr.io/rwestergren/hevy-mcp from main and from any manually cut GitHub release. Build locally with:

docker build -t hevy-mcp:local .
docker run --rm -e HEVY_API_KEY=sk_live_... -p 8080:8080 hevy-mcp:local
curl http://localhost:8080/healthz

End users running hevy-mcp directly should use the stdio/npx flow above; the Docker image is aimed at gateway operators, not individual clients.


🛠️ Available MCP Tools

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


👨‍💻 Development & Contributing

Quick Commands

  • 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 (requires HEVY_API_KEY)

For a detailed senior engineer guide, please refer to AGENTS.md.

API Client Generation

The API client is automatically generated from the OpenAPI spec using Kubb:

npm run build:client

📄 License & Acknowledgements


Contributions are welcome! Please open an issue or PR for any major changes.

Available Tools

25 tools
create-body-measurementA

Create a body measurement entry for a given date. All measurement fields are optional. Returns 409 if an entry already exists for that date — use update-body-measurement instead.

Inputs: date (required), hips, waist, neckCm, +14 more.

create-exercise-templateB

Create a custom exercise template with title, type, equipment, and muscle groups.

Inputs: title (required), muscleGroup (required), exerciseType (required), equipmentCategory (required), +1 more.

create-routineA

Create a new workout routine in your Hevy account. Requires a title and at least one exercise with sets. Optionally assign to a folder. Returns the full routine details including the new routine ID.

Inputs: title (required), notes, folderId, exercises.

create-routine-folderA

Create a new routine folder in your Hevy account. Requires a name for the folder. Returns the full folder details including the new folder ID.

Inputs: name (required).

create-webhook-subscriptionA

Create a new webhook subscription for this account. The webhook will receive POST requests when workouts are created. Your endpoint must respond with 200 OK within 5 seconds.

Inputs: url (required), authToken.

create-workoutA

Create a new workout in your Hevy account. Requires title, start/end times, and at least one exercise with sets. Returns the complete workout details upon successful creation including the newly assigned workout ID.

Inputs: title (required), endTime (required), startTime (required), exercises, +2 more.

delete-webhook-subscriptionA

Delete the current webhook subscription for this account. This will stop all webhook notifications.

Inputs: no named parameters.

get-body-measurementA

Get a single body measurement by date. Returns all measurement fields for the specified date.

Inputs: date (required).

get-body-measurementsA

Get a paginated list of body measurements for the authenticated user. Returns measurements including weight, body fat, and various circumference measurements.

Inputs: page, pageSize.

get-exercise-historyA

Get past sets for a specific exercise template, optionally filtered by start and end dates.

Inputs: exerciseTemplateId (required), endDate, startDate.

get-exercise-templateA

Get complete details of a specific exercise template by its ID, including name, category, equipment, muscle groups, and notes.

Inputs: exerciseTemplateId (required).

get-exercise-templatesA

Get a paginated list of exercise templates (default and custom) with details like name, category, equipment, and muscle groups. Useful for browsing or searching available exercises.

Inputs: page, pageSize.

get-routineA

Get a routine by its ID using the direct endpoint. Returns all details for the specified routine.

Inputs: routineId (required).

get-routine-folderA

Get complete details of a specific routine folder by its ID, including name, creation date, and associated routines.

Inputs: folderId (required).

get-routine-foldersA

Get a paginated list of your routine folders, including both default and custom folders. Useful for organizing and browsing your workout routines.

Inputs: page, pageSize.

get-routinesA

Get a paginated list of your workout routines, including custom and default routines. Useful for browsing or searching your available routines.

Inputs: page, pageSize.

get-webhook-subscriptionA

Get the current webhook subscription for this account. Returns the webhook URL and auth token if a subscription exists.

Inputs: no named parameters.

get-workoutA

Get complete details of a specific workout by ID. Returns all workout information including title, description, start/end times, and detailed exercise data.

Inputs: workoutId (required).

get-workout-countA

Get the total number of workouts on the account. Useful for pagination or statistics.

Inputs: no named parameters.

get-workout-eventsA

Retrieve a paged list of workout events (updates or deletes) since a given date. Events are ordered from newest to oldest. The intention is to allow clients to keep their local cache of workouts up to date without having to fetch the entire list of workouts.

Inputs: page, since, pageSize.

get-workoutsA

Get a paginated list of workouts. Returns workout details including title, description, start/end times, and exercises performed. Results are ordered from newest to oldest.

Inputs: page, pageSize.

search-exercise-templatesA

Search exercise templates by name with optional muscle group filter. Fetches all templates from the Hevy API on first call and caches them in memory for subsequent searches. Use refresh:true to force a re-fetch.

Inputs: query (required), refresh, primaryMuscleGroup.

update-body-measurementA

Update an existing body measurement entry for a given date. All fields are overwritten — omitted fields are set to null. Returns 404 if no entry exists for the date.

Inputs: date (required), hips, waist, neckCm, +14 more.

update-routineA

Update an existing routine by ID. You can modify the title, notes, and exercise configurations. Returns the updated routine with all changes applied.

Inputs: title (required), routineId (required), notes, exercises.

update-workoutA

Update an existing workout by ID. You can modify the title, description, start/end times, privacy setting, and exercise data. Returns the updated workout with all changes applied.

Inputs: title (required), endTime (required), startTime (required), workoutId (required), +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 25 tools

    Disambiguation5/5

    Every tool targets a distinct resource and action, with clear list-vs-single patterns (e.g., get-workouts vs get-workout, get-routine-folders vs get-routine-folder). No two tools have overlapping purposes, and the descriptions make each tool's role unambiguous.

    Naming Consistency5/5

    All tool names follow a consistent verb-noun pattern using lowercase with hyphens (e.g., get-workout, create-routine, update-body-measurement). The naming is uniform across all resources (workouts, routines, exercises, body measurements, webhooks), making it predictable and easy to navigate.

    Tool Count4/5

    With 25 tools, the count is at the high boundary but justified by the breadth of the domain: workouts, routines, exercise templates, body measurements, and webhooks each need their own CRUD or query operations. Every tool serves a distinct purpose, so the count feels appropriate rather than bloated.

    Completeness2/5

    The toolset covers create, read, and update for most resources, but notably lacks delete operations for workouts, routines, routine folders, exercise templates, and body measurements. This creates dead ends (e.g., an agent cannot remove a workout or a routine), and some resources like exercise templates have no update capability. The gaps are significant enough to hinder common workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API. This server enables AI assistants to access and manage workout data, routines, exercise templates, and more through the Hevy API (requires PRO subscription).
      23
      550
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects AI clients to the Hevy workout tracking app, allowing users to manage routines and exercises. It enables reading workout history and logging new fitness sessions through simple natural language commands.
      -
    • A
      license
      A
      quality
      C
      maintenance
      An MCP server that interfaces with the Hevy fitness tracking API, enabling AI assistants to manage workouts, routines, exercise templates, and more via natural language.
      26
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A Model Context Protocol (MCP) server that provides AI assistants with access to the Hevy fitness tracking API. This allows you to log workouts, manage routines, browse exercises, and track your fitness progress directly through AI chat interfaces.
      -