Hevy MCP logo

Hevy MCP

MCP server for the Hevy fitness API — spec-generated schemas, dry-run-safe writes, easy setup.

Install Hevy MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "hevy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@diecoscai/hevy-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @diecoscai/hevy-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Tools23

What Hevy MCP lets your agent do. Expand a tool for its parameters.

Self-reported~447 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 80d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · @diecoscai/hevy-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads395Package downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed23Callable tools this server registers over MCP.

From the project README

@diecoscai/hevy-mcp

Model Context Protocol server for the Hevy fitness API. Manage workouts, routines, exercises, and body measurements from any MCP-compatible client — Claude Desktop, Claude Code, Cursor, VS Code, and anything else that speaks MCP over stdio.

npm version CI license node

Overview

This MCP server exposes the public Hevy API (api.hevyapp.com/v1) as 22 strongly-typed tools. LLM agents can list workouts, create routines, look up exercise templates, track body measurements, and follow a delta-sync feed — all without bespoke glue code on the client.

Design goals:

  • Safe by default. Write operations return a { dry_run: true, would_send: { ... } } preview unless HEVY_MCP_ALLOW_WRITES=1 is set. The Hevy API has no DELETE on any resource, so accidental writes are permanent; dry-run is the brake.
  • Validated at the edge. Every tool input is checked with Zod before a single byte crosses the network. Oversized titles, unknown fields, out-of-range page sizes, and invalid enums fail fast with SEP-1303-shaped errors the model can self-correct.
  • Zero extra setup. Authentication is a single environment variable — HEVY_API_KEY. No wizards, no config files; just paste the snippet for your client.

Schemas are generated from Hevy's own OpenAPI spec and re-synced automatically, so the server adapts to upstream changes instead of drifting. Writes are dry-run by default; every public endpoint is covered.

Project status

Maintenance mode. Feature-complete for Hevy's public API. Schemas are generated from Hevy's OpenAPI spec; a scheduled workflow re-syncs them weekly and opens a PR on any change, and a live integration run catches undocumented server changes. Bug reports and PRs welcome via the issue tracker.

Prerequisites

Quick setup

The fastest path is the setup subcommand — it validates your key and writes a config file the server picks up automatically:

Terminal
npx @diecoscai/hevy-mcp setup

It prompts for your Hevy Pro API key (from https://hevy.com/settings?developer), checks it against the live API, asks whether to enable write operations, and saves everything to ~/.config/hevy-mcp/config.json (mode 0600). Then add the server to your MCP client with no env block needed:

config.json
{
  "mcpServers": {
    "hevy": {
      "command": "npx",
      "args": ["-y", "@diecoscai/hevy-mcp"]
    }
  }
}

Restart the client — the 22 Hevy tools appear in the tools panel.

Prefer environment variables? Skip setup and pass HEVY_API_KEY (and optionally HEVY_MCP_ALLOW_WRITES=1) in the env block instead — see Configuration. Env vars always take precedence over the config file.

Note on bare invocation. Running npx @diecoscai/hevy-mcp with no arguments starts a stdio MCP server and blocks, waiting for an MCP client to connect over its stdin/stdout. You don't run it in a terminal yourself — your MCP client spawns it. Use npx @diecoscai/hevy-mcp --help, --version, or setup for a non-blocking invocation.

Write tools are dry-run by default. The first time you ask the server to create or update anything (a workout, a routine, a body measurement) you'll see a preview payload, not a real change. Enable writes by answering "yes" during setup, or by setting HEVY_MCP_ALLOW_WRITES=1 in the env block — see Safety.

Run from source

You can also run the server directly from a local clone instead of via npx. Useful if you want to pin a specific commit, debug a tool locally, or run an unreleased version. Contributors should use Development below instead.

bash
git clone https://github.com/diecoscai/hevy-mcp.git
cd hevy-mcp
npm ci
npm run build

Then point your MCP client at the built entry instead of npx @diecoscai/hevy-mcp:

config.json
{
  "mcpServers": {
    "hevy": {
      "command": "node",
      "args": ["/absolute/path/to/hevy-mcp/dist/index.js"],
      "env": {
        "HEVY_API_KEY": "PASTE_YOUR_KEY_HERE"
      }
    }
  }
}

The env block (including HEVY_MCP_ALLOW_WRITES) works identically to the npx snippets below.

Configuration

Each MCP client spawns the server as a stdio subprocess with HEVY_API_KEY in its env block.

Claude Desktop

Config path:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json (Anthropic does not ship an official Linux build of Claude Desktop as of 2026; the path applies only to unofficial community builds.)
config.json
{
  "mcpServers": {
    "hevy": {
      "command": "npx",
      "args": ["-y", "@diecoscai/hevy-mcp"],
      "env": {
        "HEVY_API_KEY": "PASTE_YOUR_KEY_HERE"
      }
    }
  }
}

Add "HEVY_MCP_ALLOW_WRITES": "1" to the env block to enable write tools.

Claude Code CLI

Terminal
claude mcp add hevy --env HEVY_API_KEY=PASTE_YOUR_KEY_HERE -- npx -y @diecoscai/hevy-mcp

To enable writes, append --env HEVY_MCP_ALLOW_WRITES=1.

Cursor

Config path: ~/.cursor/mcp.json. Same shape as Claude Desktop:

config.json
{
  "mcpServers": {
    "hevy": {
      "command": "npx",
      "args": ["-y", "@diecoscai/hevy-mcp"],
      "env": {
        "HEVY_API_KEY": "PASTE_YOUR_KEY_HERE"
      }
    }
  }
}

VS Code (native MCP support, 1.102+)

Create .vscode/mcp.json at the root of your workspace (or put the same shape under a user-level MCP config if your VS Code build supports one):

config.json
{
  "servers": {
    "hevy": {
      "command": "npx",
      "args": ["-y", "@diecoscai/hevy-mcp"],
      "env": {
        "HEVY_API_KEY": "PASTE_YOUR_KEY_HERE"
      }
    }
  }
}

If you use a third-party MCP extension that expects a different shape, check its docs — VS Code's native MCP integration landed in 1.102.

See docs/configuration.md for troubleshooting and client-specific notes, and docs/examples.md for end-to-end flows you can run with a connected MCP client.

Safety — dry-run writes

Every POST and PUT tool handler checks HEVY_MCP_ALLOW_WRITES at call time:

  • Unset (default) — the tool returns a preview instead of making the HTTP call:

    config.json
    {
      "dry_run": true,
      "would_send": {
        "method": "POST",
        "path": "/v1/routine_folders",
        "body": { "routine_folder": { "title": "Push days" } }
      },
      "hint": "set HEVY_MCP_ALLOW_WRITES=1 to execute"
    }
    
  • Set to 1 — the tool performs the real request.

The Hevy API has no DELETE endpoint on any resource. A bad write cannot be rolled back from the client — it will persist on your account until you manually fix it in the Hevy app. Dry-run is the first line of defence; explicit opt-in for writes is the second.

Tool reference (summary)

The server exposes 23 tools grouped by resource. See docs/tools.md for input schemas and examples.

User

ToolDescription
hevy_get_user_infoReturn the authenticated user (name, id, profile URL).

Workouts

ToolDescription
hevy_list_workoutsPaginated workouts (pageSize 1-10).
hevy_get_workoutFetch one workout by UUID.
hevy_get_workout_countTotal number of workouts on the account.
hevy_get_workout_eventsDelta-sync feed: updated / deleted events since a timestamp.
hevy_create_workoutLog a new workout (write — dry-run default).
hevy_update_workoutFull replace of an existing workout (write — dry-run default).

Routines

ToolDescription
hevy_list_routinesPaginated routines.
hevy_get_routineFetch one routine by UUID.
hevy_create_routineCreate a routine (write — dry-run default).
hevy_update_routineFull replace of a routine (write — dry-run default).

Routine folders

ToolDescription
hevy_list_routine_foldersPaginated folders.
hevy_get_routine_folderFetch one folder by positive integer id.
hevy_create_routine_folderCreate a folder (write — dry-run default).

Exercise templates

ToolDescription
hevy_list_exercise_templatesPaginated exercise library — the only list that accepts pageSize up to 100.
hevy_search_exercise_templatesSearch templates by name (case-insensitive substring). Resolves a human name (e.g. "bench press") to an exercise_template_id. Paginates the full catalog; results cached for an hour.
hevy_get_exercise_templateFetch one template by id (8-char hex for built-ins, UUID for custom).
hevy_create_exercise_templateCreate a custom exercise (write — dry-run default).
hevy_get_exercise_historyAll logged sets for a given exercise template.

Body measurements

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Hevy MCP

Hevy MCP is an MCP server that connects MCP-compatible clients to the Hevy fitness API through 22 strongly typed tools. It supports managing workouts, routines, exercises, and body measurements, including delta-sync workflows. Schemas are generated from Hevy’s OpenAPI specification, with edge validation and dry-run protection for write operations.

Run `npx @diecoscai/hevy-mcp setup` to validate your Hevy API key and save the server configuration automatically. Then add the provided `npx -y @diecoscai/hevy-mcp` command to your MCP client and restart it.

Hevy MCP authenticates with a `HEVY_API_KEY` environment variable or a key saved by the setup command. A Hevy Pro subscription and an API key from Hevy’s developer settings are required.

Hevy MCP runs write operations as dry runs by default, returning a preview of what would be sent. Set `HEVY_MCP_ALLOW_WRITES=1` to enable writes; because the Hevy API has no delete operation, writes are permanent.

Hevy MCP works with MCP-compatible clients including Claude Desktop, Claude Code, Cursor, and VS Code through the stdio transport.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHevy MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hevy-mcp?style=directory)](https://allmcps.com/mcp/hevy-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/hevy-mcp"><img src="https://allmcps.com/api/badge/hevy-mcp?style=directory" alt="Hevy MCP on AllMCPs" /></a>