hevy-mcp
hevy-mcp
Verbinde Claude mit deinem Hevy Trainingstagebuch.
hevy-mcp ist ein Model Context Protocol-Server, mit dem Claude (Desktop oder claude.ai) deine Workouts lesen, neue Routinen entwerfen, sie in deiner Hevy-Bibliothek speichern und deine Trainingstrends analysieren kann – dieselbe Art von Zugriff, die ChatGPT-Nutzer durch die offizielle Hevy-Integration erhalten.
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.Was du Claude fragen kannst
Rückblick — "Zeig mir meine letzten 10 Workouts und sag mir, welche Muskelgruppen ich vernachlässigt habe."
Vorausplanung — "Was ist basierend auf meiner Bankdrück-Historie ein guter Top-Satz für morgen?"
Routinen erstellen — "Erstelle mir einen 4-Tage-Oberkörper/Unterkörper-Hypertrophie-Split und speichere ihn."
Routinen bearbeiten — "Tausche am 'Push-Tag A' das Kurzhantel-Schulterdrücken gegen Langhantel-Schulterdrücken, 4 Sätze à 5 Wiederholungen."
Analysieren — "Schätze mein 1RM bei den Hauptübungen und erstelle ein Diagramm zum Fortschritt beim Kniebeugen über die letzten 90 Tage."
Related MCP server: hevy-mcp
Voraussetzungen
Ein Hevy PRO-Abonnement (die Entwickler-API erfordert dies).
Dein Hevy-API-Schlüssel – erhältlich unter https://hevy.com/settings?developer.
Entweder Python 3.11+ oder Docker.
Claude Desktop oder ein claude.ai-Arbeitsbereich, der benutzerdefinierte Connectors unterstützt.
Schnellstart — Claude Desktop (5 Minuten)
1. Installation
# 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-mcp2. Zu Claude Desktop hinzufügen
Öffne die Konfigurationsdatei von Claude Desktop:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.jsonLinux —
~/.config/Claude/claude_desktop_config.json
Füge den hevy-Eintrag unter mcpServers hinzu (erstelle die Datei, falls sie nicht existiert):
{
"mcpServers": {
"hevy": {
"command": "hevy-mcp",
"env": {
"HEVY_API_KEY": "sk_live_paste_your_key_here"
}
}
}
}Falls
hevy-mcpnicht in deinem PATH liegt (uv-tool-Installationen werden manchmal vom Claude Desktop-Launcher nicht erkannt), verwende den absoluten Pfad, den du überwhich hevy-mcperhältst – zum Beispiel/Users/you/.local/bin/hevy-mcp.
3. Claude Desktop neu starten
Beende das Programm vollständig (⌘Q unter macOS) und öffne es erneut. Du solltest eine Tool-Anzeige sehen, die bestätigt, dass der hevy-Server verbunden ist.
4. Ausprobieren
"Verwende das hevy-Tool, um meine letzten 3 Workouts abzurufen und zusammenzufassen."
Wenn Claude deine echten Workouts anzeigt, bist du fertig. 🎉
Alternative — claude.ai (Remote-Connector)
Wenn du claude.ai im Browser anstelle von Claude Desktop verwendest, führe hevy-mcp als HTTP-Dienst aus und füge ihn als benutzerdefinierten Connector hinzu.
1. Den Server an einem Ort mit HTTPS ausführen
Der einfachste Weg ist Docker auf Fly.io / Render / Railway:
docker build -t hevy-mcp .
docker run --rm -p 8000:8000 -e HEVY_API_KEY=sk_live_... hevy-mcpOder direkt über die CLI:
hevy-mcp --http --host 0.0.0.0 --port 8000Der MCP-Endpunkt befindet sich unter /mcp.
2. Als benutzerdefinierten Connector hinzufügen
Gehe in claude.ai zu Settings → Connectors → Add custom connector und verwende deine öffentliche HTTPS-URL, die auf /mcp endet (z. B. https://hevy-mcp.fly.dev/mcp).
Hinweis für mehrere Benutzer
Wenn mehrere Benutzer dieselbe Bereitstellung nutzen, binde HEVY_API_KEY nicht in die Container-Umgebung ein – sende ihn stattdessen als Header pro Anfrage. Der Server liest X-Hevy-Api-Key, falls vorhanden, und greift andernfalls auf die Umgebungsvariable zurück. Ein kleiner Reverse-Proxy zur Authentifizierungsinjektion (Cloudflare Worker, Nginx) vor dem Server ist das übliche Muster.
Was es kann (vollständige Tool-Liste)
Gruppe | Tool | Was es tut |
Workouts |
| Blättere durch deine Workout-Historie, beginnend mit dem neuesten. |
| Volle Details eines Workouts – jeder Satz, jede Wiederholung, Gewicht, RPE, Notiz. | |
| Gesamtzahl der protokollierten Workouts. | |
| Stream von erstellten/aktualisierten/gelöschten Ereignissen seit einem Zeitstempel. | |
| Ein abgeschlossenes Workout protokollieren. | |
| Ein bereits protokolliertes Workout bearbeiten. | |
Routinen |
| Deine gespeicherten Routinen lesen. |
| Eine neue Routine speichern (mit Schutz vor doppelten Titeln). | |
| Eine bestehende Routine ändern. | |
Ordner |
| Routinen organisieren. |
Übungsbibliothek |
| Fuzzy-Suche in Hevys ~400 Übungen umfassender Bibliothek nach Name, Gerät oder Muskel. |
| Übungen durchsuchen/nachschlagen. | |
Webhooks |
| Ein Abonnement pro Schlüssel (Hevy-Limit). |
Analytik |
| Epley/Brzycki e1RM aus deinen Top-Arbeitssätzen. |
| Tonnage pro Muskelgruppe über einen Zeitraum. | |
| e1RM-Zeitreihe für eine einzelne Übung, mit wöchentlicher Steigung. |
Unter der Haube:
Intelligentes Caching — die Übungsbibliothek wird einmal abgerufen und für 24 Stunden zwischengespeichert; die Fuzzy-Suche läuft im Arbeitsspeicher.
Ratenbegrenzungs-bewusst — drosselt bei 429-Fehlern und respektiert
Retry-After.Idempotente Schreibvorgänge — beim Erstellen einer Routine mit einem doppelten Titel im selben Ordner wird Claude aufgefordert, dies vor der Duplizierung zu bestätigen.
LLM-freundliche Fehler — jeder Fehler wird als
{ error, hint }zurückgegeben. Der Hinweis schlägt den nächsten konkreten Tool-Aufruf vor.Protokolliert niemals deinen API-Schlüssel.
Fehlerbehebung
Häufigste Ursache: Der command in claude_desktop_config.json befindet sich nicht im PATH des Launchers. Ersetze "command": "hevy-mcp" durch den absoluten Pfad von which hevy-mcp (oder where hevy-mcp unter Windows). Starte Claude Desktop neu.
Überprüfe, ob du den Schlüssel in den
env-Block (nicht in denargs-Block) eingefügt hast.Bestätige, dass dein Hevy PRO-Abonnement aktiv ist.
Erneuere deinen Schlüssel unter https://hevy.com/settings?developer und versuche es erneut.
search_exercise_templates ist fuzzy, aber nicht magisch. Wenn Claude die falsche Übung auswählt, bitte es darum, "erneut mit einem spezifischeren Namen zu suchen" oder einen equipment-Filter (z. B. "barbell") zu übergeben.
Die Übungsbibliothek wird beim ersten Nachschlagen abgerufen (einmalig, ~200ms). Jeder weitere Aufruf greift auf den Cache im Arbeitsspeicher zu. Der Cache hält 24 Stunden.
Entwicklung
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 8000Siehe CONTRIBUTING.md für die ausführlichere Version.
Projektlayout
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/
└── DockerfileReleases
Siehe CHANGELOG.md. Getaggte Releases werden automatisch auf PyPI veröffentlicht.
Lizenz
MIT.
Dank
Das Design dieses Projekts verdankt Ideen zwei früheren Community-Implementierungen: chrisdoc/hevy-mcp (TypeScript) und SrdjanCodes/hevy-mcp (Python). Kein Fork – aber einen Blick wert, wenn du eine andere Sprache oder Funktionsmischung bevorzugst.
hevy-mcp ist ein Community-Projekt und ist nicht mit Hevy verbunden oder von Hevy unterstützt.
Available Tools
22 toolscreate_routineA
Create a new routine.
Required routine shape:
{ title, folder_id?, notes?, exercises: [
{ exercise_template_id, rest_seconds?, notes?, sets: [
{ type, weight_kg?, reps?, rpe? }
] }
] }
WORKFLOW for natural-language requests:
Resolve every exercise name to a template id with
search_exercise_templates.(Optional) Create or look up the target folder with the folder tools.
Call this tool. If a routine with the same title already exists in the folder you'll get back a
duplicate_ofpayload — confirm with the user, then re-call withforce=True(or callupdate_routineinstead).
Inputs: routine (required), force. Returns: object
create_routine_folderA
Create a new routine folder. Returns the new folder including its id, which
you can pass to create_routine as folder_id.
Inputs: title (required). Returns: object
create_webhook_subscriptionA
Create or replace the user's webhook subscription.
url: HTTPS endpoint Hevy will POST events to.event_type: e.g. "workout_created". Hevy only accepts one subscription per key.
Inputs: url (required), event_type. Returns: object
create_workoutA
Log a completed workout to Hevy.
workout shape:
{ title, description?, start_time, end_time, is_private?, exercises: [
{ exercise_template_id, notes?, superset_id?, sets: [
{ type, weight_kg?, reps?, rpe?, distance_meters?, duration_seconds? }
] }
] }
Resolve exercise_template_id values via search_exercise_templates before
calling this tool — never invent IDs.
Inputs: workout (required). Returns: object
delete_webhook_subscriptionA
Delete the active webhook subscription.
Inputs: no named parameters. Returns: object
estimate_one_rep_maxA
Estimate the user's 1RM on a given exercise from their recent top sets.
Walks the user's workouts (newest first), gathers every set of the target exercise, and applies a strength formula:
"epley": weight * (1 + reps/30)
"brzycki": weight * 36 / (37 - reps)
Returns the highest e1RM observed plus the contributing set, plus a short recent history. Skips warmups and reps>15 (formulas are unreliable past that).
Inputs: exercise_template_id (required), method, max_pages. Returns: object
get_exercise_templateA
Fetch a single exercise template by id (the Hevy library entry, not a logged set).
Inputs: template_id (required). Returns: object
get_routineB
Fetch a single routine with every exercise and target set.
Inputs: routine_id (required). Returns: object
get_routine_folderA
Fetch a single routine folder by id.
Inputs: folder_id (required). Returns: object
get_webhook_subscriptionA
Return the user's current webhook subscription, if any.
Inputs: no named parameters. Returns: object
get_workoutA
Fetch a single workout with every set, rep, weight, RPE, and note.
Use this when the user asks about a specific workout or wants to compare
sets across sessions. Pair with list_workouts to discover the id first.
Inputs: workout_id (required). Returns: object
get_workout_countA
Total number of workouts the user has logged. Cheap; safe to call eagerly.
Inputs: no named parameters. Returns: object
get_workout_eventsA
Stream of workout change events (created/updated/deleted).
Use to detect new workouts since a previous interaction without re-paginating
the full list. The since parameter is ISO-8601 (e.g. 2025-01-01T00:00:00Z).
Inputs: page, page_size, since. Returns: object
list_exercise_templatesA
Paginated browse of the Hevy exercise library (~400 entries). Cached for 24h.
Prefer search_exercise_templates when looking up a specific exercise — it's
far faster than scanning pages.
Inputs: page, page_size. Returns: object
list_routine_foldersB
List the user's routine folders (e.g. 'Push/Pull/Legs', 'Hypertrophy Block').
Inputs: page, page_size. Returns: object
list_routinesB
List the user's saved routines (templates they follow). Paginated.
Inputs: page, page_size. Returns: object
list_workoutsA
List the user's workouts in reverse-chronological order.
Use this first when the user asks about "recent workouts", "last N sessions",
"what did I train on Monday", etc. Each item is a summary; call
get_workout(workout_id) for full set-by-set detail when the user asks
about specific weights, RPE, or progression.
Inputs: page, page_size. Returns: object
progression_trendB
Top-set e1RM over time for a single exercise. Returns a per-session series suitable for charting.
Inputs: exercise_template_id (required), since, max_pages. Returns: object
search_exercise_templatesA
Fuzzy-search the Hevy exercise library. Use this before create_routine
or create_workout — it returns the exercise_template_id you need.
query: free-text exercise name. e.g. "barbell back squat", "incline db press".equipment: optional filter, e.g. "barbell", "dumbbell", "cable", "machine", "bodyweight".muscle_group: optional filter onprimary_muscle_group, e.g. "chest", "lats", "quads".
Returns ranked candidates with id, title, equipment, primary_muscle_group, and a match score 0-100. Pick the top hit unless the user disambiguates.
Inputs: query (required), equipment, muscle_group, limit. Returns: object
update_routineA
Update an existing routine in place.
Same payload shape as create_routine.routine, with one important caveat:
Hevy's PUT endpoint does NOT accept folder_id, and there is no public API
endpoint for moving a routine between folders. If folder_id is present in
the payload it is silently stripped and a warning is included in the
response. To 'move' a routine, create a new copy in the target folder and
delete the old one in the Hevy app.
Inputs: routine_id (required), routine (required). Returns: object
update_workoutA
Replace the contents of an existing logged workout. Same payload shape as create_workout.
Inputs: workout_id (required), workout (required). Returns: object
volume_by_muscle_groupA
Aggregate working-set volume (kg lifted) by primary muscle group over a window.
Useful for "which muscle groups have I been neglecting?" prompts. Volume per set = weight_kg * reps; warmups excluded. Requires the template list to be loaded (it will be cached on first call).
Inputs: since, until, max_pages. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool targets a distinct resource and action: routines, folders, workouts, webhooks, exercises, and analytics. No overlapping functionality; an agent can clearly distinguish between them.
All tool names follow a consistent verb_noun pattern (e.g., create_routine, list_workouts, get_exercise_template). No mixing of conventions or vague verbs.
With 22 tools, the set is slightly larger than typical but well-justified for a fitness tracking API covering CRUD, webhooks, and analytical operations. It remains scoped and manageable.
Missing delete operations for routines and workouts, and no update/delete for routine folders. This creates dead ends where agents cannot fully manage resources, limiting practical workflow completion.
Maintenance
Related MCP Connectors
Talk to your own gym log. Reps: Gym Workout Log (repsworkout.com) is a workout log for iPhone and Android. Connect it to Claude, ChatGPT or any MCP client to read your workout history, PRs, lift progression, weekly summaries, routines and training plan, and to save routines, plans and workouts you have already done after you confirm them. It can't change or delete a logged workout or delete your account. Sign in with an e-mail code, Apple or Google; new users can create a free account while connecting, then get the app to log workouts.
Connect Claude, Cursor or any MCP client to your GymUp training data.
Create Hevy routines and analyze your training from chat. Unofficial; BYO Hevy PRO API key.
Workout journal Claude and ChatGPT write to: log workouts, get a program, see your progress.
Related MCP Servers
- AlicenseAqualityAmaintenanceA 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).23555MIT
- AlicenseNot gradedqualityDmaintenancePython MCP server for the Hevy fitness app. Gives Claude full access to your Hevy data. Log workouts, manage routines, track body measurements, browse exercises, and more. Covers all 25 endpoints of the official Hevy API.MIT
- FlicenseNot gradedqualityNot gradedmaintenanceA 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.-
- AlicenseNot gradedqualityDmaintenanceMCP server that connects Claude to the Hevy fitness app, enabling AI-driven personalized strength coaching by reading lifting history and programming workouts.MIT