Hevy MCP
The Hevy MCP server enables AI assistants to interact with the Hevy fitness tracking app API for comprehensive fitness data management:
Workout Management: Fetch, create, update, and track workouts with detailed exercise data
Routine Management: Access, create, update, and organize workout routines
Exercise Templates: Browse and retrieve both standard and custom exercise templates
Folder Organization: Create and manage folders to categorize routines effectively
Utilized for code formatting and linting in the development process of the MCP server.
Used for environment variable configuration to store the Hevy API key.
Used for version control of the MCP server codebase.
Hosts the repository for the MCP server codebase.
Provides tools for accessing and managing workout data, routines, exercise templates, and folders through the Hevy fitness app API, enabling workout tracking and fitness management capabilities.
Required as a runtime environment (v20 or higher) for running the MCP server.
Used as a package manager for installing and managing dependencies of the MCP server.
Provides badge for license information in the README.
Supported as an alternative package manager for installing and managing dependencies.
Click on "Install 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 3 workouts"
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 Server
Talk to your Hevy workout data from Claude, Cursor, Codex, and other MCP clients.
Connect to the hosted MCP · Watch the 18-second demo · Explore all 25 tools
hevy-mcp is an open-source Model Context Protocol (MCP)
server for the Hevy fitness and workout tracking
app. It lets AI assistants read, analyze, create, and update your Hevy workouts,
routines, exercise templates, and body measurements through authenticated Hevy
API requests.
A Hevy API key, available with Hevy PRO, is required.
See it in action

In the demo, the assistant retrieves real Hevy data and answers a multi-part training question with evidence from the user's workout history.
Related MCP server: hevy-mcp
What can you do with it?
Analyze training progress: summarize 1-12 weeks of workouts and body measurements in one tool call.
Ask questions in plain language: find recent sessions, frequently trained exercises, consistency gaps, routine details, or exercise history.
Plan and log training: create or update workouts, routines, routine folders, custom exercises, and body measurements.
Search without huge responses: discover routines and exercise templates with compact, AI-friendly results.
Connect from your preferred MCP client: use the hosted Streamable HTTP endpoint or run locally with Codex, Claude Desktop, Cursor, and other clients.
Start without installing anything: connect directly to the production Cloudflare Worker—no Node.js, package download, or Docker container required.
Keep local control when you want it: run the same server with
npx,bunx, or the official Docker image.
Try asking:
Analyze my training over the last six weeks. Show workouts per week, my most frequently trained exercises, any obvious gaps or inconsistencies, and cite the workout evidence you used.
Find my push-day routine and show its exercises and sets.
Compare my recent body measurements with my training consistency.
Create a completed workout from my saved routine. Ask me for any missing set results before writing it to Hevy.
Quick start
1. Get your Hevy API key
Create an API key in Hevy, then keep it somewhere secure. API access currently requires a Hevy PRO subscription.
2. Connect hevy-mcp to your client
The hosted Cloudflare endpoint is the fastest way to start. It runs remotely, so your client does not need Node.js, Bun, Docker, or a local server process.
Connect to the hosted endpoint
Production URL:
https://hevy.chrisdoc.dev/mcpThe endpoint uses Streamable HTTP. Send your Hevy API key as a bearer token on every request.
Codex
Codex CLI, the Codex desktop app, and the IDE extension share the same MCP configuration. Make your Hevy API key available in the environment that starts Codex, then add the hosted server:
export HEVY_API_KEY=your-hevy-api-key
codex mcp add hevy \
--url https://hevy.chrisdoc.dev/mcp \
--bearer-token-env-var HEVY_API_KEYCodex stores the environment variable name, not the key itself, in its MCP
configuration. Restart Codex or begin a new session, then run codex mcp list
to verify the server is configured.
Other Streamable HTTP clients
Clients that accept a remote MCP URL and fixed headers commonly use this shape:
{
"mcpServers": {
"hevy": {
"url": "https://hevy.chrisdoc.dev/mcp",
"headers": {
"Authorization": "Bearer your-hevy-api-key"
}
}
}
}Exact configuration keys vary by client. The hosted server requires support for
Streamable HTTP and a fixed Authorization header.
Treat the bearer value like a password. The Worker validates it with Hevy for
each request, does not store it, and forwards it to Hevy only as the requiredapi-key header.
Run locally instead
Choose local stdio if you prefer to run the server on your own machine or your client cannot attach a fixed authorization header to remote MCP requests.
Codex
codex mcp add hevy \
--env HEVY_API_KEY=your-hevy-api-key \
-- npx -y hevy-mcpClaude Desktop or Cursor
Add this mcpServers entry to your client configuration:
{
"mcpServers": {
"hevy": {
"command": "npx",
"args": ["-y", "hevy-mcp"],
"env": {
"HEVY_API_KEY": "your-hevy-api-key"
}
}
}
}Common local configuration locations:
Claude Desktop on macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop on Windows:
%APPDATA%\Claude\claude_desktop_config.jsonCursor:
~/.cursor/mcp.json
Restart or reconnect the client after saving the file.
Any stdio MCP client
Configure your client to launch this command with HEVY_API_KEY in the child
process environment:
npx -y hevy-mcpnpx requires Node.js 20 or newer. Restart or reconnect your client after
saving its configuration.
Requires Bun:
{
"mcpServers": {
"hevy": {
"command": "bunx",
"args": ["hevy-mcp@latest"],
"env": {
"HEVY_API_KEY": "your-hevy-api-key"
}
}
}
}Official images support linux/amd64 and linux/arm64. Keep stdin open with
-i because the container runs the stdio MCP server:
export HEVY_API_KEY=your-hevy-api-key
docker run -i --rm -e HEVY_API_KEY ghcr.io/chrisdoc/hevy-mcp:latestFor an MCP client, store the key in a protected environment file and configure the client to launch Docker:
{
"mcpServers": {
"hevy": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--env-file",
"/absolute/path/to/hevy-mcp.env",
"ghcr.io/chrisdoc/hevy-mcp:latest"
]
}
}
}Pin an exact image tag such as ghcr.io/chrisdoc/hevy-mcp:X.Y.Z when you need
reproducible upgrades.
You can also add the npm server to supported clients with
add-mcp:
npx add-mcp hevy-mcp --env "HEVY_API_KEY=your-hevy-api-key"3. Ask your first question
Try one of these after restarting or reconnecting your MCP client:
“Give me a training summary for the last four weeks.”
“What routines do I have saved on Hevy?”
“Show my three most recent workouts.”
“Find exercise templates containing squat.”
“Which Hevy account is connected?”
Your assistant should ask for approval before mutation tools when the client supports tool confirmations.
How it works
Hosted: Your AI assistant → Streamable HTTP → Cloudflare Worker → Hevy API
Local: Your AI assistant → MCP over stdio → local hevy-mcp → Hevy APIThe hosted endpoint creates a fresh MCP server and Hevy client for each request. It validates the supplied key with Hevy, keeps no shared user session, and does not persist the key. The local server follows the same tool contract but runs on your machine and receives the key through its child-process environment.
In either mode, read tools retrieve data; mutation tools create or replace data only when your assistant calls them.
Guided prompts
These server-provided MCP prompts coordinate common multi-step workflows:
Prompt | Arguments | Workflow |
| Optional | Calls |
| Required | Loads a routine, collects actual completed-set data and an end time, then creates a workout without inventing results. |
With MCP SDK v1.29.0, clients invokinganalyze-workout-progress with its
default value must send arguments: {}. Omitting the entire arguments
object is rejected by that SDK version before the default is applied.
Tools
hevy-mcp registers 25 tools. Read-only tools are safe for exploration; create
and update tools are exposed with MCP mutation annotations so compatible clients
can request confirmation.
Category | Tool | Description |
Training analysis |
| Summarize 1-12 weeks of workout activity and body-measurement trends in one call. |
Workouts |
| List workouts from newest to oldest with exercise and timing details. |
Workouts |
| Get complete details for one workout by ID. |
Workouts |
| Return the account's total workout count. |
Workouts |
| List workout update and delete events since a timestamp. |
Workouts |
| Create a completed workout in Hevy. |
Workouts |
| Replace an existing workout by ID. |
Routines |
| Search routine titles and return compact metadata for discovery. |
Routines |
| List custom and default workout routines. |
Routines |
| Get one routine and its exercise configuration by ID. |
Routines |
| Create a reusable workout routine. |
Routines |
| Replace an existing routine's content. |
Routine folders |
| List default and custom routine folders. |
Routine folders |
| Get one routine folder's metadata by ID. |
Routine folders |
| Create a routine folder. |
Exercise templates |
| List exercise templates with equipment and muscle metadata. |
Exercise templates |
| Get complete metadata for one exercise template by ID. |
Exercise templates |
| Search the full exercise catalog by title substring. |
Exercise templates |
| Create a custom exercise template. |
Exercise history |
| Get past performed sets for one exercise template. |
Body measurements |
| List dated body measurements. |
Body measurements |
| Get the body measurement entry for one date. |
Body measurements |
| Create a dated body measurement. |
Body measurements |
| Update the body measurement for an existing date. |
Account |
| Return the user's ID, display name, and public profile URL. |
The Hevy API currently exposes no delete endpoints for workouts, routines, routine folders, exercise templates, or body measurements, so there are no corresponding delete tools.
Resources
Name | URI | Description |
|
| Authenticated Hevy user profile. |
|
| Total number of workouts in the account. |
|
| Full formatted exercise template catalog. |
|
| Full formatted list of Hevy routine folders. |
Hosted Cloudflare endpoint
The production MCP server is live at:
https://hevy.chrisdoc.dev/mcpIt is the quickest way to use hevy-mcp: there is nothing to install or keep
running locally, and it exposes the same 25 tools as the npm package and Docker
image.
The Cloudflare Worker uses stateless Streamable HTTP at POST /mcp.
Clients must send their Hevy API key as a fixed authorization header:
{
"mcpServers": {
"hevy": {
"url": "https://hevy.chrisdoc.dev/mcp",
"headers": {
"Authorization": "Bearer your-hevy-api-key"
}
}
}
}The bearer value is your Hevy API key, not an OAuth token. The Worker validates
the key with Hevy on each request, does not store it, and forwards it upstream
only as Hevy's required api-key header.
The endpoint does not expose legacy SSE or a GET event stream. Clients that
require OAuth discovery, dynamic registration, token refresh, or legacy SSE are
not compatible unless they can send the fixed custom header above.
Self-host the Worker
See CONTRIBUTING.md to deploy the Cloudflare Worker for self-hosted Streamable HTTP.
Advanced configuration
Setting | Default | Scope | Notes |
| None; required | Local stdio | Hevy API key from the Hevy app. Never pass it in a URL. |
|
| Local stdio | Positive Hevy API timeout in milliseconds. Invalid values fall back to 30 seconds. |
| Disabled | Local stdio | Set to exactly |
| No browser origins allowed | Self-hosted Worker | Optional comma-separated exact origins. Wildcards are unsupported. Requests without |
|
| Local stdio | Changes the root for the npm update-check cache at |
| Packaged project DSN | Optional local Node telemetry | Overrides the Sentry destination. An empty value disables Sentry export. The Worker does not import Node telemetry. |
|
| Optional local Node telemetry | Overrides the release label attached to local Sentry events and traces. |
| N/A | Local stdio CLI | Print supported options and exit. |
| N/A | Local stdio CLI | Print the installed version and exit. |
The local executable is stdio-only. It does not support PORT,
HEVY_MCP_TRANSPORT, or --transport, and it does not provide local HTTP or
SSE behavior.
Cache behavior
search-exercise-templates and hevy://exercise-templates share a
server-scoped in-memory catalog cache:
Entries live for five minutes, and the cache holds at most one catalog.
Concurrent catalog requests share an in-flight fetch when possible.
search-exercise-templatesacceptsrefresh: trueto invalidate the cache.Paginated
get-exercise-templatescalls always fetch their requested page.Each hosted Worker request gets a fresh cache, preventing cross-key sharing.
Security and mutations
Keep
HEVY_API_KEYout of source control, URLs, logs, and screenshots.Local clients provide the key through the child process environment.
Hosted clients send the key only in the
Authorization: Bearerheader. The Worker validates each key with Hevy, does not store it, and sends it upstream only as Hevy'sapi-keyheader.Browser requests to a self-hosted Worker must exactly match an origin in
MCP_ALLOWED_ORIGINS; wildcard CORS is intentionally unsupported.Create operations can produce duplicates when retried. Update operations replace existing records. Review tool inputs and use client confirmations.
Troubleshooting
The server does not appear: restart or reconnect your MCP client after changing its configuration.
npxfails: confirm that Node.js 20 or newer is installed, then runnpx -y hevy-mcp --versionin a terminal.Codex cannot see the server: run
codex mcp list, then start a new Codex session after confirming thehevyentry exists.Hosted authentication fails: confirm the key is active, belongs to a Hevy PRO account, and is sent as
Authorization: Bearer <HEVY_API_KEY>.Local authentication fails: confirm the key is active and available to the MCP child process as
HEVY_API_KEY.Need diagnostics: set
HEVY_MCP_DEBUG=1. Diagnostic output goes to stderr and does not interfere with MCP messages on stdout.
If you find a bug or have a feature request, open an issue.
Contributing
Contributions are welcome. Developer setup, testing lanes, generated-client workflows, Cloudflare Worker deployment, and pull request rules are documented in CONTRIBUTING.md.
License and acknowledgements
License: MIT
Credits: Model Context Protocol and Hevy Fitness
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisdoc/hevy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server