Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hevy-mcp

> 编程语言
Open source

Manage your Hevy workouts, routines, folders, and exercise templates. Create and update sessions faster, organize plans, and search exercises to build workouts

373 stars0 likes1 views
WebsiteGitHub

About

Manage your Hevy workouts, routines, folders, and exercise templates. Create and update sessions faster, organize plans, and search exercises to build workouts

Hevy MCP Server

Hevy CLI

Prefer the terminal? The separate @chrisdoc/hevy-cli package reads workouts, routines, exercises, and body measurements directly from the Hevy API, and can create or update those resources with explicit confirmation. Deletion is not supported.

bash
npm install -g @chrisdoc/hevy-cli
export HEVY_API_KEY=your-hevy-api-key

hevy workouts list --page-size 10
hevy summary --weeks 4

Add --json to any command for scripts and pipelines. The CLI is a standalone Hevy API client, not an MCP wrapper. See packages/cli/README.md for the full command reference, pagination behavior, and exit codes.

hevy-mcp is an open-source Model Context Protocol (MCP) server for the Hevy fitness and workout tracking app. It lets AI assistants read, analyze, create, and update your Hevy workouts, routines, exercise templates, and body measurements through authenticated Hevy API requests.

The repository is organized as a private workspace with explicit runtime boundaries: @hevy-mcp/hevy-client owns the web-safe Hevy client, @hevy-mcp/operations owns reusable Hevy domain operations, @hevy-mcp/core owns MCP tools and server construction, hevy-mcp is the published Node.js stdio adapter, @hevy-mcp/worker is the private Cloudflare HTTP/OAuth adapter, and @chrisdoc/hevy-cli is the standalone CLI. Node and CLI are the public packages.

The public HevyClient remains Promise-based, while @hevy-mcp/operations provides Effect-first domain programs for reads, mutations, and composite workflows. Effect is also the control structure for the request runtime: @hevy-mcp/hevy-client owns retry schedules, per-attempt timeouts, and interruption, rather than using Effect only as a delay calculator. MCP tools and CLI commands collapse each invocation once at their Promise adapter boundary. The MCP catalog remains 22 tools.

The runtime has three nested scopes:

  1. Process Scope: the Node lifecycle owns telemetry, signal handlers, and transport shutdown.
  2. Server Scope: core owns the MCP runtime and the exercise-template cache, including finalization when the server closes.
  3. Request Scope: each tool or resource invocation carries its deadline and MCP request signal, so fiber interruption reaches the Hevy request.

These scopes do not change the supported Promise façades. Public HevyClient methods, createHevyMcpServer, createNodeMcpServer, runStdioServer / runServer, operation .execute(), and CLI execute / runCli remain usable without requiring callers to construct Effect programs.

The Worker adapter is not Effect-wide: its OAuth, bindings, and request handling remain platform-specific Promise code; only the validation-cache retry is Effect-controlled. Tool input and response contracts remain Zod contracts, environment and CLI parsing remain throwing parsers, and generated Kubb API functions and .kubb internals are not public API.

A Hevy API key, available with Hevy PRO, is required.

See it in action

Click the preview to play the full-quality 18-second demo.

In the demo, the assistant retrieves real Hevy data and answers a multi-part training question with evidence from the user's workout history.

What can you do with it?

  • Analyze training progress: summarize 1-12 weeks of workouts and body measurements in one tool call.
  • Ask questions in plain language: find recent sessions, frequently trained exercises, consistency gaps, routine details, or exercise history.
  • Plan and log training: create or update workouts, routines, routine folders, custom exercises, and body measurements.
  • Search without huge responses: discover routines and exercise templates with compact, AI-friendly results.
  • Connect from your preferred MCP client: use the hosted Streamable HTTP endpoint or run locally with Codex, Claude Desktop, Cursor, and other clients.
  • Start without installing anything: connect directly to the production Cloudflare Worker—no Node.js, package download, or Docker container required.
  • Keep local control when you want it: run the same server with npx, bunx, or the official Docker image.

Try asking:

Analyze my training over the last six weeks. Show workouts per week, my most frequently trained exercises, any obvious gaps or inconsistencies, and cite the workout evidence you used.

Find my push-day routine and show its exercises and sets.

Compare my recent body measurements with my training consistency.

Create a completed workout from my saved routine. Ask me for any missing set results before writing it to Hevy.

Claude integration

The repository includes a Claude plugin that connects to the hosted OAuth-enabled MCP endpoint without embedding a user's Hevy API key.

Claude.ai and Claude Desktop

In Claude, open Settings → Connectors → Add custom connector and enter:

https://mcp.hevy-mcp.dev/mcp

Complete the OAuth flow and enter the Hevy API key when prompted. The same remote endpoint can be used by Claude Desktop and other clients that support remote MCP connectors.

Claude Code and Cowork

The Claude plugin is defined by .claude-plugin/plugin.json and .mcp.json. Install it from this public repository or from the Claude Plugin Directory after publication. It adds the hosted Hevy MCP connector and the Hevy workout skill.

See the privacy policy for the hosted service's data handling details.

Quick start

1. Get your Hevy API key

Create an API key in Hevy's API settings, then keep it somewhere secure. API access currently requires a Hevy PRO subscription.

2. Connect hevy-mcp to your client

The hosted Cloudflare endpoint is the fastest way to start. It runs remotely, so your client does not need Node.js, Bun, Docker, or a local server process.

Connect to the hosted endpoint

Production URL:

https://mcp.hevy-mcp.dev/mcp

The endpoint uses Streamable HTTP. Send your Hevy API key as a bearer token on every request.

Codex

Codex CLI, the Codex desktop app, and the IDE extension share the same MCP configuration. Make your Hevy API key available in the environment that starts Codex, then add the hosted server:

bash
export HEVY_API_KEY=your-hevy-api-key
codex mcp add hevy \
  --url https://mcp.hevy-mcp.dev/mcp \
  --bearer-token-env-var HEVY_API_KEY

Codex stores the environment variable name, not the key itself, in its MCP configuration. Restart Codex or begin a new session, then run codex mcp list to verify the server is configured.

Other Streamable HTTP clients

Clients that accept a remote MCP URL and fixed headers commonly use this shape:

json
{
	"mcpServers": {
		"hevy": {
			"url": "https://mcp.hevy-mcp.dev/mcp",
			"headers": {
				"Authorization": "Bearer your-hevy-api-key"
			}
		}
	}
}

Exact configuration keys vary by client. The hosted server requires support for Streamable HTTP and a fixed Authorization header.

[!IMPORTANT] Treat the bearer value like a password. The Worker validates it with Hevy for each request, does not store it, and forwards it to Hevy only as the required api-key header.

Run locally instead

Choose local stdio if you prefer to run the server on your own machine or your client cannot attach a fixed authorization header to remote MCP requests.

Codex
bash
codex mcp add hevy \
  --env HEVY_API_KEY=your-hevy-api-key \
  -- npx -y hevy-mcp
Claude Desktop or Cursor

Add this mcpServers entry to your client configuration:

json
{
	"mcpServers": {
		"hevy": {
			"command": "npx",
			"args": ["-y", "hevy-mcp"],
			"env": {
				"HEVY_API_KEY": "your-hevy-api-key"
			}
		}
	}
}
Google Antigravity

There are two ways to configure the Hevy MCP server for Google Antigravity (agy):

Option A: Automatic Plugin Installation (Recommended)

This utilizes the built-in plugin system:

  1. Install the plugin:

    bash
    agy plugin install https://github.com/chrisdoc/hevy-mcp
  2. Provide the HEVY_API_KEY in your host shell environment so the CLI child process can inherit it:

    • Persistent: Save the environment variable HEVY_API_KEY in your system/shell configurations:
      • macOS / Linux: Add it to your shell profile configurations (e.g., ~/.zshrc or ~/.bashrc):
        bash
        export HEVY_API_KEY="your-actual-api-key"
      • Windows: Add it to your User or System Environment Variables. In PowerShell, you can run:
        powershell
        [Environment]::SetEnvironmentVariable("HEVY_API_KEY", "your-actual-api-key", "User")
    • Temporary (Session-only): If you do not want to persist the key, export it in your active terminal session before running agy:
      bash
      export HEVY_API_KEY="your-actual-api-key"
Option B: Manual Configuration (No Plugin)

If you prefer configuring it statically via the global configuration file:

  1. Open your global MCP configuration file:

    • Location: ~/.gemini/config/mcp_config.json
  2. Add the hevy configuration block under the mcpServers key. Make sure to merge this entry with any existing servers you have configured rather than replacing the entire file contents:

    json
    {
        "mcpServers": {
            "hevy": {
                "command": "npx",
                "args": ["-y", "hevy-mcp"],
                "env": {
                    "HEVY_API_KEY": "your-actual-api-key"
                }
            }
        }
    }

Common local configuration locations:

  • Claude Desktop on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Claude Desktop on Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Cursor: ~/.cursor/mcp.json

Restart or reconnect the client after saving the file.

Any stdio MCP client

Configure your client to launch this command with HEVY_API_KEY in the child process environment:

bash
npx -y hevy-mcp

npx requires Node.js 20 or newer. Restart or reconnect your client after saving its configuration.

Use bunx instead

Requires Bun:

json
{
	"mcpServers": {
		"hevy": {
			"command": "bunx",
			"args": ["hevy-mcp@latest"],
			"env": {
				"HEVY_API_KEY": "your-hevy-api-key"
			}
		}
	}
}

Use Docker instead

Official images support linux/amd64 and linux/arm64. Keep stdin open with -i because the container runs the stdio MCP server:

bash
export HEVY_API_KEY=your-hevy-api-key
docker run -i --rm -e HEVY_API_KEY ghcr.io/chrisdoc/hevy-mcp:latest

For an MCP client, store the key in a protected environment file and configure the client to launch Docker:

json
{
	"mcpServers": {
		"hevy": {
			"command": "docker",
			"args": [
				"run",
				"-i",
				"--rm",
				"--env-file",
				"/absolute/path/to/hevy-mcp.env",
				"ghcr.io/chrisdoc/hevy-mcp:latest"
			]
		}
	}
}

Pin an exact image tag such as ghcr.io/chrisdoc/hevy-mcp:X.Y.Z when you need reproducible upgrades.

You can also add the npm server to supported clients with add-mcp:

bash
npx add-mcp hevy-mcp --env "HEVY_API_KEY=your-hevy-api-key"

3. Ask your first question

Try one of these after restarting or reconnecting your MCP client:

  • “Give me a training summary for the last four weeks.”
  • “What routines do I have saved on Hevy?”
  • “Show my three most recent workouts.”
  • “Find exercise templates containing squat.”
  • “Which Hevy account is connected?”

Your assistant should ask for approval before mutation tools when the client supports tool confirmations.

How it works

Hosted:  Your AI assistant  →  Streamable HTTP  →  Cloudflare Worker  →  Hevy API
Local:   Your AI assistant

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptclaudecodexfitnesshevy

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言