MH

madebydia/hevy-mcp-server

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

3 stars 17 forks 质量 53 趋势 8

MCP服务器连接代理到Hevy workout应用API.

概览

一个模型上下文协议(MCP)服务器,连接到官方的Hevy API,并将解决数据暴露给AI助手. 支持双重传输模式: stdio for Claude Desktop和SSE用于远程访问(如Poke.com). 有关配置细节,见下文"铁路部署"部分. - 获得工作 - 用日期过滤- 获得工作- 获得工作- 获得工作- 通过ID获得单一工作, 并附上全部细节 - 创建工作- 创建新工作- 练习和组合 - 更新工作- 更新现有工作- 获取工作- 计数 - 获取统计数据的全部工作- 获取工作- 活动- 获取工作更新/删除事件 - get-routines - 列出所有已保存的常规 - get-routine - 通过ID获得单一的常规 - 创建-routine - 创建新的解决常规模板 - 更新-routine - 更新已有的常规 - 删除-routine - 删除常规 - get-exercise-templates - 浏览可用练习(标准+自定义) - get-exercise-template - 通过ID获得单项练习 - ...

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,连接到官方的Hevy API,并将解决数据暴露给AI助手. 支持双重传输模式: stdio for Claude Desktop和SSE用于远程访问(如Poke.com).

由 @ madebydia 所建 。

□ 部署到铁路

有关配置细节,见下文"铁路部署"部分.

□ 特性

MCP 工具

劳动管理

  • get-workouts - 获得带日期过滤器的 Pagized 解决列表
  • get-workout - 通过身份证获得单项锻炼,并附上详细内容
  • create-workout - 用练习和装置创建新的锻炼
  • update-workout - 更新现有解决方案
  • get-workout-count - 统计数据的总的锻炼数
  • get-workout-events - 获得更新/删除事件

常规管理

  • get-routines - 列出所有已保存的常规
  • get-routine - 以ID获得单一的常规
  • create-routine - 创建新的解决常规模板
  • update-routine - 更新现有程序
  • delete-routine - 删除常规

练习数据

  • get-exercise-templates-浏览可用练习(标准+自定义)
  • get-exercise-template - 用ID进行单项练习

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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 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

Routine Management

  • 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

Exercise Data

  • get-exercise-templates - Browse available exercises (standard + custom)
  • get-exercise-template - Get single exercise by ID
  • get-exercise-progress - Track progress for specific exercises over time
  • get-exercise-stats - Get personal records and 1RM estimates

Folder Organization

  • get-routine-folders - List routine folders
  • get-routine-folder - Get folder by ID
  • create-routine-folder - Create new folder
  • update-routine-folder - Update folder name
  • delete-routine-folder - Remove folder

Prerequisites

  1. Hevy PRO Subscription - Required for API access
  2. Hevy API Key - Get it at https://hevy.com/settings?developer
  3. 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:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →