hevy-mcp

hevy-mcp

A Model Context Protocol server that connects Claude to Hevy workout logs, enabling workout reading, routine creation, and training analysis.

Category
访问服务器

README

hevy-mcp

Connect Claude to your Hevy workout log.

hevy-mcp is a Model Context Protocol server that lets Claude (Desktop or claude.ai) read your workouts, design new routines, save them to your Hevy library, and analyze your training trends — the same kind of access ChatGPT users get from Hevy's official integration.

CI PyPI Python License: MIT

You: "Build me a 4-day upper/lower hypertrophy split focused on the muscle groups
      I've trained least over the last 30 days, and save it in a folder called
      'Hypertrophy Block 1'."

Claude: ✓ checked your last 30 days of training (lats and rear delts are behind)
        ✓ created folder "Hypertrophy Block 1"
        ✓ resolved 22 exercises against Hevy's library
        ✓ saved 4 routines: Upper A, Lower A, Upper B, Lower B
        Open the Hevy app to start any of them.

What you can ask Claude to do

  • Look back"Show me my last 10 workouts and tell me which muscle groups I've been neglecting."
  • Plan ahead"Based on my bench press history, what's a good top set for tomorrow?"
  • Build routines"Build me a 4-day upper/lower hypertrophy split and save it."
  • Edit routines"On 'Push Day A', swap dumbbell shoulder press for a barbell overhead press, 4 sets of 5."
  • Analyze"Estimate my 1RM on the main lifts and chart squat progression over the last 90 days."

Requirements

  • A Hevy PRO subscription (the developer API requires it).
  • Your Hevy API key — get it at https://hevy.com/settings?developer.
  • Either Python 3.11+ or Docker.
  • Claude Desktop, or a claude.ai workspace that supports custom connectors.

Quick start — Claude Desktop (5 minutes)

1. Install

# Easiest, with uv (https://docs.astral.sh/uv/):
uv tool install hevy-mcp

# Or with pipx:
pipx install hevy-mcp

# Or with plain pip:
python -m pip install hevy-mcp

2. Add it to Claude Desktop

Open Claude Desktop's config file:

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%\Claude\claude_desktop_config.json
  • Linux~/.config/Claude/claude_desktop_config.json

Add the hevy entry under mcpServers (create the file if it doesn't exist):

{
  "mcpServers": {
    "hevy": {
      "command": "hevy-mcp",
      "env": {
        "HEVY_API_KEY": "sk_live_paste_your_key_here"
      }
    }
  }
}

If hevy-mcp isn't on your PATH (uv-tool installs sometimes aren't picked up by the Claude Desktop launcher), use the absolute path you get from which hevy-mcp — for example /Users/you/.local/bin/hevy-mcp.

3. Restart Claude Desktop

Quit fully (⌘Q on macOS) and reopen. You should see a tools indicator showing the hevy server is connected.

4. Try it

"Use the hevy tool to fetch my last 3 workouts and summarize them."

If Claude shows your real workouts, you're done. 🎉


Alternative — claude.ai (remote connector)

If you use claude.ai in the browser instead of Claude Desktop, run hevy-mcp as an HTTP service and add it as a custom connector.

1. Run the server somewhere with HTTPS

The simplest path is Docker on Fly.io / Render / Railway:

docker build -t hevy-mcp .
docker run --rm -p 8000:8000 -e HEVY_API_KEY=sk_live_... hevy-mcp

Or directly with the CLI:

hevy-mcp --http --host 0.0.0.0 --port 8000

The MCP endpoint is at /mcp.

2. Add it as a custom connector

In claude.ai, go to Settings → Connectors → Add custom connector and use your public HTTPS URL ending in /mcp (e.g. https://hevy-mcp.fly.dev/mcp).

Multi-user note

If multiple users will share the same deployment, don't bake HEVY_API_KEY into the container env — instead, send it as a per-request header. The server reads X-Hevy-Api-Key if present and falls back to the env var. A small auth-injecting reverse proxy (Cloudflare Worker, Nginx) in front of the server is the usual pattern.


What it can do (full tool list)

Group Tool What it does
Workouts list_workouts Page through your workout history, newest first.
get_workout Full detail of one workout — every set, rep, weight, RPE, note.
get_workout_count Total workouts logged.
get_workout_events Stream of created/updated/deleted events since a timestamp.
create_workout Log a completed workout.
update_workout Edit an already-logged workout.
Routines list_routines, get_routine Read your saved routines.
create_routine Save a new routine (with duplicate-title protection).
update_routine Modify an existing routine.
Folders list_routine_folders, get_routine_folder, create_routine_folder Organize routines.
Exercise library search_exercise_templates Fuzzy search Hevy's ~400-exercise library by name, equipment, or muscle.
list_exercise_templates, get_exercise_template Browse/look up exercises.
Webhooks create_webhook_subscription, get_webhook_subscription, delete_webhook_subscription One subscription per key (Hevy limit).
Analytics estimate_one_rep_max Epley/Brzycki e1RM from your top working sets.
volume_by_muscle_group Tonnage per muscle group over a window.
progression_trend e1RM-vs-time series for a single lift, with weekly slope.

Under the hood:

  • Smart caching — the exercise library is fetched once and cached for 24 hours; fuzzy search runs in memory.
  • Rate-limit aware — backs off on 429s and honors Retry-After.
  • Idempotent writes — creating a routine with a duplicate title in the same folder asks Claude to confirm before doubling.
  • LLM-friendly errors — every error comes back as { error, hint }. The hint suggests the next concrete tool call.
  • Never logs your API key.

Troubleshooting

<details> <summary><strong>Claude Desktop says the server "disconnected" right after starting</strong></summary>

Most common cause: the command in claude_desktop_config.json isn't on the launcher's PATH. Replace "command": "hevy-mcp" with the absolute path from which hevy-mcp (or where hevy-mcp on Windows). Restart Claude Desktop. </details>

<details> <summary><strong>Tool calls fail with "HEVY_API_KEY is missing or invalid"</strong></summary>

  • Check that you pasted the key into the env block (not the args block).
  • Confirm your Hevy PRO subscription is active.
  • Rotate your key at https://hevy.com/settings?developer and try again. </details>

<details> <summary><strong>Claude can't find the right exercise when creating a routine</strong></summary>

search_exercise_templates is fuzzy but not magic. If Claude picks the wrong exercise, ask it to "search again with a more specific name" or pass an equipment filter (e.g. "barbell"). </details>

<details> <summary><strong>It's slow on the first call</strong></summary>

The exercise library is fetched on the first lookup (one-time, ~200ms). Every call after that hits the in-memory cache. The cache lasts 24 hours. </details>


Development

git clone https://github.com/Vellarasan/hevy-mcp.git
cd hevy-mcp
uv sync --extra dev          # creates .venv and installs deps
pytest -q                    # offline tests (no real API needed)

# Run against your real Hevy account:
HEVY_API_KEY=sk_live_... python smoke_test.py

# Stdio (Claude Desktop):
hevy-mcp

# HTTP (claude.ai):
hevy-mcp --http --port 8000

See CONTRIBUTING.md for the longer version.

Project layout

hevy-mcp/
├── src/hevy_mcp/
│   ├── server.py        # transport bootstrap (stdio + streamable-http)
│   ├── hevy_client.py   # async httpx client w/ retries & error mapping
│   ├── schemas.py       # Pydantic models
│   ├── cache.py         # 24-hour TTL cache
│   ├── errors.py        # HevyApiError + tool_guard
│   ├── formatters.py    # JSON → readable text
│   └── tools/           # workouts, routines, folders, templates, webhooks, analytics
├── tests/
└── Dockerfile

Releases

See CHANGELOG.md. Tagged releases publish to PyPI automatically.

License

MIT.

Thanks

This project's design owes ideas to two earlier community implementations: chrisdoc/hevy-mcp (TypeScript) and SrdjanCodes/hevy-mcp (Python). Not a fork — but worth a look if you want a different language or feature mix.

hevy-mcp is a community project and is not affiliated with or endorsed by Hevy.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选