Skip to content
Conduit

mcp server

hevy-http-mcp

imalfect/hevy-http-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 23, 2026

hevy-http-mcp

An HTTP Model Context Protocol (MCP) server for the Hevy workout tracker API. This project was heavily inspired from @chrisdoc's hevy-mcp. That solution focused on the stdio transport, and I needed HTTP, hence this project was born.

This MCP is useful if you want to connect your workout data to AI chatbots like Poke.

Exposes all core Hevy API operations (workouts, routines, exercise templates, routine folders) as MCP tools over HTTP transport, so any MCP-compatible client can connect remotely.

Tech Stack

Built with Elysia, elysia-mcp, and ofetch.

Prerequisites

Quick Start

# Clone the repository
git clone <repo-url> hevy-http-mcp
cd hevy-http-mcp

# Install dependencies
bun install

# Create your .env from the example
cp .env.example .env
# Edit .env and fill in HEVY_API_KEY and MCP_API_KEY

# Start the server
bun run start

The MCP endpoint will be available at http://localhost:3000/mcp.

Development mode (hot-reload)

bun run dev

Inspector

bun run inspect

Opens the MCP Inspector UI pointed at the local server.

Configuration

All configuration is done via environment variables (or a .env file).

VariableRequiredDefaultDescription
HEVY_API_KEYYes—Your Hevy API key
MCP_API_KEYYes—A secret key clients must send to authenticate with this MCP server
PORTNo3000HTTP port
HOSTNo127.0.0.1HTTP host
LOG_LEVELNoinfoLogging verbosity (debug, info, warn, error)

Authentication

Every request to /mcp must include an Authorization header:

Authorization: Bearer <MCP_API_KEY>

Requests without a valid key receive 401 or 403 responses.

MCP Client Configuration

Cursor / Claude Desktop (Streamable HTTP)

{
  "mcpServers": {
    "hevy": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "Authorization": "Bearer <your-mcp-api-key>"
      }
    }
  }
}

Available Tools

Workouts

ToolDescription
get-workoutsPaginated list of workouts
get-workoutSingle workout by ID
create-workoutCreate a new workout
update-workoutUpdate an existing workout
get-workout-countTotal number of workouts
get-workout-eventsWorkout update/delete events (paginated)

Routines

ToolDescription
get-routinesPaginated list of routines
get-routine-by-idSingle routine by ID
create-routineCreate a new routine
update-routineUpdate an existing routine

Exercise Templates

ToolDescription
get-exercise-templatesPaginated list of exercise templates
get-exercise-templateSingle template by ID

Routine Folders

ToolDescription
get-routine-foldersPaginated list of folders
create-routine-folderCreate a new folder
get-routine-folderSingle folder by ID

Project Structure

hevy-http-mcp/
├── .env.example          # Environment variable template
├── package.json
├── tsconfig.json
├── README.md
└── src/
    ├── index.ts           # Entry point — Elysia server + MCP plugin setup
    ├── config.ts          # Environment variable loading & validation
    ├── logger.ts          # Structured logger with levels
    ├── hevy/
    │   ├── index.ts       # Re-exports
    │   ├── client.ts      # Hevy API client (ofetch)
    │   └── types.ts       # TypeScript types for all Hevy API entities
    └── tools/
        ├── index.ts       # Re-exports all tool registrations
        ├── helpers.ts     # Shared MCP response builders + error wrapper
        ├── workouts.ts    # Workout tools
        ├── routines.ts    # Routine tools
        ├── templates.ts   # Exercise template tools
        └── folders.ts     # Routine folder tools

Security

NOTE: This project was coded using Claude. AI can make mistakes and therefore I cannot guarantee that the code is 100% secure

  • No secrets in code — all credentials are loaded from environment variables.
  • .env is gitignored; only .env.example (with placeholder values) is committed.
  • MCP endpoint is protected by API key authentication; unauthenticated requests are rejected before reaching any tool handler.
  • The Hevy API key is only sent server-side to api.hevyapp.com and is never exposed to MCP clients.

License

MIT

↑↓ navigate openesc close