Hevy MCP
Connects agents directly to the official Hevy Public API, providing 22 tools for reading user info and workout counts, paginated workouts and workout change events, routines, routine folders, exercise templates and exercise history, and body measurements. With write support explicitly enabled, it can also create or fully replace workouts, routines, body measurements, and create custom exercise templates or routine folders. Reads are enabled by default, writes require a server-level opt-in plus per-call confirmation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hevy MCPshow me my last 5 workouts with total volume"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hevy MCP — Official API, local credentials
A local Model Context Protocol server that connects agents directly to the official Hevy Public API. It does not depend on a community Hevy SDK or proxy service.
It exposes 22 tools for workouts, routines, exercise templates and history, routine folders, body measurements, and account information. Reads are enabled by default. Writes require a server-level opt-in plus a confirmation field on every call.
Hevy currently limits its Public API to Hevy Pro users and labels the API as an early release. Generate a key at Hevy Developer Settings.
Quick start for Codex on macOS
Requirements: Node.js 20 or newer, Git, and the Codex CLI.
git clone https://github.com/andywangyzfh/hevy-mcp.git
cd hevy-mcp
npm ci
npm run build
npm run setup-key
npm run install:codexsetup-key hides your input and saves the key in macOS Keychain under codex-hevy-api-key. The key is not written to this repository or to the Codex configuration. Restart Codex or open a new task after registration.
Prefer a macOS dialog? Run:
zsh scripts/setup-key-gui.zshTo register with confirmed write support:
zsh scripts/install-codex.zsh --allow-writesRelated MCP server: mcp-server-hevy
Other MCP hosts and operating systems
Build the server first:
npm ci
npm run buildStart it with node /absolute/path/to/hevy-mcp/dist/index.js. Supply the API key using one of these methods:
HEVY_API_KEY— direct environment variable.HEVY_API_KEY_FILE— absolute path to a file containing only the key.macOS Keychain — automatic fallback using service
codex-hevy-api-key.
Generic MCP host configuration:
{
"mcpServers": {
"hevy": {
"command": "node",
"args": ["/absolute/path/to/hevy-mcp/dist/index.js"],
"env": {
"HEVY_API_KEY_FILE": "/absolute/path/to/a/private/hevy-api-key"
}
}
}
}Keep the key file outside the repository and restrict it to the current user. See docs/SETUP.md for platform-specific setup and troubleshooting.
Write protection
The server starts read-only. Set HEVY_MCP_ALLOW_WRITES=1 for the MCP process to permit mutations. Create tools also require confirm=true; full replacement tools require confirm_full_overwrite=true.
Hevy's PUT endpoints replace the complete workout, routine, or measurement. An agent should always fetch the current object, preserve every intended field, present the proposed result, and only then call a replacement tool.
There are no delete tools because the official Public API does not expose delete endpoints.
Tools
Read tools cover:
User information and workout count
Paginated workouts, individual workouts, and workout change events
Paginated routines and individual routines
Exercise template browsing, local title search, and exercise history
Routine folders
Body measurements
Write tools cover:
Create or fully replace a workout
Create or fully replace a routine
Create a custom exercise template or routine folder
Create or fully replace a body measurement
The complete tool reference is in docs/TOOLS.md.
Give this to an agent
Use the ready-made prompt in docs/AGENT_INSTALL_PROMPT.md. It tells an agent how to install the server without asking the user to paste an API key into chat.
Security model
Credentials are sent only in the
api-keyheader tohttps://api.hevyapp.comby default.HTTP redirects are disabled so credentials are not forwarded to another origin.
A custom API base URL requires
HEVY_MCP_TRUST_BASE_URL=1; plain HTTP is allowed only for loopback tests.Error messages redact the configured key.
.env, build output, dependencies, and logs are excluded from Git.
Read SECURITY.md before changing credential handling.
Development
npm run check
npm test
npm run buildThe test suite covers headers, query handling, pagination, secret redaction, trusted origins, request serialization, MCP tool discovery, and the default write gate.
中文说明
这是一个直接连接 Hevy 官方 Public API 的本地 MCP server,不依赖第三方 Hevy SDK 或代理服务。Hevy Pro 用户可以让 Codex 等 MCP agent 读取训练计划、训练记录、动作历史和身体数据;显式开启后也可以创建或完整更新数据。
macOS 最快安装方式是依次运行上面的克隆、npm ci、构建、钥匙串设置和 Codex 注册命令。不要把 API key 发到聊天里,也不要提交 .env。默认只读;需要写入时使用 scripts/install-codex.zsh --allow-writes,并在具体修改前让 agent 展示完整变更内容。
This server cannot be deployed
Maintenance
Related MCP Connectors
- MyoAmigoOAuthcom.myoamigo
Agent-first strength-training platform across iOS, Web & MCP: read & write workouts, PRs & plans.
- JotiOAuthcom.kompetic
Read your workouts, history, and stats; create and schedule new workouts. Writes are additive only.
Create Hevy routines and analyze your training from chat. Unofficial; BYO Hevy PRO API key.
- SomviaOAuthapp.somvia
Private Apple Health metrics and workout detail for ChatGPT, Claude, and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables interaction with the Hevy fitness tracking platform through their API. Supports managing workouts, routines, exercise templates, and webhook subscriptions for comprehensive fitness data management.7 npmISC
- AlicenseBqualityCmaintenanceEnables access to Hevy strength-training data—workouts, routines, exercise history, and progression—via an MCP server with per-user credential encryption and optional write support.16Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables reading Hevy workout data and creating workout routines and logged workouts through Hevy's public API.58,400 npm-
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to read and write Hevy workout tracking data, including workouts, routines, exercise templates, per-exercise history, and body measurements through all 15 Hevy public API endpoints.9 npmMIT