MCP server connecting agents to the Hevy workout app API.
Overview
A Model Context Protocol (MCP) server that connects to the official Hevy API and exposes workout data to AI assistants. Supports dual transport modes: stdio for Claude Desktop and SSE for remote access (e.g., Poke.com). See the Railway Deployment section below for configuration details. - get-workouts - Get paginated workout list with date filtering - get-workout - Get single workout by ID with full details - create-workout - Create new workout with exercises and sets - update-workout - Update existing workout - get-workout-count - Get total workout count for stats - get-workout-events - Get workout update/delete events since date - get-routines - List all saved routines - get-routine - Get single routine by ID - create-routine - Create new workout routine template - update-routine - Update existing routine - delete-routine - Remove routine - get-exercise-templates - Browse available exercises (standard + custom) - get-exercise-template - Get single exercise by ID -...
README
Hevy MCP Server
A Model Context Protocol (MCP) server that connects to the official Hevy API and exposes workout data to AI assistants. Supports dual transport modes: stdio for Claude Desktop and SSE for remote access (e.g., Poke.com).
Built by @madebydia
Deploy to Railway
See the Railway Deployment section below for configuration details.
Features
MCP Tools
Workout Management
get-workouts- Get paginated workout list with date filteringget-workout- Get single workout by ID with full detailscreate-workout- Create new workout with exercises and setsupdate-workout- Update existing workoutget-workout-count- Get total workout count for statsget-workout-events- Get workout update/delete events since date
Routine Management
get-routines- List all saved routinesget-routine- Get single routine by IDcreate-routine- Create new workout routine templateupdate-routine- Update existing routinedelete-routine- Remove routine
Exercise Data
get-exercise-templates- Browse available exercises (standard + custom)get-exercise-template- Get single exercise by IDget-exercise-progress- Track progress for specific exercises over timeget-exercise-stats- Get personal records and 1RM estimates
Folder Organization
get-routine-folders- List routine foldersget-routine-folder- Get folder by IDcreate-routine-folder- Create new folderupdate-routine-folder- Update folder namedelete-routine-folder- Remove folder
Prerequisites
- Hevy PRO Subscription - Required for API access
- Hevy API Key - Get it at https://hevy.com/settings?developer
- Node.js - Version 18 or higher
Installation
1. Clone and Install Dependencies
git clone https://github.com/madebydia/hevy-mcp-server
cd hevy-mcp-server
npm install
2. Configure Environment
cp .env.example .env
Edit .env and add your Hevy API key:
HEVY_API_KEY=your_hevy_api_key_here
HEVY_API_BASE_URL=https://api.hevyapp.com
# Transport configuration
TRANSPORT=stdio # stdio | sse | both
PORT=3004 # Port for SSE/HTTP mode
HOST=127.0.0.1 # Host for SSE/HTTP mode
# SSE Configuration (for Poke.com)
SSE_PATH=/mcp # SSE endpoint path
HEARTBEAT_INTERVAL=30000 # ms - keep connection alive
AUTH_TOKEN= # See Security section below
Security: AUTH_TOKEN Configuration
When using SSE mode with remote access (e.g., via ngrok for Poke.com), you MUST set an AUTH_TOKEN to prevent unauthorized access to your Hevy data.
Generate a secure token using either method:
Option 1: Using the built-in script
npm run generate-token
Option 2: Using OpenSSL
openssl rand -hex 32
Then add the generated token to your .env file:
AUTH_TOKEN=your_generated_token_here
When connecting from Poke.com, include the token in the Authorization header:
Authorization: Bearer your_generated_token_here
Security Notes:
- ✅ REQUIRED for SSE mode with public/ngrok access
- ❌ Optional for stdio mode (Claude Desktop)
- ❌ Optional for SSE mode on localhost only
- ⚠️ Never commit your
.envfile or share your AUTH_TOKEN
3. Build the Project
npm run build
Usage
For Claude Desktop (stdio mode)
1. Run the server in development mode:
npm run dev
2. Configure Claude Desktop
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows: `%APPDATA%\Claude
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →