hevy-mcp
hevy-mcp
Conecta a Claude con tu registro de entrenamiento de Hevy.
hevy-mcp es un servidor del Protocolo de Contexto de Modelo que permite a Claude (Desktop o claude.ai) leer tus entrenamientos, diseñar nuevas rutinas, guardarlas en tu biblioteca de Hevy y analizar tus tendencias de entrenamiento; el mismo tipo de acceso que obtienen los usuarios de ChatGPT mediante la integración oficial de Hevy.
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.Qué puedes pedirle a Claude que haga
Mirar atrás — "Muéstrame mis últimos 10 entrenamientos y dime qué grupos musculares he estado descuidando."
Planificar — "Basado en mi historial de press de banca, ¿cuál es una buena serie pesada para mañana?"
Crear rutinas — "Créame una rutina de hipertrofia de 4 días dividida en torso/pierna y guárdala."
Editar rutinas — "En el 'Día de Empuje A', cambia el press de hombros con mancuernas por un press militar con barra, 4 series de 5."
Analizar — "Estima mi 1RM en los levantamientos principales y grafica la progresión de sentadillas en los últimos 90 días."
Related MCP server: hevy-mcp
Requisitos
Una suscripción a Hevy PRO (la API para desarrolladores la requiere).
Tu clave de API de Hevy: consíguela en https://hevy.com/settings?developer.
Python 3.11+ o Docker.
Claude Desktop, o un espacio de trabajo en claude.ai que admita conectores personalizados.
Inicio rápido — Claude Desktop (5 minutos)
1. Instalación
# 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. Añadir a Claude Desktop
Abre el archivo de configuración de Claude Desktop:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.jsonLinux —
~/.config/Claude/claude_desktop_config.json
Añade la entrada hevy bajo mcpServers (crea el archivo si no existe):
{
"mcpServers": {
"hevy": {
"command": "hevy-mcp",
"env": {
"HEVY_API_KEY": "sk_live_paste_your_key_here"
}
}
}
}Si
hevy-mcpno está en tu PATH (a veces las instalaciones de uv-tool no son detectadas por el lanzador de Claude Desktop), usa la ruta absoluta que obtienes conwhich hevy-mcp; por ejemplo,/Users/tu_usuario/.local/bin/hevy-mcp.
3. Reiniciar Claude Desktop
Cierra completamente la aplicación (⌘Q en macOS) y vuelve a abrirla. Deberías ver un indicador de herramientas que muestra que el servidor hevy está conectado.
4. Pruébalo
"Usa la herramienta hevy para obtener mis últimos 3 entrenamientos y resumirlos."
Si Claude muestra tus entrenamientos reales, ya está. 🎉
Alternativa — claude.ai (conector remoto)
Si usas claude.ai en el navegador en lugar de Claude Desktop, ejecuta hevy-mcp como un servicio HTTP y añádelo como un conector personalizado.
1. Ejecuta el servidor en algún lugar con HTTPS
La ruta más sencilla es Docker en Fly.io / Render / Railway:
docker build -t hevy-mcp .
docker run --rm -p 8000:8000 -e HEVY_API_KEY=sk_live_... hevy-mcpO directamente con la CLI:
hevy-mcp --http --host 0.0.0.0 --port 8000El endpoint de MCP está en /mcp.
2. Añádelo como conector personalizado
En claude.ai, ve a Settings → Connectors → Add custom connector y usa tu URL HTTPS pública terminada en /mcp (ej. https://hevy-mcp.fly.dev/mcp).
Nota para múltiples usuarios
Si varios usuarios van a compartir el mismo despliegue, no incluyas HEVY_API_KEY en las variables de entorno del contenedor; en su lugar, envíala como una cabecera por solicitud. El servidor lee X-Hevy-Api-Key si está presente y, si no, recurre a la variable de entorno. Un pequeño proxy inverso que inyecte la autenticación (Cloudflare Worker, Nginx) frente al servidor es el patrón habitual.
Qué puede hacer (lista completa de herramientas)
Grupo | Herramienta | Qué hace |
Entrenamientos |
| Navega por tu historial de entrenamiento, del más nuevo al más antiguo. |
| Detalle completo de un entrenamiento: cada serie, repetición, peso, RPE, nota. | |
| Total de entrenamientos registrados. | |
| Flujo de eventos creados/actualizados/eliminados desde una marca de tiempo. | |
| Registra un entrenamiento completado. | |
| Edita un entrenamiento ya registrado. | |
Rutinas |
| Lee tus rutinas guardadas. |
| Guarda una nueva rutina (con protección contra títulos duplicados). | |
| Modifica una rutina existente. | |
Carpetas |
| Organiza tus rutinas. |
Biblioteca de ejercicios |
| Búsqueda difusa en la biblioteca de ~400 ejercicios de Hevy por nombre, equipo o músculo. |
| Explora/busca ejercicios. | |
Webhooks |
| Una suscripción por clave (límite de Hevy). |
Analítica |
| e1RM (Epley/Brzycki) a partir de tus series de trabajo principales. |
| Tonelaje por grupo muscular en un periodo de tiempo. | |
| Serie temporal de e1RM frente al tiempo para un levantamiento, con pendiente semanal. |
Detalles técnicos:
Caché inteligente — la biblioteca de ejercicios se obtiene una vez y se almacena en caché durante 24 horas; la búsqueda difusa se ejecuta en memoria.
Consciente de los límites de tasa — reduce la velocidad ante errores 429 y respeta
Retry-After.Escrituras idempotentes — crear una rutina con un título duplicado en la misma carpeta pide a Claude que confirme antes de duplicar.
Errores amigables para LLM — cada error devuelve
{ error, hint }. La pista sugiere la siguiente llamada a herramienta concreta.Nunca registra tu clave de API.
Solución de problemas
Causa más común: el command en claude_desktop_config.json no está en el PATH del lanzador. Reemplaza "command": "hevy-mcp" con la ruta absoluta obtenida mediante which hevy-mcp (o where hevy-mcp en Windows). Reinicia Claude Desktop.
Comprueba que pegaste la clave en el bloque
env(no en el bloqueargs).Confirma que tu suscripción a Hevy PRO está activa.
Regenera tu clave en https://hevy.com/settings?developer e inténtalo de nuevo.
search_exercise_templates es difusa pero no mágica. Si Claude elige el ejercicio incorrecto, pídele que "busque de nuevo con un nombre más específico" o pasa un filtro de equipment (ej. "barbell").
La biblioteca de ejercicios se obtiene en la primera búsqueda (una sola vez, ~200ms). Cada llamada posterior utiliza la caché en memoria. La caché dura 24 horas.
Desarrollo
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 8000Consulta CONTRIBUTING.md para la versión extendida.
Estructura del proyecto
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/
└── DockerfileLanzamientos
Consulta CHANGELOG.md. Las versiones etiquetadas se publican automáticamente en PyPI.
Licencia
MIT.
Agradecimientos
El diseño de este proyecto debe ideas a dos implementaciones comunitarias anteriores: chrisdoc/hevy-mcp (TypeScript) y SrdjanCodes/hevy-mcp (Python). No es un fork, pero vale la pena echarle un vistazo si buscas un lenguaje diferente o una combinación de funciones distinta.
hevy-mcp es un proyecto comunitario y no está afiliado ni respaldado por Hevy.
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